aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirmoy Das <[email protected]>2023-03-14 15:29:14 +0100
committerJani Nikula <[email protected]>2023-03-20 11:00:22 +0200
commite92eb246feb9019b0b137706c934b8891cdfe3c2 (patch)
treebd5da1dc65b5fe3d48ea0eaa2a9cd4bc0641f7ce
parent8df23e4c4f72f4e201c28e6fb0a67e2dbf30628a (diff)
drm/i915/active: Fix missing debug object activation
debug_active_activate() expected ref->count to be zero which is not true anymore as __i915_active_activate() calls debug_active_activate() after incrementing the count. v2: No need to check for "ref->count == 1" as __i915_active_activate() already make sure of that(Janusz). References: https://gitlab.freedesktop.org/drm/intel/-/issues/6733 Fixes: 04240e30ed06 ("drm/i915: Skip taking acquire mutex for no ref->active callback") Cc: Chris Wilson <[email protected]> Cc: Tvrtko Ursulin <[email protected]> Cc: Thomas Hellström <[email protected]> Cc: Andi Shyti <[email protected]> Cc: [email protected] Cc: Janusz Krzysztofik <[email protected]> Cc: <[email protected]> # v5.10+ Signed-off-by: Nirmoy Das <[email protected]> Reviewed-by: Janusz Krzysztofik <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit bfad380c542438a9b642f8190b7fd37bc77e2723) Signed-off-by: Jani Nikula <[email protected]>
-rw-r--r--drivers/gpu/drm/i915/i915_active.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c
index a9fea115f2d2..8ef93889061a 100644
--- a/drivers/gpu/drm/i915/i915_active.c
+++ b/drivers/gpu/drm/i915/i915_active.c
@@ -92,8 +92,7 @@ static void debug_active_init(struct i915_active *ref)
static void debug_active_activate(struct i915_active *ref)
{
lockdep_assert_held(&ref->tree_lock);
- if (!atomic_read(&ref->count)) /* before the first inc */
- debug_object_activate(ref, &active_debug_desc);
+ debug_object_activate(ref, &active_debug_desc);
}
static void debug_active_deactivate(struct i915_active *ref)