[igt-dev] [PATCH i-g-t] tests/prime_vgem: Skip basic-read/write subtests if no mappable GGTT

Janusz Krzysztofik janusz.krzysztofik at linux.intel.com
Wed Nov 20 15:32:19 UTC 2019


As we've agreed that using I915_GEM_PREAD/PWRITE IOCTLs on dma-buf
objects doesn't make much sense, we are not going to extend their
handlers in the i915 driver with new processing paths required for them
to work correctly with dma-buf objects on future hardware with no
mappable aperture.  When running on that kind of hardware, just skip
subtests which use those IOCTLs.

Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
Cc: Daniel Vetter <daniel at ffwll.ch>
Cc: Joonas Lahtinen <joonas.lahtinen at intel.com>
---
 tests/prime_vgem.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c
index 2b21ff41..b7bbd989 100644
--- a/tests/prime_vgem.c
+++ b/tests/prime_vgem.c
@@ -37,6 +37,8 @@ static void test_read(int vgem, int i915)
 	uint32_t *ptr;
 	int dmabuf, i;
 
+	gem_require_mappable_ggtt(i915);
+
 	scratch.width = 1024;
 	scratch.height = 1024;
 	scratch.bpp = 32;
@@ -69,6 +71,8 @@ static void test_fence_read(int i915, int vgem)
 	int dmabuf, i;
 	int master[2], slave[2];
 
+	gem_require_mappable_ggtt(i915);
+
 	igt_assert(pipe(master) == 0);
 	igt_assert(pipe(slave) == 0);
 
@@ -182,6 +186,8 @@ static void test_write(int vgem, int i915)
 	uint32_t *ptr;
 	int dmabuf, i;
 
+	gem_require_mappable_ggtt(i915);
+
 	scratch.width = 1024;
 	scratch.height = 1024;
 	scratch.bpp = 32;
-- 
2.21.0



More information about the igt-dev mailing list