]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Never allow userptr into the new mapping types
authorJanusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Tue, 4 Feb 2020 16:23:02 +0000 (16:23 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 8 Feb 2020 11:26:03 +0000 (11:26 +0000)
commit29f08ba9878cea5f2d5c09e98971deccde3fd8c1
treeb8480ef7ff6335cb3b34d42be4c3ebcbb7ad5b7a
parentaef7758b70abf8b799c38af43ea3ecfd3f08e37c
drm/i915: Never allow userptr into the new mapping types

Commit 59eb8eef948b ("drm/i915/userptr: Never allow userptr into the
mappable GGTT") made I915_GEM_MMAP_GTT IOCTLs to fail when attempted
on a userptr object in order to protect from a lockdep splat.  Later
on, new mapping types were introduced by commit 1798fee1aa68
("drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET").  Those new mapping
types suffer from the same lockdep splat issue but they now succeed
when tried on top of a userptr object.  Fix it.

v2: Don't play with the -ENODEV driver response (Chris)

Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200204162302.1299516-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_mman.c
drivers/gpu/drm/i915/gem/i915_gem_object.h
drivers/gpu/drm/i915/gem/i915_gem_object_types.h
drivers/gpu/drm/i915/gem/i915_gem_userptr.c
drivers/gpu/drm/i915/i915_gem.c