summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_active.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-07-03 10:17:18 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2019-07-03 12:23:56 +0100
commitd650d1f5cfd7ca607dbbb2023b76c2afa873246a (patch)
treeea5b2122de9c9a498e85f8be97f3f06f16c6b3ee /drivers/gpu/drm/i915/i915_active.c
parentc03467ba40f783ebe756114bb68e13a6b404c03a (diff)
downloadlinux-d650d1f5cfd7ca607dbbb2023b76c2afa873246a.tar.gz
linux-d650d1f5cfd7ca607dbbb2023b76c2afa873246a.tar.bz2
linux-d650d1f5cfd7ca607dbbb2023b76c2afa873246a.zip
drm/i915: Markup potential lock for i915_active
Make the lockchains more deterministic via i915_active by flagging the potential lock. 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/20190703091726.11690-7-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_active.c')
-rw-r--r--drivers/gpu/drm/i915/i915_active.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c
index 584b247df9bc..13f304a29fc8 100644
--- a/drivers/gpu/drm/i915/i915_active.c
+++ b/drivers/gpu/drm/i915/i915_active.c
@@ -268,6 +268,8 @@ int i915_active_wait(struct i915_active *ref)
int err;
might_sleep();
+ might_lock(&ref->mutex);
+
if (RB_EMPTY_ROOT(&ref->tree))
return 0;