Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: "Bai, Zongyao" <zongyao.bai@intel.com>
Cc: "sashiko-reviews@lists.linux.dev"
	<sashiko-reviews@lists.linux.dev>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Subject: Re: [RESEND PATCH v3 2/3] drm/xe/forcewake: flush delayed release at power and teardown boundaries
Date: Wed, 2 Dec 2026 12:42:46 -0500	[thread overview]
Message-ID: <axBYlu6yNnmkOVrq@intel.com> (raw)
In-Reply-To: <IA3PR11MB013943985E300CE17464A568ECE04C2@IA3PR11MB013943.namprd11.prod.outlook.com>

On Wed, Dec 02, 2026 at 12:18:54AM +0000, Bai, Zongyao wrote:
> A new path of FLR is merged recently. it skips xe_gt_suspend(), 
> so the flush added here does not cover it. This series was based on an older
> drm-xe-next that did not have the PCIe FLR prepare/done path yet,
> which is why it was missed.
> 
> I will rebase on the current drm-xe-next and flush the delayed
> release in xe_gt_flr_prepare() before the reset, while MMIO is still
> accessible, so that no domain is left in delayed_domains across the
> FLR. I will also check that nothing can queue a new delayed release
> between the flush and xe_pci_reset_done().
> 
> This will be in v4.

Agree with this.

Next time, please avoid the RESEND tag, which adds nothing.

with that:

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

to the series.

> 
> Thanks,
> Zongyao
> 
> > -----Original Message-----
> > From: sashiko-bot@kernel.org <sashiko-bot@kernel.org>
> > Sent: Tuesday, December 1, 2026 3:25 PM
> > To: Bai, Zongyao <zongyao.bai@intel.com>; intel-xe@lists.freedesktop.org
> > Subject: Re: [RESEND PATCH v3 2/3] drm/xe/forcewake: flush delayed release
> > at power and teardown boundaries
> > 
> > Thank you for your contribution! Sashiko AI review found 1 potential issue to
> > consider:
> > - [Medium] drm/xe: missing xe_force_wake_flush() in xe_gt_flr_prepare()
> >   before PCIe FLR
> > --
> > 
> > commit 9c538d813afa70e3cd0f25e79eefb0e7519a510c
> > Author: Zongyao Bai <zongyao.bai@intel.com>
> > 
> > drm/xe/forcewake: flush delayed release at power and teardown boundaries
> > 
> > This commit adds xe_force_wake_flush() and xe_force_wake_stop() to cancel
> > delayed forcewake releases and put held domains to sleep across suspend,
> > shutdown, and device removal.
> > 
> > > diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> > > index 1d2fbb8a0de8d..9c8c315f63b24 100644
> > > --- a/drivers/gpu/drm/xe/xe_gt.c
> > > +++ b/drivers/gpu/drm/xe/xe_gt.c
> > > @@ -1058,7 +1058,7 @@ int xe_gt_suspend(struct xe_gt *gt)
> > >  	xe_gt_dbg(gt, "suspending\n");
> > >  	xe_gt_sanitize(gt);
> > >
> > > -	CLASS(xe_force_wake, fw_ref)(gt_to_fw(gt), XE_FORCEWAKE_ALL);
> > > +	CLASS(xe_force_wake_flush, fw_ref)(gt_to_fw(gt),
> > XE_FORCEWAKE_ALL);
> > >  	if (!xe_force_wake_ref_has_domain(fw_ref.domains,
> > XE_FORCEWAKE_ALL)) {
> > >  		xe_gt_err(gt, "suspend failed (%pe)\n", ERR_PTR(-
> > ETIMEDOUT));
> > >  		return -ETIMEDOUT;
> > 
> > [Severity: Medium]
> > Should xe_gt_flr_prepare() also call xe_force_wake_flush(gt_to_fw(gt))?
> > 
> > When xe_pci_reset_prepare() calls xe_device_suspend(xe, false, true), the flr
> > branch calls xe_gt_flr_prepare() instead of xe_gt_suspend():
> > 
> > drivers/gpu/drm/xe/xe_device.c:xe_device_suspend() {
> > 	...
> > 	if (flr) {
> > 		for_each_gt(gt, xe, id)
> > 			xe_gt_flr_prepare(gt);
> > 	} else {
> > 		...
> > 		for_each_gt(gt, xe, id) {
> > 			err = xe_gt_suspend(gt);
> > 	...
> > }
> > 
> > If a forcewake domain is in delayed hold when a PCIe FLR starts,
> > delayed_release_work can fire while MMIO is disabled during the reset and
> > trigger sleep ACK timeout warnings, or fw->delayed_domains can stay set
> > after the hardware FLR resets domains to sleep, causing
> > xe_force_wake_get() during post-FLR xe_device_resume() to reuse the
> > domain without waking it.
> > 
> > --
> > Sashiko AI review · https://sashiko.dev/#/patchset/20261201230744.680448-
> > 1-zongyao.bai@intel.com?part=2

  reply	other threads:[~2026-12-02 17:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 23:07 [RESEND PATCH v3 0/3] drm/xe/forcewake: add delayed release for engine-cycle queries Zongyao Bai
2026-12-01 23:07 ` [RESEND PATCH v3 1/3] drm/xe/forcewake: add delayed release with hysteresis Zongyao Bai
2026-12-01 23:30   ` sashiko-bot
2026-12-01 23:07 ` [RESEND PATCH v3 2/3] drm/xe/forcewake: flush delayed release at power and teardown boundaries Zongyao Bai
2026-12-01 23:24   ` sashiko-bot
2026-12-02  0:18     ` Bai, Zongyao
2026-12-02 17:42       ` Rodrigo Vivi [this message]
2026-12-01 23:07 ` [RESEND PATCH v3 3/3] drm/xe/query: use delayed forcewake release for engine-cycle queries Zongyao Bai

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=axBYlu6yNnmkOVrq@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=zongyao.bai@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