summaryrefslogtreecommitdiff
path: root/tests/i915
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2022-01-05 17:21:06 +0000
committerAshutosh Dixit <ashutosh.dixit@intel.com>2022-01-05 18:02:22 -0800
commit6e009504d5f7cc39866191e4bff813a4512c3e9b (patch)
tree1c298c8ac0667f0bd5801c5114d414a48ec6d968 /tests/i915
parent9dbaa0d5be7a859cda9b7d54c20ba96a596f43bd (diff)
tests/i915/userptr: fix mapping type
We need to use the FIXED mapping type on discrete platforms. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Priyanka Dandamudi <priyanka.dandamudi@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Diffstat (limited to 'tests/i915')
-rw-r--r--tests/i915/gem_userptr_blits.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/i915/gem_userptr_blits.c b/tests/i915/gem_userptr_blits.c
index 3464db66..a4dca4c0 100644
--- a/tests/i915/gem_userptr_blits.c
+++ b/tests/i915/gem_userptr_blits.c
@@ -2185,7 +2185,10 @@ static void test_probe(int fd)
*/
memset(&mmap_offset, 0, sizeof(mmap_offset));
mmap_offset.handle = gem_create(fd, PAGE_SIZE);
- mmap_offset.flags = I915_MMAP_OFFSET_WB;
+ if (gem_has_lmem(fd))
+ mmap_offset.flags = I915_MMAP_OFFSET_FIXED;
+ else
+ mmap_offset.flags = I915_MMAP_OFFSET_WB;
igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_I915_GEM_MMAP_OFFSET, &mmap_offset), 0);
for (unsigned long pass = 0; pass < 4 * 4 * 4 * 4 * 4; pass++) {