[igt-dev] [PATCH i-g-t v2] tests/i915/gem_set_tiling_vs_pwrite: disable test on gens without fences

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Tue Feb 4 17:14:28 UTC 2020


Add fences check required to properly do set-tiling on bo. We also
don't require ggtt mapping because coherent mapping is enough.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/i915/gem_set_tiling_vs_pwrite.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/i915/gem_set_tiling_vs_pwrite.c b/tests/i915/gem_set_tiling_vs_pwrite.c
index 25a28191..09da3ad6 100644
--- a/tests/i915/gem_set_tiling_vs_pwrite.c
+++ b/tests/i915/gem_set_tiling_vs_pwrite.c
@@ -55,12 +55,14 @@ igt_simple_main
 	uint32_t handle;
 
 	fd = drm_open_driver(DRIVER_INTEL);
+	igt_require(gem_available_fences(fd) > 0);
 
 	for (i = 0; i < OBJECT_SIZE/4; i++)
 		data[i] = i;
 
 	handle = gem_create(fd, OBJECT_SIZE);
-	ptr = gem_mmap__gtt(fd, handle, OBJECT_SIZE, PROT_READ | PROT_WRITE);
+	ptr = gem_mmap__device_coherent(fd, handle, 0, OBJECT_SIZE,
+					PROT_READ | PROT_WRITE);
 
 	gem_set_tiling(fd, handle, I915_TILING_X, TEST_STRIDE);
 
-- 
2.23.0



More information about the igt-dev mailing list