Commit 6218bd2e authored by Mitul Golani's avatar Mitul Golani Committed by Ankit Nautiyal
Browse files

drm/i915/dp: Compute as_sdp.vtotal based on vrr timings



Compute as_sdp.vtotal based on minimum vtotal calculated
during vrr computation.

--v2:
 - make a separate patch and update to vmin only [Ankit].

--v3:
 - Update vtotal to vmin for cmrr case as well [Ankit].

--v4:
 - update vtotal with wrapper function of vmin [Ville]

Signed-off-by: default avatarMitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: default avatarAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: default avatarAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250130051609.1796524-5-mitulkumar.ajitkumar.golani@intel.com
parent c5806862
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2834,15 +2834,14 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
	as_sdp->sdp_type = DP_SDP_ADAPTIVE_SYNC;
	as_sdp->length = 0x9;
	as_sdp->duration_incr_ms = 0;
	as_sdp->vtotal = intel_vrr_vmin_vtotal(crtc_state);

	if (crtc_state->cmrr.enable) {
		as_sdp->mode = DP_AS_SDP_FAVT_TRR_REACHED;
		as_sdp->vtotal = adjusted_mode->vtotal;
		as_sdp->target_rr = drm_mode_vrefresh(adjusted_mode);
		as_sdp->target_rr_divider = true;
	} else {
		as_sdp->mode = DP_AS_SDP_AVT_DYNAMIC_VTOTAL;
		as_sdp->vtotal = adjusted_mode->vtotal;
		as_sdp->target_rr = 0;
	}
}