summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-06-06 12:23:20 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2019-06-06 12:51:13 +0100
commit155ab8836caa69579a97a02ccafee929091170b5 (patch)
tree4f79d92a3d91f2e46b184e6868929843f4647933 /drivers/gpu/drm/i915/i915_drv.h
parentaffa22b5f0f7e9caf61887671abe38819737bf16 (diff)
downloadlinux-stable-155ab8836caa69579a97a02ccafee929091170b5.tar.gz
linux-stable-155ab8836caa69579a97a02ccafee929091170b5.tar.bz2
linux-stable-155ab8836caa69579a97a02ccafee929091170b5.zip
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
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 89bf1e34feaa..dfe4b11ee423 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1899,10 +1899,12 @@ struct drm_i915_private {
} timelines;
struct list_head active_rings;
- struct list_head closed_vma;
struct intel_wakeref wakeref;
+ struct list_head closed_vma;
+ spinlock_t closed_lock; /* guards the list of closed_vma */
+
/**
* Is the GPU currently considered idle, or busy executing
* userspace requests? Whilst idle, we allow runtime power