[Intel-gfx] [PATCH 2/4] drm/i915: Markup potential lock for i915_active

Chris Wilson chris at chris-wilson.co.uk
Tue Jul 2 13:25:04 UTC 2019


Make the lockchains more deterministic via i915_active by flagging the
potential lock.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_active.c | 2 ++
 1 file changed, 2 insertions(+)

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;
 
-- 
2.20.1



More information about the Intel-gfx mailing list