summaryrefslogtreecommitdiff
path: root/tests/i915/gem_mmap_wc.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2021-06-24 11:14:14 +0200
committerAshutosh Dixit <ashutosh.dixit@intel.com>2021-06-24 11:17:53 -0700
commita306810ebbc8984bde38a57ef0c33eea394f4e18 (patch)
tree1fb0c1e67f451d2b096d432532818d6d4afefacd /tests/i915/gem_mmap_wc.c
parenta2e8c890845b6441d7b01f8afefa94a6fa4ee9e4 (diff)
i915: Handle the case where legacy mmap is not available, v2.
We will remove support for the legacy mmap ioctl, so handle that case without rewriting all tests. When the gem_mmap ioctl is not available, transparently fallback to mmap_offset. Changes since v1: - Skip gem_tiled_wc too, as it requires on legacy mmap behavior. (Ashutosh) - Remove fallback for __gem_mmap__gtt, it's already mmap_offset. (Ashutosh) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Diffstat (limited to 'tests/i915/gem_mmap_wc.c')
-rw-r--r--tests/i915/gem_mmap_wc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/i915/gem_mmap_wc.c b/tests/i915/gem_mmap_wc.c
index 7130a510..4fcf5478 100644
--- a/tests/i915/gem_mmap_wc.c
+++ b/tests/i915/gem_mmap_wc.c
@@ -504,6 +504,7 @@ igt_main
igt_fixture {
fd = drm_open_driver(DRIVER_INTEL);
+ igt_require(gem_has_legacy_mmap(fd));
gem_require_mmap_wc(fd);
}