intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: stable@vger.kernel.org, "Chris Wilson" <chris@chris-wilson.co.uk>,
	"Thomas Hellström" <thomas.hellstrom@intel.com>,
	"Nirmoy Das" <nirmoy.das@intel.com>
Subject: [Intel-gfx] [PATCH] drm/i915/active: Fix missing debug object activation
Date: Mon, 13 Mar 2023 12:46:13 +0100	[thread overview]
Message-ID: <20230313114613.9874-1-nirmoy.das@intel.com> (raw)
In-Reply-To: <20230313103045.8906-1-nirmoy.das@intel.com>

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.

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 <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@intel.com>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Cc: <stable@vger.kernel.org> # v5.10+
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_active.c | 3 +--
 1 file changed, 1 insertion(+), 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)
-- 
2.39.0


  parent reply	other threads:[~2023-03-13 11:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-13 10:30 [Intel-gfx] [PATCH v2] drm/i915/active: Fix missing debug object activation Nirmoy Das
2023-03-13 10:35 ` Janusz Krzysztofik
2023-03-13 11:46 ` Nirmoy Das [this message]
2023-03-13 13:13 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/active: Fix missing debug object activation (rev3) Patchwork
2023-03-13 17:53 ` [Intel-gfx] [PATCH v2] drm/i915/active: Fix missing debug object activation Andrzej Hajda
2023-03-14 14:43 ` [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/active: Fix missing debug object activation (rev3) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-03-10 14:11 [Intel-gfx] [PATCH] drm/i915/active: Fix missing debug object activation Nirmoy Das
2023-03-10 15:19 ` Janusz Krzysztofik
2023-03-10 16:48   ` Das, Nirmoy
2023-03-13  9:55     ` Janusz Krzysztofik
2023-03-13 10:33       ` Das, Nirmoy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230313114613.9874-1-nirmoy.das@intel.com \
    --to=nirmoy.das@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    --cc=thomas.hellstrom@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).