From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Hogander, Jouni" <jouni.hogander@intel.com>
Cc: "j@metarealtyinc.ca" <j@metarealtyinc.ca>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>,
"Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
"Manna, Animesh" <animesh.manna@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"Shankar, Uma" <uma.shankar@intel.com>,
"jani.nikula@linux.intel.com" <jani.nikula@linux.intel.com>
Subject: Re: [RFC PATCH] drm/i915/psr: Send the AS SDP in PR Active while vblank is enabled
Date: Fri, 20 Nov 2026 17:03:08 +0200 [thread overview]
Message-ID: <awBhLKnEiGt69Vr7@intel.com> (raw)
In-Reply-To: <76935065478d9f4ab9ee42e36b541101bad34423.camel@intel.com>
On Fri, Nov 20, 2026 at 09:42:40AM +0000, Hogander, Jouni wrote:
> On Tue, 2026-10-06 at 18:05 -0400, Jake Steinman wrote:
> > Sinks that support async video timing in PR get the AS SDP suspended
> > in
> > PR Active (disable_as_sdp_when_pr_active). The LG panel in the Dell
> > XPS
> > 16 DA16260 (sink OUI 00:22:b9, "Balsa2") then judders while frames
> > are
> > updating, with the source flipping at a steady 8.33 ms. Leaving the
> > AS
> > SDP on fixes it but blocks DC5/DC6.
> >
> > Clear PR_ALPM_CTL[AS SDP Transmission in Active Disable] while vblank
> > interrupts are enabled and set it again when they are disabled. Panel
> > Replay already holds DC_OFF while vblank is enabled, so no DC5/DC6
> > residency is lost. Not done when AS SDP skip frames is in use.
>
> Finally I was able to get confirmation internally on this. We should
> actually use this approach.
Is this some weird hardware quirk of ours? I don't see what vblank
interrupts (purely an internal thing to the display engine) have to
do with the external panel receiving SDPs.
>
> Second patch in your set could be removal of the quirk? That one could
> have tag "Closes:
> https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/9119"
>
> Also add these into this patch:
>
> Fixes: d6a8336c5f06 ("drm/i915/alpm: Write PR_ALPM_CTL register")
> Cc: Jouni Högander <jouni.hogander@intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> Cc: intel-xe@lists.freedesktop.org
> Cc: <stable@vger.kernel.org> # v6.17+
>
> >
> > Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/9119
> > Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/8930
> > Cc: Jouni Högander <jouni.hogander@intel.com>
> > Cc: Animesh Manna <animesh.manna@intel.com>
> > Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> > Cc: Uma Shankar <uma.shankar@intel.com>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: Jake Steinman <j@metarealtyinc.ca>
> > ---
> > Jouni, this is the fix for the stutter in the thread below. The 0x107
> > bit 6 patch there is still correct but is not enough on its own.
> > https://lore.kernel.org/r/20260923041342.2146450-1-j@metarealtyinc.ca
> >
> > - Run as an equivalent change on 7.3-rc4 and rc5 (PTL, xe) since 28
> > Sep:
> > smooth, DC5 still reached when idle. This drm-tip version is build
> > tested only (W=1, i915 and xe).
> > - A seamless VRR toggle rewrites PR_ALPM_CTL through
> > intel_alpm_configure_pr_as_sdp() and sets the bit again until the
> > next vblank enable. Not handled here.
> > - A second machine shows the same thing: XPS 13 (1028:0e53, same sink
> > OUI), fixed downstream by exiting PR on every flush (issue 8930).
> > - Separate from this: the panel judders for a few seconds after panel
> > power-on. Locally I hold PR inactive after power-on; 3 s was not
> > quite enough, 8 s is clean. Not part of this patch.
> > - CI has never run on my patches (address not on the allowlist, asked
> > twice). Could someone trigger it for this one and for series
> > 174810?
> > .../drm/i915/display/intel_display_types.h | 3 ++
> > drivers/gpu/drm/i915/display/intel_psr.c | 36
> > ++++++++++++++++++-
> > 2 files changed, 38 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h
> > b/drivers/gpu/drm/i915/display/intel_display_types.h
> > index 0e3083e85..75113ed10 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> > @@ -1816,6 +1816,9 @@ struct intel_psr {
> > bool dc3co_allowed;
> > /* DC3CO disable work */
> > struct delayed_work dc3co_work;
> > + /* AS SDP in PR Active follows vblank enable */
> > + bool pr_as_sdp_follow_vblank;
> > + bool vblank_enabled;
> > u16 su_w_granularity;
> > u16 su_y_granularity;
> > bool source_panel_replay_support;
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index 00d0146b2..0f0b1fc94 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -2166,6 +2166,29 @@ static bool psr_interrupt_error_check(struct
> > intel_dp *intel_dp)
> > return true;
> > }
> >
> > +/*
> > + * Sinks that support async video timing in PR get the AS SDP
> > suspended in PR
> > + * Active. Some then drift out of phase with the source and judder
> > while
> > + * frames are being updated. Send the AS SDP in PR Active while
> > vblank
> > + * interrupts are enabled: Panel Replay holds DC_OFF then anyway, so
> > this
> > + * costs no DC5/DC6 residency. Suspend it again when vblank
> > interrupts are
> > + * disabled, before DC_OFF is dropped.
> > + */
> > +static void intel_psr_pr_as_sdp_update(struct intel_dp *intel_dp)
> > +{
> > + struct intel_display *display = to_intel_display(intel_dp);
> > +
> > + lockdep_assert_held(&intel_dp->psr.lock);
> > +
> > + if (!intel_dp->psr.enabled || !intel_dp-
> > >psr.pr_as_sdp_follow_vblank)
> > + return;
>
> You could drop pr_as_sdp_follow_vblank. Instead check here only
> crtc_state->disable_as_sdp_when_pr_active and intel_dp->psr.enabled
>
> Then just use inverted intel_dp->psr.vblank_enabled to set/clear the
> bit.
>
> Everything else:
>
> intel_alpm_pr_as_sdp_skip_frames_enabled
> intel_psr_needs_alpm_aux_less
> crtc_state->infoframes.enable &
> intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC)
>
> could be checked in compute_disable_as_sdp_when_pr_active.
>
> Would this work for you?
>
> > +
> > + intel_de_rmw(display, PR_ALPM_CTL(display, intel_dp-
> > >psr.transcoder),
> > +
> > PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE,
> > + intel_dp->psr.vblank_enabled ? 0 :
> > +
> > PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE);
>
> I propose you add a new helper into intel_alpm.c providing interface
> just to set the bit.
>
> Also you need to remove setting the bit in
> intel_alpm_configure_pr_as_sdp. That could be separate patch.
>
> BR,
> Jouni Högander
>
> > +}
> > +
> > static void intel_psr_enable_locked(struct intel_dp *intel_dp,
> > const struct intel_crtc_state
> > *crtc_state)
> > {
> > @@ -2225,6 +2248,12 @@ static void intel_psr_enable_locked(struct
> > intel_dp *intel_dp,
> > intel_dp->psr.enabled = true;
> > intel_dp->psr.pause_counter = 0;
> >
> > + intel_dp->psr.pr_as_sdp_follow_vblank = crtc_state-
> > >has_panel_replay &&
> > + crtc_state->disable_as_sdp_when_pr_active &&
> > + intel_dp->as_sdp_supported &&
> > intel_dp_is_edp(intel_dp) &&
> > + !intel_alpm_pr_as_sdp_skip_frames_enabled(intel_dp,
> > crtc_state);
> > + intel_psr_pr_as_sdp_update(intel_dp);
> > +
> > /*
> > * Link_ok is sticky and set here on PSR enable. We can
> > assume link
> > * training is complete as we never continue to PSR enable
> > with
> > @@ -2400,6 +2429,7 @@ static void intel_psr_disable_locked(struct
> > intel_dp *intel_dp)
> > intel_dp->psr.pkg_c_latency_used = 0;
> > cancel_delayed_work(&intel_dp->psr.dc3co_work);
> > intel_dp->psr.dc3co_allowed = false;
> > + intel_dp->psr.pr_as_sdp_follow_vblank = false;
> > }
> >
> > /**
> > @@ -4163,7 +4193,11 @@ void
> > intel_psr_notify_vblank_enable_disable(struct intel_display *display,
> > intel_dp->psr.vblank_wakeref =
> > intel_display_power_get(disp
> > lay,
> > POWE
> > R_DOMAIN_DC_OFF);
> > - else
> > +
> > + intel_dp->psr.vblank_enabled = enable;
> > + intel_psr_pr_as_sdp_update(intel_dp);
> > +
> > + if (!enable)
> > intel_display_power_put(display,
> > POWER_DOMAIN_DC_OFF,
> > intel_dp-
> > >psr.vblank_wakeref);
> > }
> >
> > base-commit: daeb062fc40f727fafefed080c6d12a5ad1d0d12
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2026-11-20 15:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 4:13 [PATCH] drm/i915/dp: Don't promise AS SDPs in PR Active when they are disabled Jake Steinman
2026-09-23 14:27 ` sashiko-bot
2026-09-23 15:25 ` Jake Steinman
2026-09-23 22:39 ` ✗ LGCI.VerificationFailed: failure for " Patchwork
2026-09-28 12:23 ` [PATCH] " Jake Steinman
2026-10-06 22:05 ` [RFC PATCH] drm/i915/psr: Send the AS SDP in PR Active while vblank is enabled Jake Steinman
2026-10-07 14:20 ` sashiko-bot
2026-11-20 9:42 ` Hogander, Jouni
2026-11-20 15:03 ` Ville Syrjälä [this message]
2026-10-07 6:41 ` [PATCH] drm/i915/dp: Don't promise AS SDPs in PR Active when they are disabled Hogander, Jouni
2026-10-07 11:49 ` Jake Steinman
2026-10-07 15:16 ` ✗ LGCI.VerificationFailed: failure for drm/i915/dp: Don't promise AS SDPs in PR Active when they are disabled (rev2) 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=awBhLKnEiGt69Vr7@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=animesh.manna@intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=j@metarealtyinc.ca \
--cc=jani.nikula@linux.intel.com \
--cc=jouni.hogander@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=uma.shankar@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