intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"B, Jeevan" <jeevan.b@intel.com>
Subject: Re: [PATCH] drm/i915/psr: Check PSR pause counter in __psr_wait_for_idle_locked
Date: Wed, 27 Aug 2025 07:04:01 +0000	[thread overview]
Message-ID: <7c5c40332f103362d0523383ce977efc54f9ae3b.camel@intel.com> (raw)
In-Reply-To: <DM4PR11MB6312374951C02A1B371F300E9039A@DM4PR11MB6312.namprd11.prod.outlook.com>

On Tue, 2025-08-26 at 08:29 +0000, B, Jeevan wrote:
> LGTM 
> 
> Reviewed-by: Jeevan B <jeevan.b@intel.com>

Thank you Jeevan for your review. This is now pushed to drm-intel-next.

BR,

Jouni Högander

> 
> > -----Original Message-----
> > From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf
> > Of Jouni
> > Högander
> > Sent: Tuesday, August 26, 2025 1:15 PM
> > To: intel-gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org
> > Cc: Hogander, Jouni <jouni.hogander@intel.com>
> > Subject: [PATCH] drm/i915/psr: Check PSR pause counter in
> > __psr_wait_for_idle_locked
> > 
> > PSR work is using __psr_wait_for_idle_locked to ensure PSR exit is
> > completed
> > before continuing to PSR activation. __psr_wait_for_idle_locked is
> > unlocking
> > PSR mutex which allows PSR disable/enable and PSR pause/resume
> > while PSR
> > idle is being wait. PSR enable status is already checked after
> > locking again PSR
> > mutex but PSR pause counter check is missing. Due to this PSR work
> > may
> > continue to PSR activation even PSR is paused.
> > 
> > Fix this by checking PSR pause counter in
> > __psr_wait_for_idle_locked after PSR
> > mutex is locked again.
> > 
> > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_psr.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index eec4f7dc2d66..8b4cdf9b30db 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -3092,7 +3092,7 @@ static bool __psr_wait_for_idle_locked(struct
> > intel_dp *intel_dp)
> > 
> >  	/* After the unlocked wait, verify that PSR is still
> > wanted! */
> >  	mutex_lock(&intel_dp->psr.lock);
> > -	return err == 0 && intel_dp->psr.enabled;
> > +	return err == 0 && intel_dp->psr.enabled &&
> > +!intel_dp->psr.pause_counter;
> >  }
> > 
> >  static int intel_psr_fastset_force(struct intel_display *display)
> > --
> > 2.43.0
> 


  reply	other threads:[~2025-08-27  7:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-26  7:44 [PATCH] drm/i915/psr: Check PSR pause counter in __psr_wait_for_idle_locked Jouni Högander
2025-08-26  7:52 ` ✓ CI.KUnit: success for " Patchwork
2025-08-26  8:29 ` [PATCH] " B, Jeevan
2025-08-27  7:04   ` Hogander, Jouni [this message]
2025-08-26  8:40 ` ✓ Xe.CI.BAT: success for " Patchwork
2025-08-26 14:34 ` ✗ Xe.CI.Full: failure " Patchwork
2025-08-27  6:39   ` Hogander, Jouni

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=7c5c40332f103362d0523383ce977efc54f9ae3b.camel@intel.com \
    --to=jouni.hogander@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jeevan.b@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;
as well as URLs for NNTP newsgroup(s).