drm/i915: Move object close under its own lock
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 6 Jun 2019 11:23:20 +0000 (12:23 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 6 Jun 2019 11:51:13 +0000 (12:51 +0100)
commit155ab8836caa69579a97a02ccafee929091170b5
tree4f79d92a3d91f2e46b184e6868929843f4647933
parentaffa22b5f0f7e9caf61887671abe38819737bf16
drm/i915: Move object close under its own lock

Use i915_gem_object_lock() to guard the LUT and active reference to
allow us to break free of struct_mutex for handling GEM_CLOSE.

Testcase: igt/gem_close_race
Testcase: igt/gem_exec_parallel
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190606112320.9704-1-chris@chris-wilson.co.uk
13 files changed:
drivers/gpu/drm/i915/gem/i915_gem_context.c
drivers/gpu/drm/i915/gem/i915_gem_context_types.h
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
drivers/gpu/drm/i915/gem/i915_gem_object.c
drivers/gpu/drm/i915/gem/i915_gem_object_types.h
drivers/gpu/drm/i915/gem/selftests/mock_context.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_timeline.c
drivers/gpu/drm/i915/i915_vma.c
drivers/gpu/drm/i915/i915_vma.h
drivers/gpu/drm/i915/selftests/mock_gem_device.c