* [PATCH v2 1/4] drm/i915/alpm: Add a helper to suspend the AS SDP in PR Active
2026-11-21 12:25 ` [PATCH v2 0/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating Jake Steinman
@ 2026-11-21 12:25 ` Jake Steinman
2026-11-24 11:00 ` Hogander, Jouni
2026-11-21 12:25 ` [PATCH v2 2/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating Jake Steinman
` (3 subsequent siblings)
4 siblings, 1 reply; 33+ messages in thread
From: Jake Steinman @ 2026-11-21 12:25 UTC (permalink / raw)
To: jouni.hogander, ville.syrjala
Cc: intel-gfx, intel-xe, animesh.manna, ankit.k.nautiyal, uma.shankar,
rodrigo.vivi, jani.nikula
Add intel_alpm_pr_as_sdp_in_active_disable() to set or clear
PR_ALPM_CTL[AS SDP Transmission in Active Disable] without touching the
other PR_ALPM_CTL fields. PSR code uses it in the next patch to send the
AS SDP in PR Active while frames are being updated.
Cc: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Jake Steinman <j@metarealtyinc.ca>
---
drivers/gpu/drm/i915/display/intel_alpm.c | 22 ++++++++++++++++++++++
drivers/gpu/drm/i915/display/intel_alpm.h | 4 ++++
2 files changed, 26 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
index f54b29e19..910067d27 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.c
+++ b/drivers/gpu/drm/i915/display/intel_alpm.c
@@ -511,6 +511,28 @@ void intel_alpm_pr_as_sdp_update(const struct intel_crtc_state *crtc_state)
}
}
+/**
+ * intel_alpm_pr_as_sdp_in_active_disable - suspend or send the AS SDP in PR Active
+ * @intel_dp: Intel DP struct
+ * @cpu_transcoder: transcoder Panel Replay is enabled on
+ * @disable: true to suspend the AS SDP in PR Active, false to keep sending it
+ *
+ * Set or clear PR_ALPM_CTL[AS SDP Transmission in Active Disable] and leave
+ * the other PR_ALPM_CTL fields as they are.
+ */
+void intel_alpm_pr_as_sdp_in_active_disable(struct intel_dp *intel_dp,
+ enum transcoder cpu_transcoder,
+ bool disable)
+{
+ struct intel_display *display = to_intel_display(intel_dp);
+
+ mutex_lock(&intel_dp->alpm.lock);
+ intel_de_rmw(display, PR_ALPM_CTL(display, cpu_transcoder),
+ PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE,
+ disable ? PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE : 0);
+ mutex_unlock(&intel_dp->alpm.lock);
+}
+
static void lnl_alpm_configure(struct intel_dp *intel_dp,
const struct intel_crtc_state *crtc_state)
{
diff --git a/drivers/gpu/drm/i915/display/intel_alpm.h b/drivers/gpu/drm/i915/display/intel_alpm.h
index f8f605d94..a45ddd04f 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.h
+++ b/drivers/gpu/drm/i915/display/intel_alpm.h
@@ -14,6 +14,7 @@ struct drm_connector_state;
struct intel_connector;
struct intel_atomic_state;
struct intel_crtc;
+enum transcoder;
void intel_alpm_init(struct intel_dp *intel_dp);
bool intel_alpm_compute_params(struct intel_dp *intel_dp,
@@ -37,6 +38,9 @@ bool intel_alpm_is_alpm_aux_less(struct intel_dp *intel_dp,
bool intel_alpm_pr_as_sdp_skip_frames_enabled(struct intel_dp *intel_dp,
const struct intel_crtc_state *crtc_state);
void intel_alpm_pr_as_sdp_update(const struct intel_crtc_state *crtc_state);
+void intel_alpm_pr_as_sdp_in_active_disable(struct intel_dp *intel_dp,
+ enum transcoder cpu_transcoder,
+ bool disable);
void intel_alpm_disable(struct intel_dp *intel_dp);
bool intel_alpm_get_error(struct intel_dp *intel_dp);
void intel_alpm_lobf_compute_config_late(struct intel_dp *intel_dp,
--
2.56.1
^ permalink raw reply related [flat|nested] 33+ messages in thread* Re: [PATCH v2 1/4] drm/i915/alpm: Add a helper to suspend the AS SDP in PR Active
2026-11-21 12:25 ` [PATCH v2 1/4] drm/i915/alpm: Add a helper to suspend the AS SDP in PR Active Jake Steinman
@ 2026-11-24 11:00 ` Hogander, Jouni
0 siblings, 0 replies; 33+ messages in thread
From: Hogander, Jouni @ 2026-11-24 11:00 UTC (permalink / raw)
To: ville.syrjala@linux.intel.com, j@metarealtyinc.ca
Cc: intel-xe@lists.freedesktop.org, Shankar, Uma, Vivi, Rodrigo,
Manna, Animesh, intel-gfx@lists.freedesktop.org,
jani.nikula@linux.intel.com, Nautiyal, Ankit K
On Sat, 2026-11-21 at 07:25 -0500, Jake Steinman wrote:
> Add intel_alpm_pr_as_sdp_in_active_disable() to set or clear
> PR_ALPM_CTL[AS SDP Transmission in Active Disable] without touching
> the
> other PR_ALPM_CTL fields. PSR code uses it in the next patch to send
> the
> AS SDP in PR Active while frames are being updated.
>
> Cc: Jouni Högander <jouni.hogander@intel.com>
> Signed-off-by: Jake Steinman <j@metarealtyinc.ca>
> ---
> drivers/gpu/drm/i915/display/intel_alpm.c | 22
> ++++++++++++++++++++++
> drivers/gpu/drm/i915/display/intel_alpm.h | 4 ++++
> 2 files changed, 26 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c
> b/drivers/gpu/drm/i915/display/intel_alpm.c
> index f54b29e19..910067d27 100644
> --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
> @@ -511,6 +511,28 @@ void intel_alpm_pr_as_sdp_update(const struct
> intel_crtc_state *crtc_state)
> }
> }
>
> +/**
> + * intel_alpm_pr_as_sdp_in_active_disable - suspend or send the AS
> SDP in PR Active
> + * @intel_dp: Intel DP struct
> + * @cpu_transcoder: transcoder Panel Replay is enabled on
> + * @disable: true to suspend the AS SDP in PR Active, false to keep
> sending it
> + *
> + * Set or clear PR_ALPM_CTL[AS SDP Transmission in Active Disable]
> and leave
> + * the other PR_ALPM_CTL fields as they are.
> + */
> +void intel_alpm_pr_as_sdp_in_active_disable(struct intel_dp
> *intel_dp,
> + enum transcoder
> cpu_transcoder,
You can use intel_dp->alpm.transcoder instead.
BR,
Jouni Högander
> + bool disable)
> +{
> + struct intel_display *display = to_intel_display(intel_dp);
> +
> + mutex_lock(&intel_dp->alpm.lock);
> + intel_de_rmw(display, PR_ALPM_CTL(display, cpu_transcoder),
> +
> PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE,
> + disable ?
> PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE : 0);
> + mutex_unlock(&intel_dp->alpm.lock);
> +}
> +
> static void lnl_alpm_configure(struct intel_dp *intel_dp,
> const struct intel_crtc_state
> *crtc_state)
> {
> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.h
> b/drivers/gpu/drm/i915/display/intel_alpm.h
> index f8f605d94..a45ddd04f 100644
> --- a/drivers/gpu/drm/i915/display/intel_alpm.h
> +++ b/drivers/gpu/drm/i915/display/intel_alpm.h
> @@ -14,6 +14,7 @@ struct drm_connector_state;
> struct intel_connector;
> struct intel_atomic_state;
> struct intel_crtc;
> +enum transcoder;
>
> void intel_alpm_init(struct intel_dp *intel_dp);
> bool intel_alpm_compute_params(struct intel_dp *intel_dp,
> @@ -37,6 +38,9 @@ bool intel_alpm_is_alpm_aux_less(struct intel_dp
> *intel_dp,
> bool intel_alpm_pr_as_sdp_skip_frames_enabled(struct intel_dp
> *intel_dp,
> const struct
> intel_crtc_state *crtc_state);
> void intel_alpm_pr_as_sdp_update(const struct intel_crtc_state
> *crtc_state);
> +void intel_alpm_pr_as_sdp_in_active_disable(struct intel_dp
> *intel_dp,
> + enum transcoder
> cpu_transcoder,
> + bool disable);
> void intel_alpm_disable(struct intel_dp *intel_dp);
> bool intel_alpm_get_error(struct intel_dp *intel_dp);
> void intel_alpm_lobf_compute_config_late(struct intel_dp *intel_dp,
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v2 2/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating
2026-11-21 12:25 ` [PATCH v2 0/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating Jake Steinman
2026-11-21 12:25 ` [PATCH v2 1/4] drm/i915/alpm: Add a helper to suspend the AS SDP in PR Active Jake Steinman
@ 2026-11-21 12:25 ` Jake Steinman
2026-11-23 15:45 ` sashiko-bot
2026-11-24 11:02 ` Hogander, Jouni
2026-11-21 12:25 ` [PATCH v2 3/4] drm/i915/alpm: Leave AS SDP Transmission in Active Disable to PSR code Jake Steinman
` (2 subsequent siblings)
4 siblings, 2 replies; 33+ messages in thread
From: Jake Steinman @ 2026-11-21 12:25 UTC (permalink / raw)
To: jouni.hogander, ville.syrjala
Cc: intel-gfx, intel-xe, animesh.manna, ankit.k.nautiyal, uma.shankar,
rodrigo.vivi, jani.nikula
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) 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] on a frontbuffer
flush (flips, cursor updates and frontbuffer rendering) and set it again
from a delayed work once there has been no flush for 6 frames, the same
idle time DC3CO and DC5/DC6 use.
disable_as_sdp_when_pr_active is now computed after the AS SDP config
and is only set when the AS SDP is actually sent, ALPM AUX-less is used
and AS SDP skip frames is not.
Fixes: d6a8336c5f06 ("drm/i915/alpm: Write PR_ALPM_CTL register")
Cc: Jouni Högander <jouni.hogander@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v6.17+
Signed-off-by: Jake Steinman <j@metarealtyinc.ca>
---
.../drm/i915/display/intel_display_types.h | 5 ++
drivers/gpu/drm/i915/display/intel_dp.c | 1 +
drivers/gpu/drm/i915/display/intel_psr.c | 90 ++++++++++++++++++-
drivers/gpu/drm/i915/display/intel_psr.h | 2 +
4 files changed, 94 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 90a5d2916..991d3a2fe 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1823,6 +1823,11 @@ struct intel_psr {
bool dc3co_allowed;
/* DC3CO disable work */
struct delayed_work dc3co_work;
+ /* AS SDP in PR Active is sent while frames are being updated */
+ bool disable_as_sdp_when_pr_active;
+ bool as_sdp_in_active;
+ unsigned long as_sdp_idle_delay;
+ struct delayed_work as_sdp_work;
u16 su_w_granularity;
u16 su_y_granularity;
bool source_panel_replay_support;
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index ef164a797..7b8a8c3a4 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -3830,6 +3830,7 @@ intel_dp_compute_config(struct intel_atomic_state *state,
intel_vrr_compute_config(pipe_config, conn_state);
intel_psr_compute_config(intel_dp, pipe_config, conn_state);
intel_dp_compute_as_sdp(intel_dp, pipe_config);
+ intel_psr_compute_as_sdp_config(intel_dp, pipe_config);
intel_alpm_lobf_compute_config(intel_dp, pipe_config, conn_state);
intel_dp_drrs_compute_config(connector, pipe_config, link_bpp_x16);
intel_dp_compute_vsc_sdp(intel_dp, pipe_config, conn_state);
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index bd1656360..8407b34f2 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1704,10 +1704,38 @@ static inline bool compute_link_off_after_as_sdp_when_pr_active(struct intel_con
DP_PANEL_REPLAY_LINK_OFF_SUPPORTED_IN_PR_AFTER_ADAPTIVE_SYNC_SDP);
}
-static inline bool compute_disable_as_sdp_when_pr_active(struct intel_connector *connector)
+static bool compute_disable_as_sdp_when_pr_active(struct intel_dp *intel_dp,
+ const struct intel_crtc_state *crtc_state)
{
- return !(connector->dp.panel_replay_caps.dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)] &
- DP_PANEL_REPLAY_ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR);
+ struct intel_connector *connector = intel_dp->attached_connector;
+ const u8 *pr_dpcd = connector->dp.panel_replay_caps.dpcd;
+
+ if (pr_dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)] &
+ DP_PANEL_REPLAY_ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR)
+ return false;
+
+ /* AS SDP skip frames needs the AS SDP to keep flowing in PR Active */
+ if (intel_alpm_pr_as_sdp_skip_frames_enabled(intel_dp, crtc_state))
+ return false;
+
+ return intel_psr_needs_alpm_aux_less(intel_dp, crtc_state) &&
+ (crtc_state->infoframes.enable &
+ intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC));
+}
+
+/**
+ * intel_psr_compute_as_sdp_config - compute whether the AS SDP is suspended in PR Active
+ * @intel_dp: Intel DP struct
+ * @crtc_state: crtc state
+ *
+ * Must be called after the AS SDP infoframe has been computed.
+ */
+void intel_psr_compute_as_sdp_config(struct intel_dp *intel_dp,
+ struct intel_crtc_state *crtc_state)
+{
+ crtc_state->disable_as_sdp_when_pr_active =
+ crtc_state->has_panel_replay &&
+ compute_disable_as_sdp_when_pr_active(intel_dp, crtc_state);
}
static bool _panel_replay_compute_config(struct intel_crtc_state *crtc_state,
@@ -1745,7 +1773,6 @@ static bool _panel_replay_compute_config(struct intel_crtc_state *crtc_state,
}
crtc_state->link_off_after_as_sdp_when_pr_active = compute_link_off_after_as_sdp_when_pr_active(connector);
- crtc_state->disable_as_sdp_when_pr_active = compute_disable_as_sdp_when_pr_active(connector);
if (!intel_dp_is_edp(intel_dp))
return true;
@@ -2183,6 +2210,47 @@ 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 of them then drift out of phase with the source and judder
+ * while frames are being updated. Send the AS SDP in PR Active from the first
+ * frame update and suspend it again once the display has been idle for
+ * as_sdp_idle_delay. DC5/DC6 needs the same number of idle frames, so little
+ * DC5/DC6 residency is lost.
+ */
+static void intel_psr_pr_as_sdp_suspend_work(struct work_struct *work)
+{
+ struct intel_dp *intel_dp =
+ container_of(work, typeof(*intel_dp), psr.as_sdp_work.work);
+
+ mutex_lock(&intel_dp->psr.lock);
+ if (intel_dp->psr.enabled && intel_dp->psr.as_sdp_in_active) {
+ intel_alpm_pr_as_sdp_in_active_disable(intel_dp, intel_dp->psr.transcoder,
+ true);
+ intel_dp->psr.as_sdp_in_active = false;
+ }
+ mutex_unlock(&intel_dp->psr.lock);
+}
+
+static void intel_psr_pr_as_sdp_flush_locked(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.disable_as_sdp_when_pr_active)
+ return;
+
+ if (!intel_dp->psr.as_sdp_in_active) {
+ intel_alpm_pr_as_sdp_in_active_disable(intel_dp, intel_dp->psr.transcoder,
+ false);
+ intel_dp->psr.as_sdp_in_active = true;
+ }
+
+ mod_delayed_work(display->wq.unordered, &intel_dp->psr.as_sdp_work,
+ intel_dp->psr.as_sdp_idle_delay);
+}
+
static void intel_psr_enable_locked(struct intel_dp *intel_dp,
const struct intel_crtc_state *crtc_state)
{
@@ -2201,6 +2269,7 @@ static void intel_psr_enable_locked(struct intel_dp *intel_dp,
/* DC5/DC6 requires at least 6 idle frames */
val = usecs_to_jiffies(intel_get_frame_time_us(crtc_state) * 6);
intel_dp->psr.dc3co_exit_delay = val;
+ intel_dp->psr.as_sdp_idle_delay = val;
intel_dp->psr.psr2_sel_fetch_enabled = crtc_state->enable_psr2_sel_fetch;
intel_dp->psr.su_region_et_enabled = crtc_state->enable_psr2_su_region_et;
intel_dp->psr.psr2_sel_fetch_cff_enabled = false;
@@ -2211,6 +2280,9 @@ static void intel_psr_enable_locked(struct intel_dp *intel_dp,
intel_dp->psr.io_wake_lines = crtc_state->alpm_state.io_wake_lines;
intel_dp->psr.fast_wake_lines = crtc_state->alpm_state.fast_wake_lines;
intel_dp->psr.entry_setup_frames = crtc_state->entry_setup_frames;
+ intel_dp->psr.disable_as_sdp_when_pr_active =
+ crtc_state->disable_as_sdp_when_pr_active;
+ intel_dp->psr.as_sdp_in_active = false;
if (!psr_interrupt_error_check(intel_dp))
return;
@@ -2243,6 +2315,10 @@ static void intel_psr_enable_locked(struct intel_dp *intel_dp,
intel_dp->psr.enabled = true;
intel_dp->psr.pause_counter = 0;
+ if (intel_dp->psr.disable_as_sdp_when_pr_active)
+ intel_alpm_pr_as_sdp_in_active_disable(intel_dp, intel_dp->psr.transcoder,
+ true);
+
/*
* 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
@@ -2419,6 +2495,8 @@ static void intel_psr_disable_locked(struct intel_dp *intel_dp)
intel_dp->psr.pipe_mask = 0;
cancel_delayed_work(&intel_dp->psr.dc3co_work);
intel_dp->psr.dc3co_allowed = false;
+ cancel_delayed_work(&intel_dp->psr.as_sdp_work);
+ intel_dp->psr.as_sdp_in_active = false;
}
/**
@@ -2449,6 +2527,7 @@ void intel_psr_disable(struct intel_dp *intel_dp,
mutex_unlock(&intel_dp->psr.lock);
cancel_work_sync(&intel_dp->psr.work);
cancel_delayed_work_sync(&intel_dp->psr.dc3co_work);
+ cancel_delayed_work_sync(&intel_dp->psr.as_sdp_work);
}
/**
@@ -3853,6 +3932,8 @@ void intel_psr_flush(struct intel_display *display,
intel_dp->psr.busy_frontbuffer_bits &= ~pipe_frontbuffer_bits;
+ intel_psr_pr_as_sdp_flush_locked(intel_dp);
+
if (intel_dp->psr.pause_counter)
goto rearm;
@@ -3931,6 +4012,7 @@ void intel_psr_init(struct intel_dp *intel_dp)
INIT_WORK(&intel_dp->psr.work, intel_psr_work);
INIT_DELAYED_WORK(&intel_dp->psr.dc3co_work, psr2_dc3co_disable_work);
+ INIT_DELAYED_WORK(&intel_dp->psr.as_sdp_work, intel_psr_pr_as_sdp_suspend_work);
mutex_init(&intel_dp->psr.lock);
}
diff --git a/drivers/gpu/drm/i915/display/intel_psr.h b/drivers/gpu/drm/i915/display/intel_psr.h
index d545fdaa0..ddeccb3a9 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.h
+++ b/drivers/gpu/drm/i915/display/intel_psr.h
@@ -80,6 +80,8 @@ int intel_psr_min_set_context_latency(const struct intel_crtc_state *crtc_state)
void intel_psr_connector_debugfs_add(struct intel_connector *connector);
void intel_psr_debugfs_register(struct intel_display *display);
bool intel_psr_needs_alpm(struct intel_dp *intel_dp, const struct intel_crtc_state *crtc_state);
+void intel_psr_compute_as_sdp_config(struct intel_dp *intel_dp,
+ struct intel_crtc_state *crtc_state);
bool intel_psr_needs_alpm_aux_less(struct intel_dp *intel_dp,
const struct intel_crtc_state *crtc_state);
void intel_psr_compute_config_late(struct intel_dp *intel_dp,
--
2.56.1
^ permalink raw reply related [flat|nested] 33+ messages in thread* Re: [PATCH v2 2/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating
2026-11-21 12:25 ` [PATCH v2 2/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating Jake Steinman
@ 2026-11-23 15:45 ` sashiko-bot
2026-11-24 11:02 ` Hogander, Jouni
1 sibling, 0 replies; 33+ messages in thread
From: sashiko-bot @ 2026-11-23 15:45 UTC (permalink / raw)
To: Jake Steinman; +Cc: intel-gfx, intel-xe
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/i915/psr: stale psr.disable_as_sdp_when_pr_active on
seamless VRR toggle
--
commit 80915725d9b9cf87d3b5497256fb042ac9a0cf2a
Author: Jake Steinman <j@metarealtyinc.ca>
drm/i915/psr: Send the AS SDP in PR Active while frames are updating
This commit enables Adaptive Sync SDP transmission in Panel Replay Active on
frontbuffer flushes and suspends it again via delayed work after 6 idle
frames. It also refines disable_as_sdp_when_pr_active so that it is disabled
when periodic AS SDP skip frames is enabled.
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index bd16563603249..8407b34f23934 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -1704,10 +1704,38 @@ static inline bool compute_link_off_after_as_sdp_when_pr_active(struct intel_con
> DP_PANEL_REPLAY_LINK_OFF_SUPPORTED_IN_PR_AFTER_ADAPTIVE_SYNC_SDP);
> }
>
> -static inline bool compute_disable_as_sdp_when_pr_active(struct intel_connector *connector)
> +static bool compute_disable_as_sdp_when_pr_active(struct intel_dp *intel_dp,
> + const struct intel_crtc_state *crtc_state)
> {
> - return !(connector->dp.panel_replay_caps.dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)] &
> - DP_PANEL_REPLAY_ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR);
> + struct intel_connector *connector = intel_dp->attached_connector;
> + const u8 *pr_dpcd = connector->dp.panel_replay_caps.dpcd;
> +
> + if (pr_dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)] &
> + DP_PANEL_REPLAY_ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR)
> + return false;
> +
> + /* AS SDP skip frames needs the AS SDP to keep flowing in PR Active */
> + if (intel_alpm_pr_as_sdp_skip_frames_enabled(intel_dp, crtc_state))
> + return false;
[ ... ]
> @@ -2211,6 +2280,9 @@ static void intel_psr_enable_locked(struct intel_dp *intel_dp,
> intel_dp->psr.io_wake_lines = crtc_state->alpm_state.io_wake_lines;
> intel_dp->psr.fast_wake_lines = crtc_state->alpm_state.fast_wake_lines;
> intel_dp->psr.entry_setup_frames = crtc_state->entry_setup_frames;
> + intel_dp->psr.disable_as_sdp_when_pr_active =
> + crtc_state->disable_as_sdp_when_pr_active;
> + intel_dp->psr.as_sdp_in_active = false;
[Severity: Medium]
Can intel_dp->psr.disable_as_sdp_when_pr_active become stale across a
seamless VRR fastset?
Because intel_alpm_pr_as_sdp_skip_frames_enabled() is gated on
!crtc_state->vrr.enable, toggling VRR when periodic AS SDP skip frames is
configured flips crtc_state->disable_as_sdp_when_pr_active between true (VRR
on) and false (VRR off). During a seamless VRR transition, Panel Replay
stays enabled and intel_psr_post_plane_update() does not call
intel_psr_enable_locked(), so intel_dp->psr.disable_as_sdp_when_pr_active,
intel_dp->psr.as_sdp_in_active, and intel_dp->psr.as_sdp_work are not
updated to match the new crtc_state.
Even with the follow-up commit "drm/i915/alpm: Leave AS SDP Transmission in
Active Disable to PSR code" preserving
PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE in
intel_alpm_configure_pr_as_sdp() when skip_frames is 0, toggling VRR off
leaves intel_dp->psr.disable_as_sdp_when_pr_active set to true, so
intel_psr_pr_as_sdp_suspend_work() will set
PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE after 6 idle frames while
mutually exclusive PR_ALPM_CTL_AS_SDP_SKIP_FRAMES is enabled. Conversely,
toggling VRR on leaves intel_dp->psr.disable_as_sdp_when_pr_active set to
false, so intel_psr_pr_as_sdp_flush_locked() never schedules as_sdp_work and
AS SDP transmission in PR Active remains permanently enabled when idle,
blocking DC5/DC6.
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1795263689.git.j@metarealtyinc.ca?part=2
^ permalink raw reply [flat|nested] 33+ messages in thread* Re: [PATCH v2 2/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating
2026-11-21 12:25 ` [PATCH v2 2/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating Jake Steinman
2026-11-23 15:45 ` sashiko-bot
@ 2026-11-24 11:02 ` Hogander, Jouni
2026-11-24 11:16 ` Hogander, Jouni
1 sibling, 1 reply; 33+ messages in thread
From: Hogander, Jouni @ 2026-11-24 11:02 UTC (permalink / raw)
To: ville.syrjala@linux.intel.com, j@metarealtyinc.ca
Cc: intel-xe@lists.freedesktop.org, Shankar, Uma, Vivi, Rodrigo,
Manna, Animesh, intel-gfx@lists.freedesktop.org,
jani.nikula@linux.intel.com, Nautiyal, Ankit K
On Sat, 2026-11-21 at 07:25 -0500, 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) 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] on a
> frontbuffer
> flush (flips, cursor updates and frontbuffer rendering) and set it
> again
> from a delayed work once there has been no flush for 6 frames, the
> same
> idle time DC3CO and DC5/DC6 use.
>
> disable_as_sdp_when_pr_active is now computed after the AS SDP config
> and is only set when the AS SDP is actually sent, ALPM AUX-less is
> used
> and AS SDP skip frames is not.
You don't need this patch. Flush is disabling Panel Replay and then
this disable_as_sdp_when_pr_active doesn't matter.
BR,
Jouni Högander
>
> Fixes: d6a8336c5f06 ("drm/i915/alpm: Write PR_ALPM_CTL register")
> Cc: Jouni Högander <jouni.hogander@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> Cc: intel-xe@lists.freedesktop.org
> Cc: <stable@vger.kernel.org> # v6.17+
> Signed-off-by: Jake Steinman <j@metarealtyinc.ca>
> ---
> .../drm/i915/display/intel_display_types.h | 5 ++
> drivers/gpu/drm/i915/display/intel_dp.c | 1 +
> drivers/gpu/drm/i915/display/intel_psr.c | 90
> ++++++++++++++++++-
> drivers/gpu/drm/i915/display/intel_psr.h | 2 +
> 4 files changed, 94 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h
> b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 90a5d2916..991d3a2fe 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -1823,6 +1823,11 @@ struct intel_psr {
> bool dc3co_allowed;
> /* DC3CO disable work */
> struct delayed_work dc3co_work;
> + /* AS SDP in PR Active is sent while frames are being
> updated */
> + bool disable_as_sdp_when_pr_active;
> + bool as_sdp_in_active;
> + unsigned long as_sdp_idle_delay;
> + struct delayed_work as_sdp_work;
> u16 su_w_granularity;
> u16 su_y_granularity;
> bool source_panel_replay_support;
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index ef164a797..7b8a8c3a4 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3830,6 +3830,7 @@ intel_dp_compute_config(struct
> intel_atomic_state *state,
> intel_vrr_compute_config(pipe_config, conn_state);
> intel_psr_compute_config(intel_dp, pipe_config, conn_state);
> intel_dp_compute_as_sdp(intel_dp, pipe_config);
> + intel_psr_compute_as_sdp_config(intel_dp, pipe_config);
> intel_alpm_lobf_compute_config(intel_dp, pipe_config,
> conn_state);
> intel_dp_drrs_compute_config(connector, pipe_config,
> link_bpp_x16);
> intel_dp_compute_vsc_sdp(intel_dp, pipe_config, conn_state);
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index bd1656360..8407b34f2 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -1704,10 +1704,38 @@ static inline bool
> compute_link_off_after_as_sdp_when_pr_active(struct intel_con
> DP_PANEL_REPLAY_LINK_OFF_SUPPORTED_IN_PR_AFTER_ADAPT
> IVE_SYNC_SDP);
> }
>
> -static inline bool compute_disable_as_sdp_when_pr_active(struct
> intel_connector *connector)
> +static bool compute_disable_as_sdp_when_pr_active(struct intel_dp
> *intel_dp,
> + const struct
> intel_crtc_state *crtc_state)
> {
> - return !(connector-
> >dp.panel_replay_caps.dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CA
> PABILITY)] &
> -
> DP_PANEL_REPLAY_ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR);
> + struct intel_connector *connector = intel_dp-
> >attached_connector;
> + const u8 *pr_dpcd = connector->dp.panel_replay_caps.dpcd;
> +
> + if
> (pr_dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)] &
> + DP_PANEL_REPLAY_ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR)
> + return false;
> +
> + /* AS SDP skip frames needs the AS SDP to keep flowing in PR
> Active */
> + if (intel_alpm_pr_as_sdp_skip_frames_enabled(intel_dp,
> crtc_state))
> + return false;
> +
> + return intel_psr_needs_alpm_aux_less(intel_dp, crtc_state)
> &&
> + (crtc_state->infoframes.enable &
> + intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC));
> +}
> +
> +/**
> + * intel_psr_compute_as_sdp_config - compute whether the AS SDP is
> suspended in PR Active
> + * @intel_dp: Intel DP struct
> + * @crtc_state: crtc state
> + *
> + * Must be called after the AS SDP infoframe has been computed.
> + */
> +void intel_psr_compute_as_sdp_config(struct intel_dp *intel_dp,
> + struct intel_crtc_state
> *crtc_state)
> +{
> + crtc_state->disable_as_sdp_when_pr_active =
> + crtc_state->has_panel_replay &&
> + compute_disable_as_sdp_when_pr_active(intel_dp,
> crtc_state);
> }
>
> static bool _panel_replay_compute_config(struct intel_crtc_state
> *crtc_state,
> @@ -1745,7 +1773,6 @@ static bool _panel_replay_compute_config(struct
> intel_crtc_state *crtc_state,
> }
>
> crtc_state->link_off_after_as_sdp_when_pr_active =
> compute_link_off_after_as_sdp_when_pr_active(connector);
> - crtc_state->disable_as_sdp_when_pr_active =
> compute_disable_as_sdp_when_pr_active(connector);
>
> if (!intel_dp_is_edp(intel_dp))
> return true;
> @@ -2183,6 +2210,47 @@ 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 of them then drift out of phase with the source and
> judder
> + * while frames are being updated. Send the AS SDP in PR Active from
> the first
> + * frame update and suspend it again once the display has been idle
> for
> + * as_sdp_idle_delay. DC5/DC6 needs the same number of idle frames,
> so little
> + * DC5/DC6 residency is lost.
> + */
> +static void intel_psr_pr_as_sdp_suspend_work(struct work_struct
> *work)
> +{
> + struct intel_dp *intel_dp =
> + container_of(work, typeof(*intel_dp),
> psr.as_sdp_work.work);
> +
> + mutex_lock(&intel_dp->psr.lock);
> + if (intel_dp->psr.enabled && intel_dp->psr.as_sdp_in_active)
> {
> + intel_alpm_pr_as_sdp_in_active_disable(intel_dp,
> intel_dp->psr.transcoder,
> + true);
> + intel_dp->psr.as_sdp_in_active = false;
> + }
> + mutex_unlock(&intel_dp->psr.lock);
> +}
> +
> +static void intel_psr_pr_as_sdp_flush_locked(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.disable_as_sdp_when_pr_active)
> + return;
> +
> + if (!intel_dp->psr.as_sdp_in_active) {
> + intel_alpm_pr_as_sdp_in_active_disable(intel_dp,
> intel_dp->psr.transcoder,
> + false);
> + intel_dp->psr.as_sdp_in_active = true;
> + }
> +
> + mod_delayed_work(display->wq.unordered, &intel_dp-
> >psr.as_sdp_work,
> + intel_dp->psr.as_sdp_idle_delay);
> +}
> +
> static void intel_psr_enable_locked(struct intel_dp *intel_dp,
> const struct intel_crtc_state
> *crtc_state)
> {
> @@ -2201,6 +2269,7 @@ static void intel_psr_enable_locked(struct
> intel_dp *intel_dp,
> /* DC5/DC6 requires at least 6 idle frames */
> val = usecs_to_jiffies(intel_get_frame_time_us(crtc_state) *
> 6);
> intel_dp->psr.dc3co_exit_delay = val;
> + intel_dp->psr.as_sdp_idle_delay = val;
> intel_dp->psr.psr2_sel_fetch_enabled = crtc_state-
> >enable_psr2_sel_fetch;
> intel_dp->psr.su_region_et_enabled = crtc_state-
> >enable_psr2_su_region_et;
> intel_dp->psr.psr2_sel_fetch_cff_enabled = false;
> @@ -2211,6 +2280,9 @@ static void intel_psr_enable_locked(struct
> intel_dp *intel_dp,
> intel_dp->psr.io_wake_lines = crtc_state-
> >alpm_state.io_wake_lines;
> intel_dp->psr.fast_wake_lines = crtc_state-
> >alpm_state.fast_wake_lines;
> intel_dp->psr.entry_setup_frames = crtc_state-
> >entry_setup_frames;
> + intel_dp->psr.disable_as_sdp_when_pr_active =
> + crtc_state->disable_as_sdp_when_pr_active;
> + intel_dp->psr.as_sdp_in_active = false;
>
> if (!psr_interrupt_error_check(intel_dp))
> return;
> @@ -2243,6 +2315,10 @@ static void intel_psr_enable_locked(struct
> intel_dp *intel_dp,
> intel_dp->psr.enabled = true;
> intel_dp->psr.pause_counter = 0;
>
> + if (intel_dp->psr.disable_as_sdp_when_pr_active)
> + intel_alpm_pr_as_sdp_in_active_disable(intel_dp,
> intel_dp->psr.transcoder,
> + true);
> +
> /*
> * 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
> @@ -2419,6 +2495,8 @@ static void intel_psr_disable_locked(struct
> intel_dp *intel_dp)
> intel_dp->psr.pipe_mask = 0;
> cancel_delayed_work(&intel_dp->psr.dc3co_work);
> intel_dp->psr.dc3co_allowed = false;
> + cancel_delayed_work(&intel_dp->psr.as_sdp_work);
> + intel_dp->psr.as_sdp_in_active = false;
> }
>
> /**
> @@ -2449,6 +2527,7 @@ void intel_psr_disable(struct intel_dp
> *intel_dp,
> mutex_unlock(&intel_dp->psr.lock);
> cancel_work_sync(&intel_dp->psr.work);
> cancel_delayed_work_sync(&intel_dp->psr.dc3co_work);
> + cancel_delayed_work_sync(&intel_dp->psr.as_sdp_work);
> }
>
> /**
> @@ -3853,6 +3932,8 @@ void intel_psr_flush(struct intel_display
> *display,
>
> intel_dp->psr.busy_frontbuffer_bits &=
> ~pipe_frontbuffer_bits;
>
> + intel_psr_pr_as_sdp_flush_locked(intel_dp);
> +
> if (intel_dp->psr.pause_counter)
> goto rearm;
>
> @@ -3931,6 +4012,7 @@ void intel_psr_init(struct intel_dp *intel_dp)
>
> INIT_WORK(&intel_dp->psr.work, intel_psr_work);
> INIT_DELAYED_WORK(&intel_dp->psr.dc3co_work,
> psr2_dc3co_disable_work);
> + INIT_DELAYED_WORK(&intel_dp->psr.as_sdp_work,
> intel_psr_pr_as_sdp_suspend_work);
> mutex_init(&intel_dp->psr.lock);
> }
>
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.h
> b/drivers/gpu/drm/i915/display/intel_psr.h
> index d545fdaa0..ddeccb3a9 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.h
> +++ b/drivers/gpu/drm/i915/display/intel_psr.h
> @@ -80,6 +80,8 @@ int intel_psr_min_set_context_latency(const struct
> intel_crtc_state *crtc_state)
> void intel_psr_connector_debugfs_add(struct intel_connector
> *connector);
> void intel_psr_debugfs_register(struct intel_display *display);
> bool intel_psr_needs_alpm(struct intel_dp *intel_dp, const struct
> intel_crtc_state *crtc_state);
> +void intel_psr_compute_as_sdp_config(struct intel_dp *intel_dp,
> + struct intel_crtc_state
> *crtc_state);
> bool intel_psr_needs_alpm_aux_less(struct intel_dp *intel_dp,
> const struct intel_crtc_state
> *crtc_state);
> void intel_psr_compute_config_late(struct intel_dp *intel_dp,
^ permalink raw reply [flat|nested] 33+ messages in thread* Re: [PATCH v2 2/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating
2026-11-24 11:02 ` Hogander, Jouni
@ 2026-11-24 11:16 ` Hogander, Jouni
0 siblings, 0 replies; 33+ messages in thread
From: Hogander, Jouni @ 2026-11-24 11:16 UTC (permalink / raw)
To: ville.syrjala@linux.intel.com, j@metarealtyinc.ca
Cc: intel-xe@lists.freedesktop.org, Shankar, Uma, Vivi, Rodrigo,
Manna, Animesh, intel-gfx@lists.freedesktop.org,
jani.nikula@linux.intel.com, Nautiyal, Ankit K
On Tue, 2026-11-24 at 13:02 +0200, Hogander, Jouni wrote:
> On Sat, 2026-11-21 at 07:25 -0500, 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) 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] on a
> > frontbuffer
> > flush (flips, cursor updates and frontbuffer rendering) and set it
> > again
> > from a delayed work once there has been no flush for 6 frames, the
> > same
> > idle time DC3CO and DC5/DC6 use.
> >
> > disable_as_sdp_when_pr_active is now computed after the AS SDP
> > config
> > and is only set when the AS SDP is actually sent, ALPM AUX-less is
> > used
> > and AS SDP skip frames is not.
>
> You don't need this patch. Flush is disabling Panel Replay and then
> this disable_as_sdp_when_pr_active doesn't matter.
Ok, it seems this patch contains also usable code. See my inline
comments below.
>
> BR,
> Jouni Högander
>
> >
> > Fixes: d6a8336c5f06 ("drm/i915/alpm: Write PR_ALPM_CTL register")
> > Cc: Jouni Högander <jouni.hogander@intel.com>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: intel-gfx@lists.freedesktop.org
> > Cc: intel-xe@lists.freedesktop.org
> > Cc: <stable@vger.kernel.org> # v6.17+
> > Signed-off-by: Jake Steinman <j@metarealtyinc.ca>
> > ---
> > .../drm/i915/display/intel_display_types.h | 5 ++
> > drivers/gpu/drm/i915/display/intel_dp.c | 1 +
> > drivers/gpu/drm/i915/display/intel_psr.c | 90
> > ++++++++++++++++++-
> > drivers/gpu/drm/i915/display/intel_psr.h | 2 +
> > 4 files changed, 94 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h
> > b/drivers/gpu/drm/i915/display/intel_display_types.h
> > index 90a5d2916..991d3a2fe 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> > @@ -1823,6 +1823,11 @@ struct intel_psr {
> > bool dc3co_allowed;
> > /* DC3CO disable work */
> > struct delayed_work dc3co_work;
> > + /* AS SDP in PR Active is sent while frames are being
> > updated */
> > + bool disable_as_sdp_when_pr_active;
> > + bool as_sdp_in_active;
> > + unsigned long as_sdp_idle_delay;
> > + struct delayed_work as_sdp_work;
You don't need these.
> > u16 su_w_granularity;
> > u16 su_y_granularity;
> > bool source_panel_replay_support;
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> > b/drivers/gpu/drm/i915/display/intel_dp.c
> > index ef164a797..7b8a8c3a4 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > @@ -3830,6 +3830,7 @@ intel_dp_compute_config(struct
> > intel_atomic_state *state,
> > intel_vrr_compute_config(pipe_config, conn_state);
> > intel_psr_compute_config(intel_dp, pipe_config,
> > conn_state);
> > intel_dp_compute_as_sdp(intel_dp, pipe_config);
> > + intel_psr_compute_as_sdp_config(intel_dp, pipe_config);
How about doing this in intel_psr_compute_config_late? Doing it this
way you can many related changes below.
> > intel_alpm_lobf_compute_config(intel_dp, pipe_config,
> > conn_state);
> > intel_dp_drrs_compute_config(connector, pipe_config,
> > link_bpp_x16);
> > intel_dp_compute_vsc_sdp(intel_dp, pipe_config,
> > conn_state);
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index bd1656360..8407b34f2 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -1704,10 +1704,38 @@ static inline bool
> > compute_link_off_after_as_sdp_when_pr_active(struct intel_con
> > DP_PANEL_REPLAY_LINK_OFF_SUPPORTED_IN_PR_AFTER_ADA
> > PT
> > IVE_SYNC_SDP);
> > }
> >
> > -static inline bool compute_disable_as_sdp_when_pr_active(struct
> > intel_connector *connector)
> > +static bool compute_disable_as_sdp_when_pr_active(struct intel_dp
> > *intel_dp,
> > + const struct
> > intel_crtc_state *crtc_state)
> > {
> > - return !(connector-
> > > dp.panel_replay_caps.dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP
> > > _CA
> > PABILITY)] &
> > -
> > DP_PANEL_REPLAY_ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR);
> > + struct intel_connector *connector = intel_dp-
> > > attached_connector;
> > + const u8 *pr_dpcd = connector->dp.panel_replay_caps.dpcd;
> > +
> > + if
> > (pr_dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)] &
> > +
> > DP_PANEL_REPLAY_ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR)
> > + return false;
> > +
> > + /* AS SDP skip frames needs the AS SDP to keep flowing in
> > PR
> > Active */
> > + if (intel_alpm_pr_as_sdp_skip_frames_enabled(intel_dp,
> > crtc_state))
> > + return false;
> > +
> > + return intel_psr_needs_alpm_aux_less(intel_dp, crtc_state)
> > &&
> > + (crtc_state->infoframes.enable &
> > +
> > intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC));
> > +}
> > +
> > +/**
> > + * intel_psr_compute_as_sdp_config - compute whether the AS SDP is
> > suspended in PR Active
> > + * @intel_dp: Intel DP struct
> > + * @crtc_state: crtc state
> > + *
> > + * Must be called after the AS SDP infoframe has been computed.
> > + */
> > +void intel_psr_compute_as_sdp_config(struct intel_dp *intel_dp,
> > + struct intel_crtc_state
> > *crtc_state)
> > +{
> > + crtc_state->disable_as_sdp_when_pr_active =
> > + crtc_state->has_panel_replay &&
> > + compute_disable_as_sdp_when_pr_active(intel_dp,
> > crtc_state);
> > }
> >
> > static bool _panel_replay_compute_config(struct intel_crtc_state
> > *crtc_state,
> > @@ -1745,7 +1773,6 @@ static bool
> > _panel_replay_compute_config(struct
> > intel_crtc_state *crtc_state,
> > }
> >
> > crtc_state->link_off_after_as_sdp_when_pr_active =
> > compute_link_off_after_as_sdp_when_pr_active(connector);
> > - crtc_state->disable_as_sdp_when_pr_active =
> > compute_disable_as_sdp_when_pr_active(connector);
> >
> > if (!intel_dp_is_edp(intel_dp))
> > return true;
> > @@ -2183,6 +2210,47 @@ 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 of them then drift out of phase with the source
> > and
> > judder
> > + * while frames are being updated. Send the AS SDP in PR Active
> > from
> > the first
> > + * frame update and suspend it again once the display has been
> > idle
> > for
> > + * as_sdp_idle_delay. DC5/DC6 needs the same number of idle
> > frames,
> > so little
> > + * DC5/DC6 residency is lost.
> > + */
> > +static void intel_psr_pr_as_sdp_suspend_work(struct work_struct
> > *work)
> > +{
> > + struct intel_dp *intel_dp =
> > + container_of(work, typeof(*intel_dp),
> > psr.as_sdp_work.work);
> > +
> > + mutex_lock(&intel_dp->psr.lock);
> > + if (intel_dp->psr.enabled && intel_dp-
> > >psr.as_sdp_in_active)
> > {
> > + intel_alpm_pr_as_sdp_in_active_disable(intel_dp,
> > intel_dp->psr.transcoder,
> > + true);
> > + intel_dp->psr.as_sdp_in_active = false;
> > + }
> > + mutex_unlock(&intel_dp->psr.lock);
> > +}
> > +
> > +static void intel_psr_pr_as_sdp_flush_locked(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.disable_as_sdp_when_pr_active)
> > + return;
> > +
> > + if (!intel_dp->psr.as_sdp_in_active) {
> > + intel_alpm_pr_as_sdp_in_active_disable(intel_dp,
> > intel_dp->psr.transcoder,
> > + false);
> > + intel_dp->psr.as_sdp_in_active = true;
> > + }
> > +
> > + mod_delayed_work(display->wq.unordered, &intel_dp-
> > > psr.as_sdp_work,
> > + intel_dp->psr.as_sdp_idle_delay);
> > +}
> > +
As mentioned earlier. You don't need to worry about about frontbuffer
flush.
> > static void intel_psr_enable_locked(struct intel_dp *intel_dp,
> > const struct intel_crtc_state
> > *crtc_state)
> > {
> > @@ -2201,6 +2269,7 @@ static void intel_psr_enable_locked(struct
> > intel_dp *intel_dp,
> > /* DC5/DC6 requires at least 6 idle frames */
> > val = usecs_to_jiffies(intel_get_frame_time_us(crtc_state)
> > *
> > 6);
> > intel_dp->psr.dc3co_exit_delay = val;
> > + intel_dp->psr.as_sdp_idle_delay = val;
Same here.
> > intel_dp->psr.psr2_sel_fetch_enabled = crtc_state-
> > > enable_psr2_sel_fetch;
> > intel_dp->psr.su_region_et_enabled = crtc_state-
> > > enable_psr2_su_region_et;
> > intel_dp->psr.psr2_sel_fetch_cff_enabled = false;
> > @@ -2211,6 +2280,9 @@ static void intel_psr_enable_locked(struct
> > intel_dp *intel_dp,
> > intel_dp->psr.io_wake_lines = crtc_state-
> > > alpm_state.io_wake_lines;
> > intel_dp->psr.fast_wake_lines = crtc_state-
> > > alpm_state.fast_wake_lines;
> > intel_dp->psr.entry_setup_frames = crtc_state-
> > > entry_setup_frames;
> > + intel_dp->psr.disable_as_sdp_when_pr_active =
> > + crtc_state->disable_as_sdp_when_pr_active;
> > + intel_dp->psr.as_sdp_in_active = false;
and here.
> >
> > if (!psr_interrupt_error_check(intel_dp))
> > return;
> > @@ -2243,6 +2315,10 @@ static void intel_psr_enable_locked(struct
> > intel_dp *intel_dp,
> > intel_dp->psr.enabled = true;
> > intel_dp->psr.pause_counter = 0;
> >
> > + if (intel_dp->psr.disable_as_sdp_when_pr_active)
> > + intel_alpm_pr_as_sdp_in_active_disable(intel_dp,
> > intel_dp->psr.transcoder,
> > + true);
I think you should not do it here uncoditionally. Otherwise we may end
up having it set while vblank is enabled.
BR,
Jouni Högander
> > +
> > /*
> > * 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
> > @@ -2419,6 +2495,8 @@ static void intel_psr_disable_locked(struct
> > intel_dp *intel_dp)
> > intel_dp->psr.pipe_mask = 0;
> > cancel_delayed_work(&intel_dp->psr.dc3co_work);
> > intel_dp->psr.dc3co_allowed = false;
> > + cancel_delayed_work(&intel_dp->psr.as_sdp_work);
> > + intel_dp->psr.as_sdp_in_active = false;
> > }
> >
> > /**
> > @@ -2449,6 +2527,7 @@ void intel_psr_disable(struct intel_dp
> > *intel_dp,
> > mutex_unlock(&intel_dp->psr.lock);
> > cancel_work_sync(&intel_dp->psr.work);
> > cancel_delayed_work_sync(&intel_dp->psr.dc3co_work);
> > + cancel_delayed_work_sync(&intel_dp->psr.as_sdp_work);
> > }
> >
> > /**
> > @@ -3853,6 +3932,8 @@ void intel_psr_flush(struct intel_display
> > *display,
> >
> > intel_dp->psr.busy_frontbuffer_bits &=
> > ~pipe_frontbuffer_bits;
> >
> > + intel_psr_pr_as_sdp_flush_locked(intel_dp);
> > +
> > if (intel_dp->psr.pause_counter)
> > goto rearm;
> >
> > @@ -3931,6 +4012,7 @@ void intel_psr_init(struct intel_dp
> > *intel_dp)
> >
> > INIT_WORK(&intel_dp->psr.work, intel_psr_work);
> > INIT_DELAYED_WORK(&intel_dp->psr.dc3co_work,
> > psr2_dc3co_disable_work);
> > + INIT_DELAYED_WORK(&intel_dp->psr.as_sdp_work,
> > intel_psr_pr_as_sdp_suspend_work);
> > mutex_init(&intel_dp->psr.lock);
> > }
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.h
> > b/drivers/gpu/drm/i915/display/intel_psr.h
> > index d545fdaa0..ddeccb3a9 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.h
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.h
> > @@ -80,6 +80,8 @@ int intel_psr_min_set_context_latency(const
> > struct
> > intel_crtc_state *crtc_state)
> > void intel_psr_connector_debugfs_add(struct intel_connector
> > *connector);
> > void intel_psr_debugfs_register(struct intel_display *display);
> > bool intel_psr_needs_alpm(struct intel_dp *intel_dp, const struct
> > intel_crtc_state *crtc_state);
> > +void intel_psr_compute_as_sdp_config(struct intel_dp *intel_dp,
> > + struct intel_crtc_state
> > *crtc_state);
> > bool intel_psr_needs_alpm_aux_less(struct intel_dp *intel_dp,
> > const struct intel_crtc_state
> > *crtc_state);
> > void intel_psr_compute_config_late(struct intel_dp *intel_dp,
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v2 3/4] drm/i915/alpm: Leave AS SDP Transmission in Active Disable to PSR code
2026-11-21 12:25 ` [PATCH v2 0/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating Jake Steinman
2026-11-21 12:25 ` [PATCH v2 1/4] drm/i915/alpm: Add a helper to suspend the AS SDP in PR Active Jake Steinman
2026-11-21 12:25 ` [PATCH v2 2/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating Jake Steinman
@ 2026-11-21 12:25 ` Jake Steinman
2026-11-23 15:32 ` sashiko-bot
2026-11-24 11:19 ` Hogander, Jouni
2026-11-21 12:25 ` [PATCH v2 4/4] drm/i915/display: Remove the Panel Replay quirk for Dell XPS 16 DA16260 Jake Steinman
2026-11-24 11:20 ` [PATCH v2 0/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating Hogander, Jouni
4 siblings, 2 replies; 33+ messages in thread
From: Jake Steinman @ 2026-11-21 12:25 UTC (permalink / raw)
To: jouni.hogander, ville.syrjala
Cc: intel-gfx, intel-xe, animesh.manna, ankit.k.nautiyal, uma.shankar,
rodrigo.vivi, jani.nikula
PSR code now sets and clears PR_ALPM_CTL[AS SDP Transmission in Active
Disable] around frame updates. Stop setting it in
intel_alpm_configure_pr_as_sdp() and keep its current value instead, so
that a seamless VRR toggle no longer suspends the AS SDP while frames are
being updated.
Cc: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Jake Steinman <j@metarealtyinc.ca>
---
drivers/gpu/drm/i915/display/intel_alpm.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
index 910067d27..6f2beb4a4 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.c
+++ b/drivers/gpu/drm/i915/display/intel_alpm.c
@@ -467,8 +467,12 @@ static void intel_alpm_configure_pr_as_sdp(struct intel_dp *intel_dp,
} else {
pr_alpm_ctl &= ~PR_ALPM_CTL_AS_SDP_SKIP_FRAMES_MASK;
- if (crtc_state->disable_as_sdp_when_pr_active)
- pr_alpm_ctl |= PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE;
+ /*
+ * AS SDP Transmission in Active Disable follows frame updates
+ * and is owned by PSR code, keep its current value.
+ */
+ pr_alpm_ctl |= intel_de_read(display, PR_ALPM_CTL(display, cpu_transcoder)) &
+ PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE;
if (intel_display_power_dc3co_allowed(display))
pr_alpm_ctl |= PR_ALPM_CTL_USE_DC3CO_IDLE_PROTOCOL;
--
2.56.1
^ permalink raw reply related [flat|nested] 33+ messages in thread* Re: [PATCH v2 3/4] drm/i915/alpm: Leave AS SDP Transmission in Active Disable to PSR code
2026-11-21 12:25 ` [PATCH v2 3/4] drm/i915/alpm: Leave AS SDP Transmission in Active Disable to PSR code Jake Steinman
@ 2026-11-23 15:32 ` sashiko-bot
2026-11-24 11:19 ` Hogander, Jouni
1 sibling, 0 replies; 33+ messages in thread
From: sashiko-bot @ 2026-11-23 15:32 UTC (permalink / raw)
To: Jake Steinman; +Cc: intel-gfx, intel-xe
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] drm/i915/alpm: stale AS SDP disable bit in
intel_alpm_configure_pr_as_sdp()
- [Medium] drm/i915/alpm: broken AS SDP state on VRR toggle with
periodic AS SDP
--
commit 37f90c53a8bab894fcb3ca18180ab5863311f8e3
Author: Jake Steinman <j@metarealtyinc.ca>
drm/i915/alpm: Leave AS SDP Transmission in Active Disable to PSR code
This commit changes intel_alpm_configure_pr_as_sdp() to preserve the current
hardware value of PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE instead
of setting it from crtc_state->disable_as_sdp_when_pr_active.
> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
> index 910067d271c3c..6f2beb4a4c7c0 100644
> --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
> @@ -467,8 +467,12 @@ static void intel_alpm_configure_pr_as_sdp(struct intel_dp *intel_dp,
> } else {
> pr_alpm_ctl &= ~PR_ALPM_CTL_AS_SDP_SKIP_FRAMES_MASK;
>
> - if (crtc_state->disable_as_sdp_when_pr_active)
> - pr_alpm_ctl |= PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE;
> + /*
> + * AS SDP Transmission in Active Disable follows frame updates
> + * and is owned by PSR code, keep its current value.
> + */
> + pr_alpm_ctl |= intel_de_read(display, PR_ALPM_CTL(display, cpu_transcoder)) &
> + PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE;
>
> if (intel_display_power_dc3co_allowed(display))
> pr_alpm_ctl |= PR_ALPM_CTL_USE_DC3CO_IDLE_PROTOCOL;
[Severity: Medium]
Can PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE remain stuck set when
a transcoder is later configured with skip_frames == 0 and
!crtc_state->disable_as_sdp_when_pr_active?
Neither intel_psr_disable_locked() nor intel_alpm_disable() clears this bit
in PR_ALPM_CTL, and intel_psr_enable_locked() only writes it when
intel_dp->psr.disable_as_sdp_when_pr_active is true:
drivers/gpu/drm/i915/display/intel_psr.c:intel_psr_enable_locked() {
...
if (intel_dp->psr.disable_as_sdp_when_pr_active)
intel_alpm_pr_as_sdp_in_active_disable(intel_dp, intel_dp->psr.transcoder,
true);
...
}
Once a Panel Replay session sets the bit, switching to a configuration where
disable_as_sdp_when_pr_active is false (such as disabling Panel Replay and
enabling AUX-less LOBF via intel_alpm_lobf_enable(), or modesetting to a
mode where compute_disable_as_sdp_when_pr_active() is false) will preserve
the stale bit in PR_ALPM_CTL and keep Adaptive-Sync SDP transmission
disabled in active states with no path clearing it.
[Severity: Medium]
What happens on a seamless VRR toggle via intel_alpm_pr_as_sdp_update() when
periodic AS SDP (skip_frames > 0) is used?
When VRR is off and skip_frames > 0, the if (skip_frames) branch clears
PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE in PR_ALPM_CTL, and
compute_disable_as_sdp_when_pr_active() returns false. If Panel Replay was
enabled while VRR was off, intel_dp->psr.disable_as_sdp_when_pr_active (only
latched in intel_psr_enable_locked()) is also false. When VRR is later
enabled seamlessly (skip_frames == 0), reading PR_ALPM_CTL here reads back 0
and PSR frontbuffer flush/idle tracking ignores AS SDP because
intel_dp->psr.disable_as_sdp_when_pr_active is still false, leaving AS SDP
transmission in PR Active permanently enabled while idle and blocking
DC5/DC6.
Conversely, if Panel Replay is enabled with VRR on
(intel_dp->psr.disable_as_sdp_when_pr_active == true) and VRR is seamlessly
disabled (skip_frames > 0), intel_dp->psr.disable_as_sdp_when_pr_active
remains true and intel_psr_pr_as_sdp_suspend_work() can subsequently set
PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE while non-zero skip_frames
is programmed, violating their mutual exclusion.
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1795263689.git.j@metarealtyinc.ca?part=3
^ permalink raw reply [flat|nested] 33+ messages in thread* Re: [PATCH v2 3/4] drm/i915/alpm: Leave AS SDP Transmission in Active Disable to PSR code
2026-11-21 12:25 ` [PATCH v2 3/4] drm/i915/alpm: Leave AS SDP Transmission in Active Disable to PSR code Jake Steinman
2026-11-23 15:32 ` sashiko-bot
@ 2026-11-24 11:19 ` Hogander, Jouni
1 sibling, 0 replies; 33+ messages in thread
From: Hogander, Jouni @ 2026-11-24 11:19 UTC (permalink / raw)
To: ville.syrjala@linux.intel.com, j@metarealtyinc.ca
Cc: intel-xe@lists.freedesktop.org, Shankar, Uma, Vivi, Rodrigo,
Manna, Animesh, intel-gfx@lists.freedesktop.org,
jani.nikula@linux.intel.com, Nautiyal, Ankit K
On Sat, 2026-11-21 at 07:25 -0500, Jake Steinman wrote:
> PSR code now sets and clears PR_ALPM_CTL[AS SDP Transmission in
> Active
> Disable] around frame updates. Stop setting it in
> intel_alpm_configure_pr_as_sdp() and keep its current value instead,
> so
> that a seamless VRR toggle no longer suspends the AS SDP while frames
> are
> being updated.
>
> Cc: Jouni Högander <jouni.hogander@intel.com>
> Signed-off-by: Jake Steinman <j@metarealtyinc.ca>
> ---
> drivers/gpu/drm/i915/display/intel_alpm.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c
> b/drivers/gpu/drm/i915/display/intel_alpm.c
> index 910067d27..6f2beb4a4 100644
> --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
> @@ -467,8 +467,12 @@ static void
> intel_alpm_configure_pr_as_sdp(struct intel_dp *intel_dp,
> } else {
> pr_alpm_ctl &= ~PR_ALPM_CTL_AS_SDP_SKIP_FRAMES_MASK;
>
> - if (crtc_state->disable_as_sdp_when_pr_active)
> - pr_alpm_ctl |=
> PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE;
> + /*
> + * AS SDP Transmission in Active Disable follows
> frame updates
> + * and is owned by PSR code, keep its current value.
> + */
> + pr_alpm_ctl |= intel_de_read(display,
> PR_ALPM_CTL(display, cpu_transcoder)) &
> + PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DI
> SABLE;
I'm not sure if this deserves this much attention. Just remove setting
it.
BR,
Jouni Högander
>
> if (intel_display_power_dc3co_allowed(display))
> pr_alpm_ctl |=
> PR_ALPM_CTL_USE_DC3CO_IDLE_PROTOCOL;
^ permalink raw reply [flat|nested] 33+ messages in thread
* [PATCH v2 4/4] drm/i915/display: Remove the Panel Replay quirk for Dell XPS 16 DA16260
2026-11-21 12:25 ` [PATCH v2 0/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating Jake Steinman
` (2 preceding siblings ...)
2026-11-21 12:25 ` [PATCH v2 3/4] drm/i915/alpm: Leave AS SDP Transmission in Active Disable to PSR code Jake Steinman
@ 2026-11-21 12:25 ` Jake Steinman
2026-11-24 11:20 ` [PATCH v2 0/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating Hogander, Jouni
4 siblings, 0 replies; 33+ messages in thread
From: Jake Steinman @ 2026-11-21 12:25 UTC (permalink / raw)
To: jouni.hogander, ville.syrjala
Cc: intel-gfx, intel-xe, animesh.manna, ankit.k.nautiyal, uma.shankar,
rodrigo.vivi, jani.nikula
Panel Replay was disabled on the Dell XPS 16 DA16260 because the panel
judders with it. The judder comes from the AS SDP being suspended in PR
Active, which the previous patches fix by sending it while frames are
being updated. Panel Replay Selective Update works on this
laptop now, so remove the quirk.
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/9119
Cc: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Jake Steinman <j@metarealtyinc.ca>
---
drivers/gpu/drm/i915/display/intel_quirks.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_quirks.c b/drivers/gpu/drm/i915/display/intel_quirks.c
index 96eb9a40d..6070440f8 100644
--- a/drivers/gpu/drm/i915/display/intel_quirks.c
+++ b/drivers/gpu/drm/i915/display/intel_quirks.c
@@ -289,14 +289,6 @@ static const struct intel_dpcd_quirk intel_dpcd_quirks[] = {
.sink_oui = SINK_OUI(0x00, 0x22, 0xb9),
.hook = quirk_disable_edp_panel_replay,
},
- /* Dell XPS 16 DA16260 */
- {
- .device = DEVICE_ID_ANY,
- .subsystem_vendor = 0x1028,
- .subsystem_device = 0x0dba,
- .sink_oui = SINK_OUI(0x00, 0x22, 0xb9),
- .hook = quirk_disable_edp_panel_replay,
- },
/* TUXEDO InsanityBook 15 v1 */
{
.device = 0x591b,
--
2.56.1
^ permalink raw reply related [flat|nested] 33+ messages in thread* Re: [PATCH v2 0/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating
2026-11-21 12:25 ` [PATCH v2 0/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating Jake Steinman
` (3 preceding siblings ...)
2026-11-21 12:25 ` [PATCH v2 4/4] drm/i915/display: Remove the Panel Replay quirk for Dell XPS 16 DA16260 Jake Steinman
@ 2026-11-24 11:20 ` Hogander, Jouni
2026-11-24 15:36 ` [PATCH v3 " Jake Steinman
4 siblings, 1 reply; 33+ messages in thread
From: Hogander, Jouni @ 2026-11-24 11:20 UTC (permalink / raw)
To: ville.syrjala@linux.intel.com, j@metarealtyinc.ca
Cc: intel-xe@lists.freedesktop.org, Shankar, Uma, Vivi, Rodrigo,
Manna, Animesh, intel-gfx@lists.freedesktop.org,
jani.nikula@linux.intel.com, Nautiyal, Ankit K
On Sat, 2026-11-21 at 07:25 -0500, Jake Steinman wrote:
> Jouni, Ville,
>
> v2 of the RFC, split the way Jouni asked. Following Ville's comment
> it no
> longer depends on vblank interrupts. A frontbuffer flush (flips,
> cursor
> updates, frontbuffer rendering) clears AS SDP Transmission in Active
> Disable, and a delayed work sets it again after 6 idle frames, the
> same
> idle time DC3CO and DC5/DC6 use.
>
> Tested on 7.4-rc3 on the Dell XPS 16 DA16260 (PTL, xe): Panel Replay
> SU
> with Early Transport stays enabled, scrolling is smooth, including
> after
> a lid close/open, which judders without this. DC5/DC6 is still
> entered
> when idle. Rebased on drm-tip and build tested there (W=1, i915 and
> xe).
Generic comment: I think you should go back to your original approach
setting/clearing this bit with vblank.
BR,
Jouni Högander
>
> Changes since the RFC:
> - Trigger on frame updates instead of vblank enable/disable (Ville)
> - New intel_alpm_pr_as_sdp_in_active_disable() helper (Jouni)
> - Drop pr_as_sdp_follow_vblank, do the checks in
> compute_disable_as_sdp_when_pr_active() (Jouni)
> - Stop setting the bit in intel_alpm_configure_pr_as_sdp(), which
> also
> covers the seamless VRR toggle case from the RFC (Jouni)
> - Remove the DA16260 quirk, add Fixes and stable tags (Jouni)
>
> Jake Steinman (4):
> drm/i915/alpm: Add a helper to suspend the AS SDP in PR Active
> drm/i915/psr: Send the AS SDP in PR Active while frames are
> updating
> drm/i915/alpm: Leave AS SDP Transmission in Active Disable to PSR
> code
> drm/i915/display: Remove the Panel Replay quirk for Dell XPS 16
> DA16260
>
> drivers/gpu/drm/i915/display/intel_alpm.c | 30 ++++++-
> drivers/gpu/drm/i915/display/intel_alpm.h | 4 +
> .../drm/i915/display/intel_display_types.h | 5 ++
> drivers/gpu/drm/i915/display/intel_dp.c | 1 +
> drivers/gpu/drm/i915/display/intel_psr.c | 90
> ++++++++++++++++++-
> drivers/gpu/drm/i915/display/intel_psr.h | 2 +
> drivers/gpu/drm/i915/display/intel_quirks.c | 8 --
> 7 files changed, 126 insertions(+), 14 deletions(-)
^ permalink raw reply [flat|nested] 33+ messages in thread* [PATCH v3 0/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating
2026-11-24 11:20 ` [PATCH v2 0/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating Hogander, Jouni
@ 2026-11-24 15:36 ` Jake Steinman
2026-11-24 15:36 ` [PATCH v3 1/4] drm/i915/alpm: Add a helper to suspend the AS SDP in PR Active Jake Steinman
` (3 more replies)
0 siblings, 4 replies; 33+ messages in thread
From: Jake Steinman @ 2026-11-24 15:36 UTC (permalink / raw)
To: jouni.hogander, ville.syrjala
Cc: intel-gfx, intel-xe, animesh.manna, ankit.k.nautiyal, uma.shankar,
rodrigo.vivi, jani.nikula
Jouni, Ville,
v3 with Jouni's review comments on v2 and the sashiko-bot findings.
It still uses frame updates as the trigger. Only non-flip flushes exit
Panel Replay; for ORIGIN_FLIP intel_psr_flush() jumps to rearm, so PR
stays enabled and does selective updates while the hook clears the bit.
That is the path the judder is on here, and v2 has been smoother than
the vblank version in daily use. Jouni prefers going back to vblank and
Ville objected to it in the RFC thread, so I'll leave the trigger to the
two of you and respin with whichever you agree on.
The frame update trigger is unchanged from v2, which has run daily on
7.4-rc3/rc4 on the Dell XPS 16 DA16260 (PTL, xe). The v3 changes are build
tested on drm-tip (W=1, i915 and xe, each patch).
Changes since v2:
- Use intel_dp->alpm.transcoder in the helper (Jouni)
- Compute disable_as_sdp_when_pr_active in
intel_psr_compute_config_late() (Jouni)
- Don't set the bit at PR enable, start with the AS SDP sent and let the
idle work suspend it (Jouni)
- Just stop setting the bit in intel_alpm_configure_pr_as_sdp() instead
of keeping its value (Jouni), which also fixes a stale bit (sashiko)
- Update the latched setting on a seamless VRR toggle (sashiko)
Jake Steinman (4):
drm/i915/alpm: Add a helper to suspend the AS SDP in PR Active
drm/i915/psr: Send the AS SDP in PR Active while frames are updating
drm/i915/alpm: Leave AS SDP Transmission in Active Disable to PSR code
drm/i915/display: Remove the Panel Replay quirk for Dell XPS 16
DA16260
drivers/gpu/drm/i915/display/intel_alpm.c | 44 ++++++-
drivers/gpu/drm/i915/display/intel_alpm.h | 4 +
.../drm/i915/display/intel_display_types.h | 5 +
drivers/gpu/drm/i915/display/intel_psr.c | 120 +++++++++++++++++-
drivers/gpu/drm/i915/display/intel_psr.h | 2 +
drivers/gpu/drm/i915/display/intel_quirks.c | 8 --
6 files changed, 165 insertions(+), 18 deletions(-)
--
2.56.1
^ permalink raw reply [flat|nested] 33+ messages in thread* [PATCH v3 1/4] drm/i915/alpm: Add a helper to suspend the AS SDP in PR Active
2026-11-24 15:36 ` [PATCH v3 " Jake Steinman
@ 2026-11-24 15:36 ` Jake Steinman
2026-11-24 15:36 ` [PATCH v3 2/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating Jake Steinman
` (2 subsequent siblings)
3 siblings, 0 replies; 33+ messages in thread
From: Jake Steinman @ 2026-11-24 15:36 UTC (permalink / raw)
To: jouni.hogander, ville.syrjala
Cc: intel-gfx, intel-xe, animesh.manna, ankit.k.nautiyal, uma.shankar,
rodrigo.vivi, jani.nikula
Add intel_alpm_pr_as_sdp_in_active_disable() to set or clear
PR_ALPM_CTL[AS SDP Transmission in Active Disable] without touching the
other PR_ALPM_CTL fields. PSR code uses it in the next patch to send the
AS SDP in PR Active while frames are being updated.
Cc: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Jake Steinman <j@metarealtyinc.ca>
---
drivers/gpu/drm/i915/display/intel_alpm.c | 20 ++++++++++++++++++++
drivers/gpu/drm/i915/display/intel_alpm.h | 2 ++
2 files changed, 22 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
index f54b29e19..24f1dce72 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.c
+++ b/drivers/gpu/drm/i915/display/intel_alpm.c
@@ -511,6 +511,26 @@ void intel_alpm_pr_as_sdp_update(const struct intel_crtc_state *crtc_state)
}
}
+/**
+ * intel_alpm_pr_as_sdp_in_active_disable - suspend or send the AS SDP in PR Active
+ * @intel_dp: Intel DP struct
+ * @disable: true to suspend the AS SDP in PR Active, false to keep sending it
+ *
+ * Set or clear PR_ALPM_CTL[AS SDP Transmission in Active Disable] and leave
+ * the other PR_ALPM_CTL fields as they are.
+ */
+void intel_alpm_pr_as_sdp_in_active_disable(struct intel_dp *intel_dp,
+ bool disable)
+{
+ struct intel_display *display = to_intel_display(intel_dp);
+
+ mutex_lock(&intel_dp->alpm.lock);
+ intel_de_rmw(display, PR_ALPM_CTL(display, intel_dp->alpm.transcoder),
+ PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE,
+ disable ? PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE : 0);
+ mutex_unlock(&intel_dp->alpm.lock);
+}
+
static void lnl_alpm_configure(struct intel_dp *intel_dp,
const struct intel_crtc_state *crtc_state)
{
diff --git a/drivers/gpu/drm/i915/display/intel_alpm.h b/drivers/gpu/drm/i915/display/intel_alpm.h
index f8f605d94..6ce583d32 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.h
+++ b/drivers/gpu/drm/i915/display/intel_alpm.h
@@ -37,6 +37,8 @@ bool intel_alpm_is_alpm_aux_less(struct intel_dp *intel_dp,
bool intel_alpm_pr_as_sdp_skip_frames_enabled(struct intel_dp *intel_dp,
const struct intel_crtc_state *crtc_state);
void intel_alpm_pr_as_sdp_update(const struct intel_crtc_state *crtc_state);
+void intel_alpm_pr_as_sdp_in_active_disable(struct intel_dp *intel_dp,
+ bool disable);
void intel_alpm_disable(struct intel_dp *intel_dp);
bool intel_alpm_get_error(struct intel_dp *intel_dp);
void intel_alpm_lobf_compute_config_late(struct intel_dp *intel_dp,
--
2.56.1
^ permalink raw reply related [flat|nested] 33+ messages in thread* [PATCH v3 2/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating
2026-11-24 15:36 ` [PATCH v3 " Jake Steinman
2026-11-24 15:36 ` [PATCH v3 1/4] drm/i915/alpm: Add a helper to suspend the AS SDP in PR Active Jake Steinman
@ 2026-11-24 15:36 ` Jake Steinman
2026-11-24 15:36 ` [PATCH v3 3/4] drm/i915/alpm: Leave AS SDP Transmission in Active Disable to PSR code Jake Steinman
2026-11-24 15:36 ` [PATCH v3 4/4] drm/i915/display: Remove the Panel Replay quirk for Dell XPS 16 DA16260 Jake Steinman
3 siblings, 0 replies; 33+ messages in thread
From: Jake Steinman @ 2026-11-24 15:36 UTC (permalink / raw)
To: jouni.hogander, ville.syrjala
Cc: intel-gfx, intel-xe, animesh.manna, ankit.k.nautiyal, uma.shankar,
rodrigo.vivi, jani.nikula
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) 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] on a frontbuffer
flush (flips, cursor updates and frontbuffer rendering) and set it again
from a delayed work once there has been no flush for 6 frames, the same
idle time DC3CO and DC5/DC6 use.
Panel Replay is enabled with the AS SDP sent, so the bit is never set
while frames are still being updated, and the delayed work suspends it
once idle.
disable_as_sdp_when_pr_active is now computed in
intel_psr_compute_config_late(), after the AS SDP config, and is only set
when the AS SDP is actually sent, ALPM AUX-less is used and AS SDP skip
frames is not.
Fixes: d6a8336c5f06 ("drm/i915/alpm: Write PR_ALPM_CTL register")
Cc: Jouni Högander <jouni.hogander@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v6.17+
Signed-off-by: Jake Steinman <j@metarealtyinc.ca>
---
.../drm/i915/display/intel_display_types.h | 5 ++
drivers/gpu/drm/i915/display/intel_psr.c | 84 ++++++++++++++++++-
2 files changed, 85 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 90a5d2916..991d3a2fe 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1823,6 +1823,11 @@ struct intel_psr {
bool dc3co_allowed;
/* DC3CO disable work */
struct delayed_work dc3co_work;
+ /* AS SDP in PR Active is sent while frames are being updated */
+ bool disable_as_sdp_when_pr_active;
+ bool as_sdp_in_active;
+ unsigned long as_sdp_idle_delay;
+ struct delayed_work as_sdp_work;
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 bd1656360..62cda4365 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1704,10 +1704,23 @@ static inline bool compute_link_off_after_as_sdp_when_pr_active(struct intel_con
DP_PANEL_REPLAY_LINK_OFF_SUPPORTED_IN_PR_AFTER_ADAPTIVE_SYNC_SDP);
}
-static inline bool compute_disable_as_sdp_when_pr_active(struct intel_connector *connector)
+static bool compute_disable_as_sdp_when_pr_active(struct intel_dp *intel_dp,
+ const struct intel_crtc_state *crtc_state)
{
- return !(connector->dp.panel_replay_caps.dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)] &
- DP_PANEL_REPLAY_ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR);
+ struct intel_connector *connector = intel_dp->attached_connector;
+ const u8 *pr_dpcd = connector->dp.panel_replay_caps.dpcd;
+
+ if (pr_dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)] &
+ DP_PANEL_REPLAY_ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR)
+ return false;
+
+ /* AS SDP skip frames needs the AS SDP to keep flowing in PR Active */
+ if (intel_alpm_pr_as_sdp_skip_frames_enabled(intel_dp, crtc_state))
+ return false;
+
+ return intel_psr_needs_alpm_aux_less(intel_dp, crtc_state) &&
+ (crtc_state->infoframes.enable &
+ intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC));
}
static bool _panel_replay_compute_config(struct intel_crtc_state *crtc_state,
@@ -1745,7 +1758,6 @@ static bool _panel_replay_compute_config(struct intel_crtc_state *crtc_state,
}
crtc_state->link_off_after_as_sdp_when_pr_active = compute_link_off_after_as_sdp_when_pr_active(connector);
- crtc_state->disable_as_sdp_when_pr_active = compute_disable_as_sdp_when_pr_active(connector);
if (!intel_dp_is_edp(intel_dp))
return true;
@@ -2183,6 +2195,45 @@ 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 of them then drift out of phase with the source and judder
+ * while frames are being updated. Send the AS SDP in PR Active from the first
+ * frame update and suspend it again once the display has been idle for
+ * as_sdp_idle_delay. DC5/DC6 needs the same number of idle frames, so little
+ * DC5/DC6 residency is lost.
+ */
+static void intel_psr_pr_as_sdp_suspend_work(struct work_struct *work)
+{
+ struct intel_dp *intel_dp =
+ container_of(work, typeof(*intel_dp), psr.as_sdp_work.work);
+
+ mutex_lock(&intel_dp->psr.lock);
+ if (intel_dp->psr.enabled && intel_dp->psr.as_sdp_in_active) {
+ intel_alpm_pr_as_sdp_in_active_disable(intel_dp, true);
+ intel_dp->psr.as_sdp_in_active = false;
+ }
+ mutex_unlock(&intel_dp->psr.lock);
+}
+
+static void intel_psr_pr_as_sdp_flush_locked(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.disable_as_sdp_when_pr_active)
+ return;
+
+ if (!intel_dp->psr.as_sdp_in_active) {
+ intel_alpm_pr_as_sdp_in_active_disable(intel_dp, false);
+ intel_dp->psr.as_sdp_in_active = true;
+ }
+
+ mod_delayed_work(display->wq.unordered, &intel_dp->psr.as_sdp_work,
+ intel_dp->psr.as_sdp_idle_delay);
+}
+
static void intel_psr_enable_locked(struct intel_dp *intel_dp,
const struct intel_crtc_state *crtc_state)
{
@@ -2201,6 +2252,7 @@ static void intel_psr_enable_locked(struct intel_dp *intel_dp,
/* DC5/DC6 requires at least 6 idle frames */
val = usecs_to_jiffies(intel_get_frame_time_us(crtc_state) * 6);
intel_dp->psr.dc3co_exit_delay = val;
+ intel_dp->psr.as_sdp_idle_delay = val;
intel_dp->psr.psr2_sel_fetch_enabled = crtc_state->enable_psr2_sel_fetch;
intel_dp->psr.su_region_et_enabled = crtc_state->enable_psr2_su_region_et;
intel_dp->psr.psr2_sel_fetch_cff_enabled = false;
@@ -2211,6 +2263,9 @@ static void intel_psr_enable_locked(struct intel_dp *intel_dp,
intel_dp->psr.io_wake_lines = crtc_state->alpm_state.io_wake_lines;
intel_dp->psr.fast_wake_lines = crtc_state->alpm_state.fast_wake_lines;
intel_dp->psr.entry_setup_frames = crtc_state->entry_setup_frames;
+ intel_dp->psr.disable_as_sdp_when_pr_active =
+ crtc_state->disable_as_sdp_when_pr_active;
+ intel_dp->psr.as_sdp_in_active = false;
if (!psr_interrupt_error_check(intel_dp))
return;
@@ -2243,6 +2298,17 @@ static void intel_psr_enable_locked(struct intel_dp *intel_dp,
intel_dp->psr.enabled = true;
intel_dp->psr.pause_counter = 0;
+ /*
+ * Start with the AS SDP sent, the idle work suspends it once there has
+ * been no frame update for as_sdp_idle_delay.
+ */
+ if (intel_dp->psr.disable_as_sdp_when_pr_active) {
+ intel_alpm_pr_as_sdp_in_active_disable(intel_dp, false);
+ intel_dp->psr.as_sdp_in_active = true;
+ mod_delayed_work(display->wq.unordered, &intel_dp->psr.as_sdp_work,
+ intel_dp->psr.as_sdp_idle_delay);
+ }
+
/*
* 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
@@ -2419,6 +2485,8 @@ static void intel_psr_disable_locked(struct intel_dp *intel_dp)
intel_dp->psr.pipe_mask = 0;
cancel_delayed_work(&intel_dp->psr.dc3co_work);
intel_dp->psr.dc3co_allowed = false;
+ cancel_delayed_work(&intel_dp->psr.as_sdp_work);
+ intel_dp->psr.as_sdp_in_active = false;
}
/**
@@ -2449,6 +2517,7 @@ void intel_psr_disable(struct intel_dp *intel_dp,
mutex_unlock(&intel_dp->psr.lock);
cancel_work_sync(&intel_dp->psr.work);
cancel_delayed_work_sync(&intel_dp->psr.dc3co_work);
+ cancel_delayed_work_sync(&intel_dp->psr.as_sdp_work);
}
/**
@@ -3853,6 +3922,8 @@ void intel_psr_flush(struct intel_display *display,
intel_dp->psr.busy_frontbuffer_bits &= ~pipe_frontbuffer_bits;
+ intel_psr_pr_as_sdp_flush_locked(intel_dp);
+
if (intel_dp->psr.pause_counter)
goto rearm;
@@ -3931,6 +4002,7 @@ void intel_psr_init(struct intel_dp *intel_dp)
INIT_WORK(&intel_dp->psr.work, intel_psr_work);
INIT_DELAYED_WORK(&intel_dp->psr.dc3co_work, psr2_dc3co_disable_work);
+ INIT_DELAYED_WORK(&intel_dp->psr.as_sdp_work, intel_psr_pr_as_sdp_suspend_work);
mutex_init(&intel_dp->psr.lock);
}
@@ -4775,6 +4847,10 @@ void intel_psr_compute_config_late(struct intel_dp *intel_dp,
}
intel_psr_set_non_psr_pipes(intel_dp, crtc_state);
+
+ crtc_state->disable_as_sdp_when_pr_active =
+ crtc_state->has_panel_replay &&
+ compute_disable_as_sdp_when_pr_active(intel_dp, crtc_state);
}
int intel_psr_min_guardband(struct intel_crtc_state *crtc_state)
--
2.56.1
^ permalink raw reply related [flat|nested] 33+ messages in thread* [PATCH v3 3/4] drm/i915/alpm: Leave AS SDP Transmission in Active Disable to PSR code
2026-11-24 15:36 ` [PATCH v3 " Jake Steinman
2026-11-24 15:36 ` [PATCH v3 1/4] drm/i915/alpm: Add a helper to suspend the AS SDP in PR Active Jake Steinman
2026-11-24 15:36 ` [PATCH v3 2/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating Jake Steinman
@ 2026-11-24 15:36 ` Jake Steinman
2026-11-24 15:36 ` [PATCH v3 4/4] drm/i915/display: Remove the Panel Replay quirk for Dell XPS 16 DA16260 Jake Steinman
3 siblings, 0 replies; 33+ messages in thread
From: Jake Steinman @ 2026-11-24 15:36 UTC (permalink / raw)
To: jouni.hogander, ville.syrjala
Cc: intel-gfx, intel-xe, animesh.manna, ankit.k.nautiyal, uma.shankar,
rodrigo.vivi, jani.nikula
PSR code now sets and clears PR_ALPM_CTL[AS SDP Transmission in Active
Disable] around frame updates. Stop setting it in
intel_alpm_configure_pr_as_sdp(), so that a seamless VRR toggle no longer
suspends the AS SDP while frames are being updated.
A seamless VRR toggle can also change whether periodic AS SDP is used and
with it whether the AS SDP is suspended in PR Active. Route the toggle
through PSR code so the latched setting, the idle work and PR_ALPM_CTL
are updated together under psr.lock, and the idle work cannot set the
bit while periodic AS SDP is programmed.
Cc: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Jake Steinman <j@metarealtyinc.ca>
---
drivers/gpu/drm/i915/display/intel_alpm.c | 24 +++++++++++----
drivers/gpu/drm/i915/display/intel_alpm.h | 2 ++
drivers/gpu/drm/i915/display/intel_psr.c | 36 +++++++++++++++++++++++
drivers/gpu/drm/i915/display/intel_psr.h | 2 ++
4 files changed, 58 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
index 24f1dce72..454654a5c 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.c
+++ b/drivers/gpu/drm/i915/display/intel_alpm.c
@@ -438,6 +438,8 @@ bool intel_alpm_pr_as_sdp_skip_frames_enabled(struct intel_dp *intel_dp,
* bits. This is a full recompute of those fields (the base value is built from
* scratch, not read back), so it can be called both at PR enable time and when
* VRR is toggled seamlessly - which changes whether periodic AS SDP is used.
+ * AS SDP Transmission in Active Disable is left clear here, PSR code sets it
+ * once the display is idle.
*
* Caller must hold intel_dp->alpm.lock.
*/
@@ -467,9 +469,6 @@ static void intel_alpm_configure_pr_as_sdp(struct intel_dp *intel_dp,
} else {
pr_alpm_ctl &= ~PR_ALPM_CTL_AS_SDP_SKIP_FRAMES_MASK;
- if (crtc_state->disable_as_sdp_when_pr_active)
- pr_alpm_ctl |= PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE;
-
if (intel_display_power_dc3co_allowed(display))
pr_alpm_ctl |= PR_ALPM_CTL_USE_DC3CO_IDLE_PROTOCOL;
}
@@ -505,12 +504,25 @@ void intel_alpm_pr_as_sdp_update(const struct intel_crtc_state *crtc_state)
!intel_alpm_is_alpm_aux_less(intel_dp, crtc_state))
continue;
- mutex_lock(&intel_dp->alpm.lock);
- intel_alpm_configure_pr_as_sdp(intel_dp, crtc_state);
- mutex_unlock(&intel_dp->alpm.lock);
+ intel_psr_pr_as_sdp_update(intel_dp, crtc_state);
}
}
+/**
+ * intel_alpm_pr_as_sdp_configure - program the AS SDP portion of PR_ALPM_CTL
+ * @intel_dp: Intel DP struct
+ * @crtc_state: CRTC state
+ *
+ * Locked wrapper of intel_alpm_configure_pr_as_sdp() for PSR code.
+ */
+void intel_alpm_pr_as_sdp_configure(struct intel_dp *intel_dp,
+ const struct intel_crtc_state *crtc_state)
+{
+ mutex_lock(&intel_dp->alpm.lock);
+ intel_alpm_configure_pr_as_sdp(intel_dp, crtc_state);
+ mutex_unlock(&intel_dp->alpm.lock);
+}
+
/**
* intel_alpm_pr_as_sdp_in_active_disable - suspend or send the AS SDP in PR Active
* @intel_dp: Intel DP struct
diff --git a/drivers/gpu/drm/i915/display/intel_alpm.h b/drivers/gpu/drm/i915/display/intel_alpm.h
index 6ce583d32..831de0514 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.h
+++ b/drivers/gpu/drm/i915/display/intel_alpm.h
@@ -37,6 +37,8 @@ bool intel_alpm_is_alpm_aux_less(struct intel_dp *intel_dp,
bool intel_alpm_pr_as_sdp_skip_frames_enabled(struct intel_dp *intel_dp,
const struct intel_crtc_state *crtc_state);
void intel_alpm_pr_as_sdp_update(const struct intel_crtc_state *crtc_state);
+void intel_alpm_pr_as_sdp_configure(struct intel_dp *intel_dp,
+ const struct intel_crtc_state *crtc_state);
void intel_alpm_pr_as_sdp_in_active_disable(struct intel_dp *intel_dp,
bool disable);
void intel_alpm_disable(struct intel_dp *intel_dp);
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 62cda4365..04003a96b 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -2234,6 +2234,42 @@ static void intel_psr_pr_as_sdp_flush_locked(struct intel_dp *intel_dp)
intel_dp->psr.as_sdp_idle_delay);
}
+/**
+ * intel_psr_pr_as_sdp_update - reprogram the AS SDP on a seamless VRR toggle
+ * @intel_dp: Intel DP
+ * @crtc_state: new CRTC state
+ *
+ * A seamless VRR toggle can change whether periodic AS SDP is used, and with
+ * it whether the AS SDP is suspended in PR Active between frame updates.
+ * Latch the new setting under psr.lock together with the PR_ALPM_CTL update,
+ * so the idle work cannot set AS SDP Transmission in Active Disable while
+ * periodic AS SDP is programmed.
+ */
+void intel_psr_pr_as_sdp_update(struct intel_dp *intel_dp,
+ const struct intel_crtc_state *crtc_state)
+{
+ struct intel_display *display = to_intel_display(intel_dp);
+
+ mutex_lock(&intel_dp->psr.lock);
+
+ if (intel_dp->psr.enabled) {
+ intel_dp->psr.disable_as_sdp_when_pr_active =
+ crtc_state->disable_as_sdp_when_pr_active;
+ intel_dp->psr.as_sdp_in_active = false;
+ cancel_delayed_work(&intel_dp->psr.as_sdp_work);
+ }
+
+ intel_alpm_pr_as_sdp_configure(intel_dp, crtc_state);
+
+ if (intel_dp->psr.enabled && intel_dp->psr.disable_as_sdp_when_pr_active) {
+ intel_dp->psr.as_sdp_in_active = true;
+ mod_delayed_work(display->wq.unordered, &intel_dp->psr.as_sdp_work,
+ intel_dp->psr.as_sdp_idle_delay);
+ }
+
+ mutex_unlock(&intel_dp->psr.lock);
+}
+
static void intel_psr_enable_locked(struct intel_dp *intel_dp,
const struct intel_crtc_state *crtc_state)
{
diff --git a/drivers/gpu/drm/i915/display/intel_psr.h b/drivers/gpu/drm/i915/display/intel_psr.h
index d545fdaa0..56f2260be 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.h
+++ b/drivers/gpu/drm/i915/display/intel_psr.h
@@ -80,6 +80,8 @@ int intel_psr_min_set_context_latency(const struct intel_crtc_state *crtc_state)
void intel_psr_connector_debugfs_add(struct intel_connector *connector);
void intel_psr_debugfs_register(struct intel_display *display);
bool intel_psr_needs_alpm(struct intel_dp *intel_dp, const struct intel_crtc_state *crtc_state);
+void intel_psr_pr_as_sdp_update(struct intel_dp *intel_dp,
+ const struct intel_crtc_state *crtc_state);
bool intel_psr_needs_alpm_aux_less(struct intel_dp *intel_dp,
const struct intel_crtc_state *crtc_state);
void intel_psr_compute_config_late(struct intel_dp *intel_dp,
--
2.56.1
^ permalink raw reply related [flat|nested] 33+ messages in thread* [PATCH v3 4/4] drm/i915/display: Remove the Panel Replay quirk for Dell XPS 16 DA16260
2026-11-24 15:36 ` [PATCH v3 " Jake Steinman
` (2 preceding siblings ...)
2026-11-24 15:36 ` [PATCH v3 3/4] drm/i915/alpm: Leave AS SDP Transmission in Active Disable to PSR code Jake Steinman
@ 2026-11-24 15:36 ` Jake Steinman
3 siblings, 0 replies; 33+ messages in thread
From: Jake Steinman @ 2026-11-24 15:36 UTC (permalink / raw)
To: jouni.hogander, ville.syrjala
Cc: intel-gfx, intel-xe, animesh.manna, ankit.k.nautiyal, uma.shankar,
rodrigo.vivi, jani.nikula
Panel Replay was disabled on the Dell XPS 16 DA16260 because the panel
judders with it. The judder comes from the AS SDP being suspended in PR
Active, which the previous patches fix by sending it while frames are
being updated. Panel Replay Selective Update works on this
laptop now, so remove the quirk.
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/9119
Cc: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Jake Steinman <j@metarealtyinc.ca>
---
drivers/gpu/drm/i915/display/intel_quirks.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_quirks.c b/drivers/gpu/drm/i915/display/intel_quirks.c
index 96eb9a40d..6070440f8 100644
--- a/drivers/gpu/drm/i915/display/intel_quirks.c
+++ b/drivers/gpu/drm/i915/display/intel_quirks.c
@@ -289,14 +289,6 @@ static const struct intel_dpcd_quirk intel_dpcd_quirks[] = {
.sink_oui = SINK_OUI(0x00, 0x22, 0xb9),
.hook = quirk_disable_edp_panel_replay,
},
- /* Dell XPS 16 DA16260 */
- {
- .device = DEVICE_ID_ANY,
- .subsystem_vendor = 0x1028,
- .subsystem_device = 0x0dba,
- .sink_oui = SINK_OUI(0x00, 0x22, 0xb9),
- .hook = quirk_disable_edp_panel_replay,
- },
/* TUXEDO InsanityBook 15 v1 */
{
.device = 0x591b,
--
2.56.1
^ permalink raw reply related [flat|nested] 33+ messages in thread