]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/dp: Compute as_sdp.vtotal based on vrr timings
authorMitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Thu, 30 Jan 2025 05:16:07 +0000 (10:46 +0530)
committerAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Thu, 30 Jan 2025 14:14:43 +0000 (19:44 +0530)
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: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250130051609.1796524-5-mitulkumar.ajitkumar.golani@intel.com
drivers/gpu/drm/i915/display/intel_dp.c

index 0aeb2d188d80a1d99c724bc49658ac229f88376a..c9ddf6eb2b254afc62882f525395b59cbd45e02d 100644 (file)
@@ -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;
        }
 }