From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Jouni Högander" <jouni.hogander@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: "Jouni Högander" <jouni.hogander@intel.com>
Subject: Re: [PATCH 3/8] drm/i915/psr: Compute Panel Replay/Adaptive coexistence behavior
Date: Fri, 21 Nov 2025 13:24:18 +0200 [thread overview]
Message-ID: <e9c8d02a1567e58c53a4bce33b941a0e1b4b9975@intel.com> (raw)
In-Reply-To: <20251121111655.164830-4-jouni.hogander@intel.com>
On Fri, 21 Nov 2025, Jouni Högander <jouni.hogander@intel.com> wrote:
> Currently we are checking Panel Replay capability DPCD register in
> intel_alpm.c and writing PR_ALPM_CTL_ALLOW_LINK_OFF_BETWEEN_AS_SDP_AND_SU
> and PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE in PR_ALPM_CTL
> register base on the informaion. Instead of directly accessing
> intel_dp->pr_dpcd compute the behavior during psr_compute_config and store
> it in intel_crtc_state.
>
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_alpm.c | 6 ++---
> .../drm/i915/display/intel_display_types.h | 2 ++
> drivers/gpu/drm/i915/display/intel_psr.c | 22 +++++++++++++++----
> 3 files changed, 22 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
> index 6372f533f65b5..7ce8c674bb030 100644
> --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
> @@ -326,11 +326,9 @@ static void lnl_alpm_configure(struct intel_dp *intel_dp,
> if (intel_dp->as_sdp_supported) {
> u32 pr_alpm_ctl = PR_ALPM_CTL_ADAPTIVE_SYNC_SDP_POSITION_T1;
>
> - if (intel_dp->pr_dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)] &
> - DP_PANEL_REPLAY_LINK_OFF_SUPPORTED_IN_PR_AFTER_ADAPTIVE_SYNC_SDP)
> + if (crtc_state->link_off_after_as_sdp_when_pr_active)
> pr_alpm_ctl |= PR_ALPM_CTL_ALLOW_LINK_OFF_BETWEEN_AS_SDP_AND_SU;
> - if (!(intel_dp->pr_dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)] &
> - DP_PANEL_REPLAY_ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR))
> + if (crtc_state->disable_as_sdp_when_pr_active)
> pr_alpm_ctl |= PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE;
>
> intel_de_write(display, PR_ALPM_CTL(display, cpu_transcoder),
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index f39d62aa99246..d8a222689a35b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -1161,6 +1161,8 @@ struct intel_crtc_state {
> bool enable_psr2_su_region_et;
> bool req_psr2_sdp_prior_scanline;
> bool has_panel_replay;
> + bool link_off_after_as_sdp_when_pr_active;
> + bool disable_as_sdp_when_pr_active;
> bool wm_level_disabled;
> bool pkg_c_latency_used;
Side note, we really *really* should start adding more (anonymous)
sub-structs in intel_crtc_state to group things. This has gotten out of
hands.
> /* Only used for state verification. */
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index 4c5883bed612b..9d2ba39423826 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -1715,10 +1715,21 @@ static bool _psr_compute_config(struct intel_dp *intel_dp,
> return true;
> }
>
> -static bool
> -_panel_replay_compute_config(struct intel_dp *intel_dp,
> - struct intel_crtc_state *crtc_state,
> - const struct drm_connector_state *conn_state)
> +static bool compute_link_off_after_as_sdp_when_pr_active(struct intel_dp *intel_dp)
> +{
> + return (intel_dp->pr_dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)] &
> + DP_PANEL_REPLAY_LINK_OFF_SUPPORTED_IN_PR_AFTER_ADAPTIVE_SYNC_SDP);
> +}
> +
> +static bool compute_disable_as_sdp_when_pr_active(struct intel_dp *intel_dp)
> +{
> + return !(intel_dp->pr_dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)] &
> + DP_PANEL_REPLAY_ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR);
> +}
> +
> +static bool _panel_replay_compute_config(struct intel_dp *intel_dp,
> + struct intel_crtc_state *crtc_state,
> + const struct drm_connector_state *conn_state)
> {
> struct intel_display *display = to_intel_display(intel_dp);
> struct intel_connector *connector =
> @@ -1747,6 +1758,9 @@ _panel_replay_compute_config(struct intel_dp *intel_dp,
> return false;
> }
>
> + crtc_state->link_off_after_as_sdp_when_pr_active = compute_link_off_after_as_sdp_when_pr_active(intel_dp);
> + crtc_state->disable_as_sdp_when_pr_active = compute_disable_as_sdp_when_pr_active(intel_dp);
> +
> if (!intel_dp_is_edp(intel_dp))
> return true;
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-11-21 11:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-21 11:16 [PATCH 0/8] Move PSR/Panel Replay sink data into intel_connector Jouni Högander
2025-11-21 11:16 ` [PATCH 1/8] drm/i915/psr: Add panel granularity information " Jouni Högander
2025-12-01 9:54 ` Imre Deak
2025-11-21 11:16 ` [PATCH 2/8] drm/i915/psr: Use SU granularity information available in intel_connector Jouni Högander
2025-12-01 10:14 ` Imre Deak
2025-11-21 11:16 ` [PATCH 3/8] drm/i915/psr: Compute Panel Replay/Adaptive coexistence behavior Jouni Högander
2025-11-21 11:24 ` Jani Nikula [this message]
2025-12-01 10:28 ` Imre Deak
2025-11-21 11:16 ` [PATCH 4/8] drm/i915/psr: Move pr_dpcd and psr_dpcd to intel_connector Jouni Högander
2025-12-01 10:45 ` Imre Deak
2025-11-21 11:16 ` [PATCH 5/8] drm/i915/psr: Clear pr_dpcd as well on disconnect Jouni Högander
2025-12-01 10:53 ` Imre Deak
2025-12-01 11:23 ` Hogander, Jouni
2025-12-03 14:37 ` Imre Deak
2025-12-03 15:10 ` Hogander, Jouni
2025-11-21 11:16 ` [PATCH 6/8] drm/i915/psr: Move Panel Replay DSC sink support data to intel_connector Jouni Högander
2025-12-01 10:55 ` Imre Deak
2025-11-21 11:16 ` [PATCH 7/8] drm/i915/psr: Move sink PSR and Panel Replay booleans " Jouni Högander
2025-12-01 10:59 ` Imre Deak
2025-11-21 11:16 ` [PATCH 8/8] drm/i915/psr: Move sink_sync_latency " Jouni Högander
2025-12-01 11:03 ` Imre Deak
2025-11-24 20:41 ` ✓ i915.CI.BAT: success for Move PSR/Panel Replay sink data into intel_connector Patchwork
2025-11-25 1:09 ` ✗ i915.CI.Full: failure " 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=e9c8d02a1567e58c53a4bce33b941a0e1b4b9975@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jouni.hogander@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;
as well as URLs for NNTP newsgroup(s).