Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Shuicheng Lin <shuicheng.lin@intel.com>,
	<intel-xe@lists.freedesktop.org>,
	 John Harrison <John.C.Harrison@intel.com>
Subject: Re: [PATCH] drm/xe/pm: Restore display pm if there is error after display suspend
Date: Tue, 8 Jul 2025 16:08:19 -0400	[thread overview]
Message-ID: <aG16s9ngmKE4xR0t@intel.com> (raw)
In-Reply-To: <1094c4f1-3273-4832-b282-7489d938eb25@intel.com>

On Mon, Jul 07, 2025 at 09:11:41AM -0700, Daniele Ceraolo Spurio wrote:
> 
> 
> On 7/6/2025 6:58 PM, Shuicheng Lin wrote:
> > xe_bo_evict_all() is called after xe_display_pm_suspend(). So if there
> > is error with xe_bo_evict_all(), display pm should be restored.
> > 
> > Fixes: 51462211f4a9 ("drm/xe/pxp: add PXP PM support")
> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> > Cc: John Harrison <John.C.Harrison@Intel.com>
> > Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
> 
> If you look at 51462211f4a9, you'll see that before the PXP changes were
> added xe_display_pm_resume was only called from the error path of
> xe_gt_suspend (even though xe_bo_evict_all was already there), so I've kept
> that behavior when I added the PXP changes.
> That pre-PXP behavior is still present in the 6.12 LTS kernel, so if that's
> wrong it needs to be fixed there as well.
> 
> Looking at the history, it looks like the patch that moved the call to
> xe_display_pm_resume to before the evict_all without adjusting the error
> management was this one:
> cb8f81c17531 ("drm/xe/display: Make display suspend/resume work on
> discrete")
> 
> Given how different the code is, I don't know if it is better to send a
> separate patch for that to the stable tree, or to update the fixes tag on
> this one and send the separate patch when it fails to apply.
> 
> If you want to go with the former, this is:
> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> 
> But please also get an ack from someone on the display side to make sure
> this was not intentional.

not intentional. definitely a bug.

Instead of removing the fixes tag, I added an extra one. And pushed to
drm-xe-next.

Shuicheng whenever you receive a notification that the patch failed to apply
in some stable branch, please follow up sending a backported version directly
to the stable mailing list.

Thanks for the patch and review.

> 
> Daniele
> 
> > ---
> >   drivers/gpu/drm/xe/xe_pm.c | 3 +--
> >   1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
> > index ff749edc005b..bcfda545e74f 100644
> > --- a/drivers/gpu/drm/xe/xe_pm.c
> > +++ b/drivers/gpu/drm/xe/xe_pm.c
> > @@ -134,7 +134,7 @@ int xe_pm_suspend(struct xe_device *xe)
> >   	/* FIXME: Super racey... */
> >   	err = xe_bo_evict_all(xe);
> >   	if (err)
> > -		goto err_pxp;
> > +		goto err_display;
> >   	for_each_gt(gt, xe, id) {
> >   		err = xe_gt_suspend(gt);
> > @@ -151,7 +151,6 @@ int xe_pm_suspend(struct xe_device *xe)
> >   err_display:
> >   	xe_display_pm_resume(xe);
> > -err_pxp:
> >   	xe_pxp_pm_resume(xe->pxp);
> >   err:
> >   	drm_dbg(&xe->drm, "Device suspend failed %d\n", err);
> 

  parent reply	other threads:[~2025-07-08 20:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-07  1:58 [PATCH] drm/xe/pm: Restore display pm if there is error after display suspend Shuicheng Lin
2025-07-07  2:07 ` ✓ CI.KUnit: success for " Patchwork
2025-07-07 16:11 ` [PATCH] " Daniele Ceraolo Spurio
2025-07-08  2:36   ` Lin, Shuicheng
2025-07-08 20:08   ` Rodrigo Vivi [this message]
2025-07-09  0:54     ` Lin, Shuicheng
2025-07-08  3:54 ` [PATCH v2] " Shuicheng Lin
2025-07-08  4:01 ` ✓ CI.KUnit: success for drm/xe/pm: Restore display pm if there is error after display suspend (rev2) Patchwork
2025-07-08  4:42 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-08  5:50 ` ✗ Xe.CI.Full: failure " 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=aG16s9ngmKE4xR0t@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=John.C.Harrison@intel.com \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=shuicheng.lin@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