]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/i915: Introduce i915_address_space.mutex
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 11 Jul 2018 07:36:02 +0000 (08:36 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 11 Jul 2018 12:56:16 +0000 (13:56 +0100)
commit19bb33c756edee5e3f0fb126895f6ec23e60dd08
treebe49d2cc2a5e0b875feff52382b5555643a7b462
parent185441e03aa9dde9fb99e6a015441fc9b312d2ef
drm/i915: Introduce i915_address_space.mutex

Add a mutex into struct i915_address_space to be used while operating on
the vma and their lists for a particular vm. As this may be called from
the shrinker, we taint the mutex with fs_reclaim so that from the start
lockdep warns us if we are caught holding the mutex across an
allocation. (With such small steps we will eventually rid ourselves of
struct_mutex recursion!)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180711073608.20286-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_gem_gtt.h
drivers/gpu/drm/i915/i915_gem_shrinker.c