On Tue, Nov 11, 2025 at 03:00:06PM +0530, Ankit Nautiyal wrote:
> Adaptive Sync SDP is required when Panel replay is active and for
> supporting VRR on PCON.
> 
> Since VRR on PCON still needs some effort, enable adaptive sync SDP only
> when Panel replay with ALPM-Auxless is supported.
> 
> Set the AS_SDP mode for Fixed Vtotal mode for fixed refresh rate case.
> 
> v2: Remove redundant target_rr assignments. (Ville)
> 
> Signed-off-by: Ankit Nautiyal <[email protected]>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index 92a553a76b57..2852a1d9f157 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2935,7 +2935,15 @@ static void intel_dp_compute_as_sdp(struct intel_dp 
> *intel_dp,
>       const struct drm_display_mode *adjusted_mode =
>               &crtc_state->hw.adjusted_mode;
>  
> -     if (!crtc_state->vrr.enable || !intel_dp->as_sdp_supported)
> +     if (!intel_dp->as_sdp_supported)
> +             return;
> +
> +     /*
> +      * Support Adaptive-Sync SDP only for PR+AUX-less ALPM for now.
> +      * It can be enabled for PCON + VRR, but that is currently not 
> supported.
> +      */
> +     if (!CAN_PANEL_REPLAY(intel_dp) ||
> +         !intel_alpm_aux_less_wake_supported(intel_dp))
>               return;
>  
>       crtc_state->infoframes.enable |= 
> intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC);
> @@ -2949,9 +2957,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 {
> +             as_sdp->mode = DP_AS_SDP_AVT_FIXED_VTOTAL;

Reviewed-by: Ville Syrjälä <[email protected]>

But we're still not configuring DOWNSPREAD_CTRL correctly so PR+VRR
seems to be busted.

>       }
>  }
>  
> -- 
> 2.45.2

-- 
Ville Syrjälä
Intel

Reply via email to