For Panel Replay with AUX-less ALPM (link-off PR), the source must send Adaptive-Sync SDP v2. Program DB[1:0] per DP spec v2.1: - VRR AVT: 00b (variable VTotal) - VRR FAVT: 10b/11b (TRR not reached/reached) - Fixed timing with PR link-off (VRR off): 01b (AS disabled; VTotal fixed)
Select SDP version v2 whenever PR link-off or VRR is active, otherwise v1, and program the AS SDP DB[1:0] bits. Also, drop the redundant target_rr assignment. Signed-off-by: Ankit Nautiyal <[email protected]> --- drivers/gpu/drm/i915/display/intel_dp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 5952db6197cf..ad2aceb526ff 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -3139,7 +3139,7 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp, as_sdp->duration_incr_ms = 0; as_sdp->version = 0x2; - if (crtc_state->vrr.enable) + if (crtc_state->vrr.enable || intel_psr_is_pr_with_link_off(crtc_state)) as_sdp->version = 0x2; else as_sdp->version = 0x1; @@ -3154,9 +3154,10 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp, as_sdp->mode = DP_AS_SDP_FAVT_TRR_REACHED; as_sdp->target_rr = drm_mode_vrefresh(adjusted_mode); as_sdp->target_rr_divider = true; - } else { + } else if (crtc_state->vrr.enable) { as_sdp->mode = DP_AS_SDP_AVT_DYNAMIC_VTOTAL; - as_sdp->target_rr = 0; + } else if (intel_psr_is_pr_with_link_off(crtc_state)) { + as_sdp->mode = DP_AS_SDP_AVT_FIXED_VTOTAL; } } -- 2.45.2
