Re: [igt-dev] [PATCH i-g-t 1/9] tests/prime_vgem: Skip fence and gtt specific tests

Janusz Krzysztofik
2020-02-03T09:19:41Z

On Saturday, February 1, 2020 6:42:50 AM CET Dixit, Ashutosh wrote:
> On Fri, 31 Jan 2020 09:31:01 -0800, Ramalingam C wrote:
> >
> > In the absence of the mappable aperture, skip GTT and
> > fence specific tests.
> >
> > v2:
> > requirement check is moved to subtest start [Zbigniew]
> >
> > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > ---
> > tests/prime_vgem.c | 12 +++++++++---
> > 1 file changed, 9 insertions(+), 3 deletions(-)
> >
> > diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c
> > index 3bdb23007d56..c483cbe722ea 100644
> > --- a/tests/prime_vgem.c
> > +++ b/tests/prime_vgem.c
> > @@ -846,14 +846,18 @@ igt_main
> > igt_subtest("basic-write")
> > test_write(vgem, i915);
> >
> > - igt_subtest("basic-gtt")
> > + igt_subtest("basic-gtt") {
> > + gem_require_mappable_ggtt(i915);
> > test_gtt(vgem, i915);
> > + }
>
> To me seems no reason to skip this.

Only I915_MMAP_OFFSET_GTT type of mmap-offset to a PRIME imported dma-buf
backed object is supported, other types are not, then the test can only
succeed if mappable aperture is available, otherwise it should be skipped.
This applies to all 3 subtests.

Thanks,
Janusz

> We could either unconditionally use
> device_coherent() or use mmap_gtt() if gtt is available else
> device_coherent()? Though probably the test would need to be renamed as
> test_device_coherent()?
>
> >
> > igt_subtest("shrink")
> > test_shrink(vgem, i915);
> >
> > - igt_subtest("coherency-gtt")
> > + igt_subtest("coherency-gtt") {
> > + gem_require_mappable_ggtt(i915);
> > test_gtt_interleaved(vgem, i915);
> > + }
>
> Probably similar situation here, though with WC instead of GTT the test
> should always pass?
>
> >
> > for (e = intel_execution_engines; e->name; e++) {
> > igt_subtest_f("%ssync-%s",
> > @@ -902,8 +906,10 @@ igt_main
> >
> > igt_subtest("basic-fence-read")
> > test_fence_read(i915, vgem);
> > - igt_subtest("basic-fence-mmap")
> > + igt_subtest("basic-fence-mmap") {
> > + gem_require_mappable_ggtt(i915);
> > test_fence_mmap(i915, vgem);
> > + }
>
> Once again, just use device_coherent()?