From: Maarten Lankhorst <dev@lankhorst.se>
To: intel-xe@lists.freedesktop.org
Cc: Maarten Lankhorst <dev@lankhorst.se>,
Michal Wajdeczko <michal.wajdeczko@intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [PATCH v4 1/6] drm/xe: Only have a single drmm release action.
Date: Thu, 9 Oct 2025 15:52:20 +0200 [thread overview]
Message-ID: <20251009135221.712384-9-dev@lankhorst.se> (raw)
In-Reply-To: <20251009135221.712384-8-dev@lankhorst.se>
The broken action happened after ggtt_early_fini, so
it's safe to put the drain_workqueue in there instead of
creating a new place.
Fixes: 89d2835c3680 ("drm/xe: Process deferred GGTT node removals on device unwind")
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
---
drivers/gpu/drm/xe/xe_ggtt.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 7fdd0a97a6281..c2f23926b5a7b 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -179,6 +179,7 @@ static void ggtt_fini_early(struct drm_device *drm, void *arg)
{
struct xe_ggtt *ggtt = arg;
+ drain_workqueue(ggtt->wq);
destroy_workqueue(ggtt->wq);
mutex_destroy(&ggtt->lock);
drm_mm_takedown(&ggtt->mm);
@@ -239,13 +240,6 @@ int xe_ggtt_init_kunit(struct xe_ggtt *ggtt, u32 reserved, u32 size)
}
EXPORT_SYMBOL_IF_KUNIT(xe_ggtt_init_kunit);
-static void dev_fini_ggtt(void *arg)
-{
- struct xe_ggtt *ggtt = arg;
-
- drain_workqueue(ggtt->wq);
-}
-
/**
* xe_ggtt_init_early - Early GGTT initialization
* @ggtt: the &xe_ggtt to be initialized
@@ -298,10 +292,6 @@ int xe_ggtt_init_early(struct xe_ggtt *ggtt)
if (err)
return err;
- err = devm_add_action_or_reset(xe->drm.dev, dev_fini_ggtt, ggtt);
- if (err)
- return err;
-
if (IS_SRIOV_VF(xe)) {
err = xe_tile_sriov_vf_prepare_ggtt(ggtt->tile);
if (err)
--
2.51.0
next prev parent reply other threads:[~2025-10-09 13:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-09 13:52 [PATCH v4 0/6] drm/xe: Make struct xe_ggtt private Maarten Lankhorst
2025-10-09 13:52 ` Maarten Lankhorst [this message]
2025-10-09 13:52 ` [PATCH v4 2/6] drm/mm: Introduce address space shifting Maarten Lankhorst
2025-10-09 13:52 ` [PATCH v4 3/6] drm/xe: Start using ggtt->start in preparation of balloon removal Maarten Lankhorst
2025-10-09 13:52 ` [PATCH v4 4/6] drm/xe: Rewrite GGTT VF initialisation Maarten Lankhorst
2025-10-09 13:52 ` [PATCH v4 5/6] drm/xe: Convert xe_fb_pin to use a callback for insertion into GGTT Maarten Lankhorst
2025-10-09 13:52 ` [PATCH v4 6/6] drm/xe: Move struct xe_ggtt to xe_ggtt.c Maarten Lankhorst
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=20251009135221.712384-9-dev@lankhorst.se \
--to=dev@lankhorst.se \
--cc=intel-xe@lists.freedesktop.org \
--cc=michal.wajdeczko@intel.com \
--cc=rodrigo.vivi@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