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 v3 2/2] drm/i915/alpm: Stop writing ALPM registers when PSR is enabled
Date: Tue, 13 May 2025 04:46:33 +0000 [thread overview]
Message-ID: <179aafa7ee6f9b00dddb84751b2e64a05cdb17a3.camel@intel.com> (raw)
In-Reply-To: <SN7PR11MB6750BD686FB7B3740198DCCAE396A@SN7PR11MB6750.namprd11.prod.outlook.com>
On Tue, 2025-05-13 at 03:59 +0000, Kandpal, Suraj wrote:
>
>
> > -----Original Message-----
> > From: Intel-xe <intel-xe-bounces@lists.freedesktop.org> On Behalf
> > Of Jouni
> > Högander
> > Sent: Thursday, May 8, 2025 7:47 PM
> > To: intel-gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org
> > Cc: Manna, Animesh <animesh.manna@intel.com>; Hogander, Jouni
> > <jouni.hogander@intel.com>
> > Subject: [PATCH v3 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.
> >
> > 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>
> > ---
> > drivers/gpu/drm/i915/display/intel_alpm.c | 4 ++--
> > drivers/gpu/drm/i915/display/intel_psr.c | 8 +++++++-
> > 2 files changed, 9 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c
> > b/drivers/gpu/drm/i915/display/intel_alpm.c
> > index 9442483058d2..bc93e8026703 100644
> > --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> > +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
> > @@ -460,8 +460,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..0dbe59d06187 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);
>
> Now that we do alpm configure and enable sink from psr code do we
> need to do it from the alpm_post_plane code?
alpm_pre_plane and alpm_post_plane are for LOBF only after this change.
>
> Also on a side note intel_psr_enable_sink has a comment where it is
> called (intel_psr_enable_locked)
> which tells us what all is being done inside the function we need to
> add the alpm enablement too there.
Ok, I will add there.
BR,
Jouni Högander
>
> Regards,
> Suraj Kandpal
>
> > }
> >
> > static bool psr_interrupt_error_check(struct intel_dp *intel_dp)
> > @@ -2172,6
> > +2176,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 +3505,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
>
next prev parent reply other threads:[~2025-05-13 4:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 14:16 [PATCH v3 0/2] ALPM rework and fixes Jouni Högander
2025-05-08 14:17 ` [PATCH v3 1/2] drm/i915/alpm: Make intel_alpm_enable_sink available for PSR Jouni Högander
2025-05-09 4:25 ` Kandpal, Suraj
2025-05-09 10:43 ` Jani Nikula
2025-05-09 12:04 ` Hogander, Jouni
2025-05-08 14:17 ` [PATCH v3 2/2] drm/i915/alpm: Stop writing ALPM registers when PSR is enabled Jouni Högander
2025-05-13 3:59 ` Kandpal, Suraj
2025-05-13 4:46 ` Hogander, Jouni [this message]
2025-05-08 14:22 ` ✓ CI.Patch_applied: success for ALPM rework and fixes (rev3) Patchwork
2025-05-08 14:22 ` ✓ CI.checkpatch: " Patchwork
2025-05-08 14:23 ` ✓ CI.KUnit: " Patchwork
2025-05-08 14:32 ` ✓ CI.Build: " Patchwork
2025-05-08 14:34 ` ✓ CI.Hooks: " Patchwork
2025-05-08 14:35 ` ✗ CI.checksparse: warning " Patchwork
2025-05-08 14:58 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-05-08 15:11 ` ✓ Xe.CI.BAT: success " Patchwork
2025-05-08 15:24 ` ✓ i915.CI.BAT: " Patchwork
2025-05-08 17:34 ` ✗ i915.CI.Full: failure " Patchwork
2025-05-09 5:54 ` ✗ Xe.CI.Full: " 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=179aafa7ee6f9b00dddb84751b2e64a05cdb17a3.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.