From: Matthew Auld <matthew.auld@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Matthew Brost <matthew.brost@intel.com>,
Nirmoy Das <nirmoy.das@intel.com>
Subject: [PATCH 2/2] drm/xe: fix unbalanced rpm put() with declare_wedged()
Date: Tue, 8 Oct 2024 11:47:25 +0100 [thread overview]
Message-ID: <20241008104723.98300-4-matthew.auld@intel.com> (raw)
In-Reply-To: <20241008104723.98300-3-matthew.auld@intel.com>
Technically the or_reset() means we call the action on failure, however
that would lead to unbalanced rpm put(). Move the get() earlier to fix
this. It should be extremely unlikely to ever trigger this in practice.
Fixes: 452bca0edbd0 ("drm/xe: Don't suspend device upon wedge")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Nirmoy Das <nirmoy.das@intel.com>
---
drivers/gpu/drm/xe/xe_device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index cd241a8e1838..962751c966d1 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -1016,13 +1016,13 @@ void xe_device_declare_wedged(struct xe_device *xe)
return;
}
+ xe_pm_runtime_get_noresume(xe);
+
if (drmm_add_action_or_reset(&xe->drm, xe_device_wedged_fini, xe)) {
drm_err(&xe->drm, "Failed to register xe_device_wedged_fini clean-up. Although device is wedged.\n");
return;
}
- xe_pm_runtime_get_noresume(xe);
-
if (!atomic_xchg(&xe->wedged.flag, 1)) {
xe->needs_flr_on_fini = true;
drm_err(&xe->drm,
--
2.46.2
next prev parent reply other threads:[~2024-10-08 10:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 10:47 [PATCH 1/2] drm/xe: fix unbalanced rpm put() with fence_fini() Matthew Auld
2024-10-08 10:47 ` Matthew Auld [this message]
2024-10-08 17:14 ` [PATCH 2/2] drm/xe: fix unbalanced rpm put() with declare_wedged() Matthew Brost
2024-10-08 10:53 ` ✓ CI.Patch_applied: success for series starting with [1/2] drm/xe: fix unbalanced rpm put() with fence_fini() Patchwork
2024-10-08 10:53 ` ✓ CI.checkpatch: " Patchwork
2024-10-08 10:54 ` ✓ CI.KUnit: " Patchwork
2024-10-08 11:06 ` ✓ CI.Build: " Patchwork
2024-10-08 11:08 ` ✓ CI.Hooks: " Patchwork
2024-10-08 11:10 ` ✓ CI.checksparse: " Patchwork
2024-10-08 11:33 ` ✓ CI.BAT: " Patchwork
2024-10-08 17:13 ` [PATCH 1/2] " Matthew Brost
2024-10-09 7:51 ` Matthew Auld
2024-10-08 18:11 ` ✗ CI.FULL: failure for series starting with [1/2] " Patchwork
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=20241008104723.98300-4-matthew.auld@intel.com \
--to=matthew.auld@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=nirmoy.das@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