From: Chris Wilson Date: Wed, 3 Jul 2019 09:17:18 +0000 (+0100) Subject: drm/i915: Markup potential lock for i915_active X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d650d1f5cfd7ca607dbbb2023b76c2afa873246a;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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;