summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2022-02-21 14:16:20 +0000
committerMatthew Auld <matthew.auld@intel.com>2022-06-30 12:52:55 +0100
commit3cf110f8dcd1f4f02cf84339664b413abdaebf7d (patch)
tree6a9ebeca5ea1dfe0848f6fee23411281e43e48fb
parenta37715356a5caa93d1d5e2372507f79a00fd57c5 (diff)
lib/i915: request CPU_ACCESS for fb objects
kms_frontbuffer_tracking@basic falls over if the fb needs to be migrated from non-mappable device memory, to the mappable part, due to being temporarily pinned for scanout, when hitting the CPU fault handler, which just gives us SIGBUS. If the device has a small BAR let's attempt to use the mappable portion, if possible. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
-rw-r--r--lib/ioctl_wrappers.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 09eb3ce7..7713e78b 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -635,7 +635,8 @@ uint32_t gem_buffer_create_fb_obj(int fd, uint64_t size)
uint32_t handle;
if (gem_has_lmem(fd))
- handle = gem_create_in_memory_regions(fd, size, REGION_LMEM(0));
+ handle = gem_create_with_cpu_access_in_memory_regions(fd, size,
+ REGION_LMEM(0));
else
handle = gem_create(fd, size);