[Intel-gfx] [PATCH] igt/gem_tiled_wc: Exercise wc mmaps with swizzling
Chris Wilson
chris at chris-wilson.co.uk
Tue Nov 4 10:50:36 CET 2014
On Tue, Nov 04, 2014 at 10:43:23AM +0100, Daniel Vetter wrote:
> > + switch (swizzle) {
> > + case I915_BIT_6_SWIZZLE_NONE:
> > + swizzled_offset = j;
> > + swizzle_str = "none";
> > + break;
> > + case I915_BIT_6_SWIZZLE_9:
> > + swizzled_offset = j ^
> > + swizzle_bit(9, j);
> > + swizzle_str = "bit9";
> > + break;
> > + case I915_BIT_6_SWIZZLE_9_10:
> > + swizzled_offset = j ^
> > + swizzle_bit(9, j) ^
> > + swizzle_bit(10, j);
> > + swizzle_str = "bit9^10";
> > + break;
> > + case I915_BIT_6_SWIZZLE_9_11:
> > + swizzled_offset = j ^
> > + swizzle_bit(9, j) ^
> > + swizzle_bit(11, j);
> > + swizzle_str = "bit9^11";
> > + break;
> > + case I915_BIT_6_SWIZZLE_9_10_11:
> > + swizzled_offset = j ^
> > + swizzle_bit(9, j) ^
> > + swizzle_bit(10, j) ^
> > + swizzle_bit(11, j);
> > + swizzle_str = "bit9^10^11";
> > + break;
>
> I think an explicit list of all the bit17 swizzle modes we know about with
> an igt_skip("bit17 swizzling") should be here. Otherwise the test will
> fail. Otherwise lgtm.
bit17 swizzling will trigger an igt_require() earlier on in get_tiling.
But yeah, we should skip an unknown swizzle rather than fail.
For Thomas,
/** @file gem_tiled_wc.c
*
* This is a test of write-combining mmap's behavior on tiled objects
* with respect to the reported swizzling value.
*
* The goal is to exercise the complications that arise when using a linear
* view of a tiled object that is subject to hardware swizzling. This is
* useful to check that we are presenting the correct view of the object
* to userspace, and that userspace has to respect the swizzle.
*/
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list