Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "Kandpal, Suraj" <suraj.kandpal@intel.com>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: "Manna, Animesh" <animesh.manna@intel.com>
Subject: Re: [PATCH v4 2/2] drm/i915/alpm: Stop writing ALPM registers when PSR is enabled
Date: Wed, 14 May 2025 09:12:41 +0000	[thread overview]
Message-ID: <029f59fd7002f28e2f655b5f7d1a2dfb0a5a8d35.camel@intel.com> (raw)
In-Reply-To: <SN7PR11MB6750F7541D2CCCDED7BDC0B1E396A@SN7PR11MB6750.namprd11.prod.outlook.com>

On Tue, 2025-05-13 at 06:01 +0000, Kandpal, Suraj wrote:
> 
> 
> > -----Original Message-----
> > From: Hogander, Jouni <jouni.hogander@intel.com>
> > Sent: Tuesday, May 13, 2025 11:18 AM
> > To: intel-gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org
> > Cc: Manna, Animesh <animesh.manna@intel.com>; Kandpal, Suraj
> > <suraj.kandpal@intel.com>; Hogander, Jouni
> > <jouni.hogander@intel.com>
> > Subject: [PATCH v4 2/2] drm/i915/alpm: Stop writing ALPM registers
> > when PSR
> > is enabled
> > 
> > Currently we are seeing these on PTL:
> > 
> > xe 0000:00:02.0: [drm] *ERROR* Timeout waiting for DDI BUF A to get
> > active
> > 
> > These seem to be caused by writing ALPM registers while Panel
> > Replay is
> > enabled.
> > 
> > Fix this by writing ALPM registers only when Panel Replay is about
> > to be
> > enabled.
> > 
> > v4: improve comment on intel_psr_panel_replay_enable_sink call
> > v3: enable/disable ALPM from PSR code
> > 
> > Fixes: 172757acd6f6 ("drm/i915/lobf: Add lobf enablement in post
> > plane
> > update")
> > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> 
> LGTM,
> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>

Thank you Suraj for checking my patches. These are not pushed to drm-
intel-next.

BR,

Jouni Högander

> 
> > ---
> >  drivers/gpu/drm/i915/display/intel_alpm.c |  4 ++--
> > drivers/gpu/drm/i915/display/intel_psr.c  | 13 ++++++++++---
> >  2 files changed, 12 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c
> > b/drivers/gpu/drm/i915/display/intel_alpm.c
> > index da70a98a1292..c176bdbc19a3 100644
> > --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> > +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
> > @@ -453,8 +453,8 @@ void intel_alpm_post_plane_update(struct
> > intel_atomic_state *state,
> >  		intel_atomic_get_old_crtc_state(state, crtc);
> >  	struct intel_encoder *encoder;
> > 
> > -	if ((!crtc_state->has_lobf ||
> > -	     crtc_state->has_lobf == old_crtc_state->has_lobf) &&
> > !crtc_state-
> > > has_psr)
> > +	if (crtc_state->has_psr || !crtc_state->has_lobf ||
> > +	    crtc_state->has_lobf == old_crtc_state->has_lobf)
> >  		return;
> > 
> >  	for_each_intel_encoder_mask(display->drm, encoder, diff --
> > git
> > a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index ccd66bbc72f7..430ad4ef7146 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -800,6 +800,8 @@ static void _psr_enable_sink(struct intel_dp
> > *intel_dp,
> > static void intel_psr_enable_sink(struct intel_dp *intel_dp,
> >  				  const struct intel_crtc_state
> > *crtc_state)  {
> > +	intel_alpm_enable_sink(intel_dp, crtc_state);
> > +
> >  	crtc_state->has_panel_replay ?
> >  		_panel_replay_enable_sink(intel_dp, crtc_state) :
> >  		_psr_enable_sink(intel_dp, crtc_state); @@ -1962,6
> > +1964,8
> > @@ static void intel_psr_enable_source(struct intel_dp *intel_dp,
> >  	     IS_DISPLAY_VERx100_STEP(display, 3000, STEP_A0,
> > STEP_B0)) &&
> >  	    !intel_dp->psr.panel_replay_enabled)
> >  		intel_dmc_block_pkgc(display, intel_dp->psr.pipe,
> > true);
> > +
> > +	intel_alpm_configure(intel_dp, crtc_state);
> >  }
> > 
> >  static bool psr_interrupt_error_check(struct intel_dp *intel_dp)
> > @@ -2029,8
> > +2033,9 @@ static void intel_psr_enable_locked(struct intel_dp
> > *intel_dp,
> >  			    intel_dp->psr.sel_update_enabled ? "2"
> > : "1");
> > 
> >  	/*
> > -	 * Enabling here only for PSR. Panel Replay enable bit is
> > already
> > -	 * written at this point. See
> > +	 * Enabling sink PSR/Panel Replay here only for PSR. Panel
> > Replay
> > enable
> > +	 * bit is already written at this point. Sink ALPM is
> > enabled here for
> > +	 * PSR and Panel Replay. See
> >  	 * intel_psr_panel_replay_enable_sink. Modifiers/options:
> >  	 *  - Selective Update
> >  	 *  - Region Early Transport
> > @@ -2172,6 +2177,9 @@ static void intel_psr_disable_locked(struct
> > intel_dp
> > *intel_dp)
> >  	if (intel_dp_is_edp(intel_dp))
> > 
> > 	intel_snps_phy_update_psr_power_state(&dp_to_dig_port(inte
> > l_dp)-
> > > base, false);
> > 
> > +	if (intel_dp->psr.panel_replay_enabled &&
> > intel_dp_is_edp(intel_dp))
> > +		intel_alpm_disable(intel_dp);
> > +
> >  	/* Disable PSR on Sink */
> >  	if (!intel_dp->psr.panel_replay_enabled) {
> >  		drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG,
> > 0);
> > @@ -3498,7 +3506,6 @@ static void psr_alpm_check(struct intel_dp
> > *intel_dp)
> >  	if (intel_alpm_get_error(intel_dp)) {
> >  		intel_psr_disable_locked(intel_dp);
> >  		psr->sink_not_reliable = true;
> > -		intel_alpm_disable(intel_dp);
> >  	}
> >  }
> > 
> > --
> > 2.43.0
> 


  reply	other threads:[~2025-05-14  9:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-13  5:48 [PATCH v4 0/2] ALPM rework and fixes Jouni Högander
2025-05-13  5:48 ` [PATCH v4 1/2] drm/i915/alpm: Make intel_alpm_enable_sink available for PSR Jouni Högander
2025-05-13  5:48 ` [PATCH v4 2/2] drm/i915/alpm: Stop writing ALPM registers when PSR is enabled Jouni Högander
2025-05-13  6:01   ` Kandpal, Suraj
2025-05-14  9:12     ` Hogander, Jouni [this message]
2025-05-13  6:35 ` ✗ Fi.CI.SPARSE: warning for ALPM rework and fixes (rev4) Patchwork
2025-05-13  6:59 ` ✓ i915.CI.BAT: success " Patchwork
2025-05-13  8:34 ` ✗ i915.CI.Full: failure " Patchwork
2025-05-14  9:09   ` 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=029f59fd7002f28e2f655b5f7d1a2dfb0a5a8d35.camel@intel.com \
    --to=jouni.hogander@intel.com \
    --cc=animesh.manna@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=suraj.kandpal@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