From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
John Harrison <John.C.Harrison@Intel.com>,
Alan Previn <alan.previn.teres.alexis@intel.com>
Subject: [PATCH 3/3] drm/xe/uc: Use devm to register cleanup that includes exec_queues
Date: Fri, 9 Aug 2024 16:12:37 -0700 [thread overview]
Message-ID: <20240809231237.1503796-4-daniele.ceraolospurio@intel.com> (raw)
In-Reply-To: <20240809231237.1503796-1-daniele.ceraolospurio@intel.com>
Exec_queue cleanup requires HW access, so we need to use devm instead of
drmm for it.
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
---
drivers/gpu/drm/xe/xe_gsc.c | 4 ++--
drivers/gpu/drm/xe/xe_guc_submit.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_gsc.c b/drivers/gpu/drm/xe/xe_gsc.c
index b84f2e020c8c..9614d9e6617e 100644
--- a/drivers/gpu/drm/xe/xe_gsc.c
+++ b/drivers/gpu/drm/xe/xe_gsc.c
@@ -437,7 +437,7 @@ int xe_gsc_init(struct xe_gsc *gsc)
return ret;
}
-static void free_resources(struct drm_device *drm, void *arg)
+static void free_resources(void *arg)
{
struct xe_gsc *gsc = arg;
@@ -495,7 +495,7 @@ int xe_gsc_init_post_hwconfig(struct xe_gsc *gsc)
gsc->q = q;
gsc->wq = wq;
- err = drmm_add_action_or_reset(&xe->drm, free_resources, gsc);
+ err = devm_add_action_or_reset(xe->drm.dev, free_resources, gsc);
if (err)
return err;
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 460808507947..2adf551500cb 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -284,7 +284,7 @@ static void guc_submit_fini(struct drm_device *drm, void *arg)
free_submit_wq(guc);
}
-static void guc_submit_wedged_fini(struct drm_device *drm, void *arg)
+static void guc_submit_wedged_fini(void *arg)
{
struct xe_guc *guc = arg;
struct xe_exec_queue *q;
@@ -877,7 +877,7 @@ void xe_guc_submit_wedge(struct xe_guc *guc)
xe_gt_assert(guc_to_gt(guc), guc_to_xe(guc)->wedged.mode);
- err = drmm_add_action_or_reset(&guc_to_xe(guc)->drm,
+ err = devm_add_action_or_reset(guc_to_xe(guc)->drm.dev,
guc_submit_wedged_fini, guc);
if (err) {
drm_err(&xe->drm, "Failed to register xe_guc_submit clean-up on wedged.mode=2. Although device is wedged.\n");
--
2.43.0
next prev parent reply other threads:[~2024-08-09 23:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-09 23:12 [PATCH 0/3] uC-related drmm vs devm fixes Daniele Ceraolo Spurio
2024-08-09 23:12 ` [PATCH 1/3] drm/xe: use devm instead of drmm for managed bo Daniele Ceraolo Spurio
2024-08-10 4:39 ` Lucas De Marchi
2024-08-12 10:41 ` Matthew Auld
2024-08-12 16:38 ` Daniele Ceraolo Spurio
2024-08-12 18:17 ` Matthew Auld
2024-08-12 18:43 ` Daniele Ceraolo Spurio
2024-08-09 23:12 ` [PATCH 2/3] drm/xe/uc: Use managed bo for HuC and GSC objects Daniele Ceraolo Spurio
2024-08-15 20:00 ` Lucas De Marchi
2024-08-15 20:44 ` Daniele Ceraolo Spurio
2024-08-09 23:12 ` Daniele Ceraolo Spurio [this message]
2024-08-09 23:46 ` [PATCH 0/3] uC-related drmm vs devm fixes Matthew Brost
2024-08-10 0:06 ` ✓ CI.Patch_applied: success for " Patchwork
2024-08-10 0:06 ` ✓ CI.checkpatch: " Patchwork
2024-08-10 0:07 ` ✓ CI.KUnit: " Patchwork
2024-08-10 0:24 ` ✓ CI.Build: " Patchwork
2024-08-10 0:29 ` ✓ CI.Hooks: " Patchwork
2024-08-10 0:31 ` ✓ CI.checksparse: " Patchwork
2024-08-10 0:52 ` ✗ CI.BAT: failure " Patchwork
2024-08-10 3:44 ` ✗ CI.FULL: " 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=20240809231237.1503796-4-daniele.ceraolospurio@intel.com \
--to=daniele.ceraolospurio@intel.com \
--cc=John.C.Harrison@Intel.com \
--cc=alan.previn.teres.alexis@intel.com \
--cc=intel-xe@lists.freedesktop.org \
/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