diff mbox series

[v3,3/3] drm/i915/dp: Compute as_sdp based on if vrr possible

Message ID 20241021105100.2861830-4-mitulkumar.ajitkumar.golani@intel.com (mailing list archive)
State New
Headers show
Series Add AS_SDP to fastset | expand

Commit Message

Golani, Mitulkumar Ajitkumar Oct. 21, 2024, 10:51 a.m. UTC
Adaptive sync sdp param computation, specifically minimum vtotal is
blocking vrr enable and disable fastset requirements in certain scenario
i.e. during null modeset, this minimum vtotal we can configure during
full modeset as well when sink is having vrr support, where it doesn't
need dependency on vrr.enable status and can also match vrr
enable/disable fastset requirement.

Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index b1f68fff524d..0fefe6f16257 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2769,7 +2769,7 @@  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_vrr_possible(crtc_state) || !intel_dp->as_sdp_supported)
 		return;
 
 	crtc_state->infoframes.enable |= intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC);
@@ -2786,7 +2786,7 @@  static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
 		as_sdp->target_rr_divider = true;
 	} else {
 		as_sdp->mode = DP_AS_SDP_AVT_DYNAMIC_VTOTAL;
-		as_sdp->vtotal = adjusted_mode->vtotal;
+		as_sdp->vtotal = crtc_state->vrr.vmin + 1;
 		as_sdp->target_rr = 0;
 	}
 }