[igt-dev] [PATCH i-g-t] tests/i915/gem_tiled_.*blits: skip the tests on newer gens
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Fri Jan 31 07:02:42 UTC 2020
On Thu, Jan 30, 2020 at 03:35:24PM +0000, Chris Wilson wrote:
> Quoting Zbigniew Kempczyński (2020-01-30 15:17:57)
> > Skip the tests on newer gens when no fences are available
> > and gem_set_tiling() cannot succeed.
> >
> > Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> > Cc: Chris Wilson <chris at chris-wilson.co.uk>
> > ---
> > tests/i915/gem_tiled_blits.c | 1 +
> > tests/i915/gem_tiled_fence_blits.c | 1 +
> > 2 files changed, 2 insertions(+)
> >
> > diff --git a/tests/i915/gem_tiled_blits.c b/tests/i915/gem_tiled_blits.c
> > index df0699f3..ba0920da 100644
> > --- a/tests/i915/gem_tiled_blits.c
> > +++ b/tests/i915/gem_tiled_blits.c
> > @@ -204,6 +204,7 @@ igt_main
> > fd = drm_open_driver(DRIVER_INTEL);
> > igt_require_gem(fd);
> > gem_require_blitter(fd);
> > + gem_require_mappable_ggtt(fd);
>
> Well, I can think of a use for this for testing implicit HW tiling
> across the aperture thrashing...
If I good understand for all objects configured as tiled (X in this case)
each time blitter command will be executed appropriate fences will be
configured even they are not used for gen4+. So test configures this
ggtt space and fences but is really not used for gen4+. Even check_bo()
is performed after blitting to linear space which also doesn't use any
fence here.
So we depend on libdrm set_tiling/get_tiling internally but test name
just suggests we want to perform tiling blits operations (not exercising
the aperture). For newer gen we can prepare blitter commands to make
a loop linear -> x -> y -> yf -> x -> y -> linear and check does a
loop is idempotent at the end. This require rewrite the test completely
to make it similar to gem_tiled_fence_blits which just is libdrm
independent.
Test name is confusing for me, it strongly suggest it was written
for doing tiled blits, but internally it tests aperture trashing.
>
> > bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
> > drm_intel_bufmgr_gem_enable_reuse(bufmgr);
> > diff --git a/tests/i915/gem_tiled_fence_blits.c b/tests/i915/gem_tiled_fence_blits.c
> > index 93c79dc2..62fd1328 100644
> > --- a/tests/i915/gem_tiled_fence_blits.c
> > +++ b/tests/i915/gem_tiled_fence_blits.c
> > @@ -214,6 +214,7 @@ igt_main
> > fd = drm_open_driver(DRIVER_INTEL);
> > igt_require_gem(fd);
> > gem_require_blitter(fd);
> > + gem_require_mappable_ggtt(fd);
>
> but this is targeting the fence above and beyond the gem_tiled_blits.
Here at least we don't depend on libdrm, do similar things to gem_tiled_blits,
but we're verifying data through gtt mapping.
>
> Sweeten the changelog by describing how you write a selftest to verify
> the implicit HW tiling independently of fence registers.
> -Chris
I think idempotency loop test described above + additional operations
not possible in userspace can be written.
--
Zbigniew
More information about the igt-dev
mailing list