[Intel-gfx] [PATCH i-g-t] i915/gem_mmap_gtt: Skip if we have no aperture and no mmap_gtt
Chris Wilson
chris at chris-wilson.co.uk
Tue Nov 5 14:51:27 UTC 2019
If the device does not expose an aperture for indirect access with
detiling functionality, the kernel rejects an attempt to create such a
mapping with -ENODEV. If the ioctl is not supported, we can skip all of
our mmap_gtt specific tests.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
Cc: Matthew Auld <matthew.auld at intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
---
tests/i915/gem_mmap_gtt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/i915/gem_mmap_gtt.c b/tests/i915/gem_mmap_gtt.c
index 91da5a37b..cfd99119a 100644
--- a/tests/i915/gem_mmap_gtt.c
+++ b/tests/i915/gem_mmap_gtt.c
@@ -1019,8 +1019,10 @@ igt_main
if (igt_run_in_simulation())
OBJECT_SIZE = 1 * 1024 * 1024;
- igt_fixture
+ igt_fixture {
fd = drm_open_driver(DRIVER_INTEL);
+ igt_require(mmap_ioctl(fd, &arg) != -ENODEV);
+ }
igt_subtest("bad-object") {
uint32_t real_handle = gem_create(fd, 4096);
--
2.24.0
More information about the Intel-gfx
mailing list