From d650d1f5cfd7ca607dbbb2023b76c2afa873246a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 3 Jul 2019 10:17:18 +0100 Subject: [PATCH] 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 Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190703091726.11690-7-chris@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; -- GitLab