Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: "Upadhyay, Tejas" <tejas.upadhyay@intel.com>
Cc: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe/display: Remove hpd cancel work sync from runtime pm path
Date: Fri, 14 Feb 2025 20:58:41 +0200	[thread overview]
Message-ID: <Z6-SYUaiQIXmsATl@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <SJ1PR11MB620460FFCB4F6B7B9786392881FF2@SJ1PR11MB6204.namprd11.prod.outlook.com>

On Thu, Feb 13, 2025 at 03:04:44PM +0200, Upadhyay, Tejas wrote:
> 
> 
> > -----Original Message-----
> > From: Intel-xe <intel-xe-bounces@lists.freedesktop.org> On Behalf Of Rodrigo
> > Vivi
> > Sent: Thursday, February 13, 2025 12:55 AM
> > To: intel-xe@lists.freedesktop.org
> > Cc: Vivi, Rodrigo <rodrigo.vivi@intel.com>; Deak, Imre <imre.deak@intel.com>
> > Subject: [PATCH] drm/xe/display: Remove hpd cancel work sync from runtime
> > pm path
> >
> > This function will synchronously cancel and wait for many display work queue
> > items, which might try to take the runtime pm reference causing a bad
> > deadlock. So, remove it from the runtime_pm suspend patch.
> >
> > Reported-by: Imre Deak <imre.deak@intel.com>
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > ---
> >  drivers/gpu/drm/xe/display/xe_display.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/xe/display/xe_display.c
> > b/drivers/gpu/drm/xe/display/xe_display.c
> > index 651799c946ac..f0f427689a56 100644
> > --- a/drivers/gpu/drm/xe/display/xe_display.c
> > +++ b/drivers/gpu/drm/xe/display/xe_display.c
> > @@ -311,7 +311,8 @@ static void __xe_display_pm_suspend(struct
> > xe_device *xe, bool runtime)
> >
> >       xe_display_flush_cleanup_work(xe);
> >
> > -     intel_hpd_cancel_work(xe);
> > +     if (!runtime)
> > +             intel_hpd_cancel_work(xe);
> 
> So the before suspend still need to make sure hpd work is cancelled smoothly, no?

Not sure what you mean (the patch is merged already). The point is that
there is no point in canceling them with the IRQs being enabled, because
right after canceling they could be rescheduled again (via a new IRQ).
And here the IRQs are still enabled. In addition, even if IRQs were
disabled, a synchornous cancel could lead to a deadlock as the commit
log explains. There is also no reason for canceling the hpd work
during runtime suspend.

> 
> Tejas
> >
> >       if (!runtime && has_display(xe)) {
> >               intel_display_driver_suspend_access(display);
> > --
> > 2.48.1
> 

  reply	other threads:[~2025-02-14 18:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12 19:24 [PATCH] drm/xe/display: Remove hpd cancel work sync from runtime pm path Rodrigo Vivi
2025-02-12 20:33 ` Imre Deak
2025-02-12 20:59   ` Rodrigo Vivi
2025-02-12 22:14 ` ✓ CI.Patch_applied: success for " Patchwork
2025-02-12 22:14 ` ✗ CI.checkpatch: warning " Patchwork
2025-02-12 22:15 ` ✓ CI.KUnit: success " Patchwork
2025-02-12 22:32 ` ✓ CI.Build: " Patchwork
2025-02-12 22:34 ` ✓ CI.Hooks: " Patchwork
2025-02-12 22:35 ` ✓ CI.checksparse: " Patchwork
2025-02-13  6:08 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-13 13:04 ` [PATCH] " Upadhyay, Tejas
2025-02-14 18:58   ` Imre Deak [this message]
2025-02-17  8:07 ` ✗ Xe.CI.Full: failure for " 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=Z6-SYUaiQIXmsATl@ideak-desk.fi.intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=tejas.upadhyay@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