]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Move user fault tracking to a separate list
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 24 Oct 2016 12:42:14 +0000 (13:42 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 24 Oct 2016 12:45:35 +0000 (13:45 +0100)
commit4161c80f36cc19b2cc90fb4469be425a6f23706e
tree710f40b0ae09810630d61c3a82c883d5e6477b85
parent66a1fe18a724ab4585cc0ef021618ab9d325cbfb
drm/i915: Move user fault tracking to a separate list

We want to decouple RPM and struct_mutex, but currently RPM has to walk
the list of bound objects and remove userspace mmapping before we
suspend (otherwise userspace may continue to access the GTT whilst it is
powered down). This currently requires the struct_mutex to walk the
bound_list, but if we move that to a separate list and lock we can take
the first step towards removing the struct_mutex.

v2: Split runtime suspend unmapping vs regular unmapping, to make the
locking (and barriers) clearer. Add the object to the userfault_list
prior to inserting the first PTE, the race between add/revoke depends
upon struct_mutex for regular unmappings and rpm for runtime-suspend.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v1
Link: http://patchwork.freedesktop.org/patch/msgid/20161024124218.18252-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_evict.c
drivers/gpu/drm/i915/i915_gem_fence.c