Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jake Steinman" <j@metarealtyinc.ca>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2 2/4] drm/i915/psr: Send the AS SDP in PR Active while frames are updating
Date: Mon, 23 Nov 2026 15:45:46 +0000	[thread overview]
Message-ID: <sashiko-outbox-229600@kernel.org> (raw)
In-Reply-To: <ada2073fc66fa74685b73ac085513c5299b1526f.1795263689.git.j@metarealtyinc.ca>

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

  reply	other threads:[~2026-11-23 15:45 UTC|newest]

Thread overview: 23+ 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ä
2026-11-20 16:34       ` Jake Steinman
2026-11-20 17:23         ` Ville Syrjälä
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-23 15:45               ` sashiko-bot [this message]
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-21 12:25             ` [PATCH v2 4/4] drm/i915/display: Remove the Panel Replay quirk for Dell XPS 16 DA16260 Jake Steinman
2026-11-23  9:29           ` [RFC PATCH] drm/i915/psr: Send the AS SDP in PR Active while vblank is enabled Hogander, Jouni
2026-11-23 13:32             ` Jake Steinman
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=sashiko-outbox-229600@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=j@metarealtyinc.ca \
    --cc=sashiko-reviews@lists.linux.dev \
    /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