aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2021-10-18 18:45:01 +0100
committerMatthew Auld <matthew.auld@intel.com>2021-10-20 16:50:17 +0100
commitf7858cb48bf8ee70e71933f1a354a666bb802e54 (patch)
tree7c8d109cd88b7c5116dfd2c9ba00f48a3bb85297
parentdrm/i915: mark dmabuf objects as ALLOC_USER (diff)
downloadlinux-dev-f7858cb48bf8ee70e71933f1a354a666bb802e54.tar.xz
linux-dev-f7858cb48bf8ee70e71933f1a354a666bb802e54.zip
drm/i915: mark userptr objects as ALLOC_USER
These are userspace objects, so mark them as such. In a later patch it's useful to determine how paranoid we need to be when managing cache flushes. In theory no functional changes. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211018174508.2137279-2-matthew.auld@intel.com
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_userptr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
index 8ea0fa665e53..887aca9e8dd2 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
@@ -546,7 +546,8 @@ i915_gem_userptr_ioctl(struct drm_device *dev,
return -ENOMEM;
drm_gem_private_object_init(dev, &obj->base, args->user_size);
- i915_gem_object_init(obj, &i915_gem_userptr_ops, &lock_class, 0);
+ i915_gem_object_init(obj, &i915_gem_userptr_ops, &lock_class,
+ I915_BO_ALLOC_USER);
obj->mem_flags = I915_BO_FLAG_STRUCT_PAGE;
obj->read_domains = I915_GEM_DOMAIN_CPU;
obj->write_domain = I915_GEM_DOMAIN_CPU;