diff mbox series

[07/15] drm/i915: Markup potential lock for i915_active

Message ID 20190703091726.11690-7-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [01/15] drm/i915/selftests: Common live setup/teardown | expand

Commit Message

Chris Wilson July 3, 2019, 9:17 a.m. UTC
Make the lockchains more deterministic via i915_active by flagging the
potential lock.

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

Comments

Matthew Auld July 3, 2019, 10:38 a.m. UTC | #1
On 03/07/2019 10:17, Chris Wilson wrote:
> 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>
diff mbox series

Patch

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;