From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Maarten Lankhorst <dev@lankhorst.se>, <intel-xe@lists.freedesktop.org>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v5 1/6] drm/xe: Only have a single drmm release action.
Date: Fri, 10 Oct 2025 14:14:32 +0200 [thread overview]
Message-ID: <cf28a7e3-5924-4d34-a8cd-6908dca5fe6f@intel.com> (raw)
In-Reply-To: <20251010120655.1046007-9-dev@lankhorst.se>
On 10/10/2025 2:06 PM, Maarten Lankhorst wrote:
> 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 aca7ae5489b91..33b09737ccba8 100644
> --- a/drivers/gpu/drm/xe/xe_ggtt.c
> +++ b/drivers/gpu/drm/xe/xe_ggtt.c
> @@ -199,6 +199,7 @@ static void ggtt_fini_early(struct drm_device *drm, void *arg)
> {
> struct xe_ggtt *ggtt = arg;
>
> + drain_workqueue(ggtt->wq);
as said earlier, drain() will be implicitly called by the below destroy() so moving it here is a nop
and in some cases (at least in the past) the draining here, in "drmm" action, was just too late,
and that's why drain() was moved to separate "devm" action that was called while required devm data was still available
if this is broken now, please attach dmesg/crash log to better understand the case
> destroy_workqueue(ggtt->wq);
> drm_mm_takedown(&ggtt->mm);
> }
> @@ -246,13 +247,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
> @@ -305,10 +299,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)
next prev parent reply other threads:[~2025-10-10 12:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 12:06 [PATCH v5 0/6] drm/xe: Make struct xe_ggtt private Maarten Lankhorst
2025-10-10 12:06 ` [PATCH v5 1/6] drm/xe: Only have a single drmm release action Maarten Lankhorst
2025-10-10 12:14 ` Michal Wajdeczko [this message]
2025-10-10 13:15 ` Maarten Lankhorst
2025-10-10 12:06 ` [PATCH v5 2/6] drm/mm: Introduce address space shifting Maarten Lankhorst
2025-10-10 12:06 ` [PATCH v5 3/6] drm/xe: Start using ggtt->start in preparation of balloon removal Maarten Lankhorst
2025-10-10 12:54 ` Michal Wajdeczko
2025-10-10 12:07 ` [PATCH v5 4/6] drm/xe: Rewrite GGTT VF initialisation Maarten Lankhorst
2025-10-10 15:00 ` Michal Wajdeczko
2025-10-10 15:34 ` Matthew Brost
2025-10-10 12:07 ` [PATCH v5 5/6] drm/xe: Convert xe_fb_pin to use a callback for insertion into GGTT Maarten Lankhorst
2025-10-10 12:07 ` [PATCH v5 6/6] drm/xe: Move struct xe_ggtt to xe_ggtt.c Maarten Lankhorst
2025-10-10 15:05 ` Michal Wajdeczko
2025-10-13 17:54 ` Maarten Lankhorst
2025-10-10 13:30 ` ✗ CI.checkpatch: warning for drm/xe: Make struct xe_ggtt private. (rev5) Patchwork
2025-10-10 13:32 ` ✓ CI.KUnit: success " Patchwork
2025-10-10 13:50 ` ✗ CI.checksparse: warning " Patchwork
2025-10-10 14:14 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-10-10 18:57 ` ✗ Xe.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=cf28a7e3-5924-4d34-a8cd-6908dca5fe6f@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=dev@lankhorst.se \
--cc=intel-xe@lists.freedesktop.org \
--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