diff mbox series

[i-g-t,v2] i915/gem_tiled_pread: Skip on unknown swizzling

Message ID 20190111135400.23246-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [i-g-t,v2] i915/gem_tiled_pread: Skip on unknown swizzling | expand

Commit Message

Chris Wilson Jan. 11, 2019, 1:54 p.m. UTC
If we do not know the underlying swizzle on the HW, we do not know the
full tiling pattern and cannot predict the expected results. This is
often because the swizzle varies between pages and is not as constant as
we naively expected.

v2: gem_get_tiling() does the physical==reported check, we just need to
add an acquire

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: <tvrtko.ursulin@linux.intel.com>
---
 tests/i915/gem_tiled_pread_pwrite.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tvrtko Ursulin Jan. 11, 2019, 2 p.m. UTC | #1
On 11/01/2019 13:54, Chris Wilson wrote:
> If we do not know the underlying swizzle on the HW, we do not know the
> full tiling pattern and cannot predict the expected results. This is
> often because the swizzle varies between pages and is not as constant as
> we naively expected.
> 
> v2: gem_get_tiling() does the physical==reported check, we just need to
> add an acquire
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: <tvrtko.ursulin@linux.intel.com>
> ---
>   tests/i915/gem_tiled_pread_pwrite.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/i915/gem_tiled_pread_pwrite.c b/tests/i915/gem_tiled_pread_pwrite.c
> index 313daa388..fcf0780af 100644
> --- a/tests/i915/gem_tiled_pread_pwrite.c
> +++ b/tests/i915/gem_tiled_pread_pwrite.c
> @@ -122,7 +122,7 @@ igt_simple_main
>   		current_tiling_mode = I915_TILING_X;
>   
>   		handle = create_bo_and_fill(fd);
> -		gem_get_tiling(fd, handle, &tiling, &swizzle);
> +		igt_require(gem_get_tiling(fd, handle, &tiling, &swizzle));
>   
>   		gem_read(fd, handle, 0, linear, sizeof(linear));
>   
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
diff mbox series

Patch

diff --git a/tests/i915/gem_tiled_pread_pwrite.c b/tests/i915/gem_tiled_pread_pwrite.c
index 313daa388..fcf0780af 100644
--- a/tests/i915/gem_tiled_pread_pwrite.c
+++ b/tests/i915/gem_tiled_pread_pwrite.c
@@ -122,7 +122,7 @@  igt_simple_main
 		current_tiling_mode = I915_TILING_X;
 
 		handle = create_bo_and_fill(fd);
-		gem_get_tiling(fd, handle, &tiling, &swizzle);
+		igt_require(gem_get_tiling(fd, handle, &tiling, &swizzle));
 
 		gem_read(fd, handle, 0, linear, sizeof(linear));