From: Matthew Brost <matthew.brost@intel.com>
To: intel-xe@lists.freedesktop.org
Subject: [PATCH v2 1/6] drm/xe: Move ggtt_fini to devm managed
Date: Tue, 20 Aug 2024 10:29:53 -0700 [thread overview]
Message-ID: <20240820172958.1095143-2-matthew.brost@intel.com> (raw)
In-Reply-To: <20240820172958.1095143-1-matthew.brost@intel.com>
ggtt->scratch is destroyed via devm, ggtt_fini sets ggtt->scratch to
NULL, ggtt->scratch in GGTT clears, so ensure ggtt->scratch is set NULL
before the BO is destroyed.
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
drivers/gpu/drm/xe/xe_ggtt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 0cdbc1296e88..21cc9ffcef1c 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -132,7 +132,7 @@ static void ggtt_fini_early(struct drm_device *drm, void *arg)
drm_mm_takedown(&ggtt->mm);
}
-static void ggtt_fini(struct drm_device *drm, void *arg)
+static void ggtt_fini(void *arg)
{
struct xe_ggtt *ggtt = arg;
@@ -289,7 +289,7 @@ int xe_ggtt_init(struct xe_ggtt *ggtt)
xe_ggtt_initial_clear(ggtt);
- return drmm_add_action_or_reset(&xe->drm, ggtt_fini, ggtt);
+ return devm_add_action_or_reset(xe->drm.dev, ggtt_fini, ggtt);
err:
ggtt->scratch = NULL;
return err;
--
2.34.1
next prev parent reply other threads:[~2024-08-20 17:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 17:29 [PATCH v2 0/6] Driver load failure fixes Matthew Brost
2024-08-20 17:29 ` Matthew Brost [this message]
2024-08-23 13:43 ` [PATCH v2 1/6] drm/xe: Move ggtt_fini to devm managed Lucas De Marchi
2024-08-20 17:29 ` [PATCH v2 2/6] drm/xe: Set firmware state to loadable before registering guc_fini_hw Matthew Brost
2024-08-20 21:04 ` Lucas De Marchi
2024-08-20 17:29 ` [PATCH v2 3/6] drm/xe: Drop warn on xe_guc_pc_gucrc_disable in guc pc fini Matthew Brost
2024-08-20 18:02 ` Randhawa, Jagmeet
2024-08-20 17:29 ` [PATCH v2 4/6] drm/xe: Move hw_engine_fini to devm managed Matthew Brost
2024-08-20 20:48 ` Lucas De Marchi
2024-08-20 17:29 ` [PATCH v2 5/6] drm/xe: Move HuC init before GuC init Matthew Brost
2024-08-20 20:42 ` Lucas De Marchi
2024-08-20 21:02 ` Matthew Brost
2024-08-20 17:29 ` [PATCH v2 6/6] drm/xe: Update xe_sa to use xe_managed_bo_create_pin_map Matthew Brost
2024-08-20 21:07 ` Lucas De Marchi
2024-08-20 19:07 ` ✓ CI.Patch_applied: success for Driver load failure fixes Patchwork
2024-08-20 19:07 ` ✓ CI.checkpatch: " Patchwork
2024-08-20 19:09 ` ✓ CI.KUnit: " Patchwork
2024-08-20 19:20 ` ✓ CI.Build: " Patchwork
2024-08-20 19:23 ` ✓ CI.Hooks: " Patchwork
2024-08-20 19:24 ` ✓ CI.checksparse: " Patchwork
2024-08-20 19:46 ` ✗ CI.BAT: failure " Patchwork
2024-08-21 2:05 ` ✗ 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=20240820172958.1095143-2-matthew.brost@intel.com \
--to=matthew.brost@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