[PATCH 4/4] drm/i915/display: Use VRR fixed_refresh_rate mode from MTL+

Ankit Nautiyal ankit.k.nautiyal at intel.com
Mon May 27 11:48:28 UTC 2024


Always use VRR timing generator for fixed refresh rate mode from MTL+.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
---
 drivers/gpu/drm/i915/display/intel_vrr.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
index 5d281f3c9fe4..0dd6cee6188f 100644
--- a/drivers/gpu/drm/i915/display/intel_vrr.c
+++ b/drivers/gpu/drm/i915/display/intel_vrr.c
@@ -129,15 +129,10 @@ intel_vrr_compute_config(struct intel_crtc_state *crtc_state,
 	if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
 		return;
 
-	crtc_state->vrr.in_range =
-		intel_vrr_is_in_range(connector, drm_mode_vrefresh(adjusted_mode));
-	if (!crtc_state->vrr.in_range)
-		return;
-
 	if (HAS_LRR(i915))
 		crtc_state->update_lrr = true;
 
-	if (!crtc_state->uapi.vrr_enabled && DISPLAY_VER(i915) >= 20) {
+	if (!crtc_state->uapi.vrr_enabled && DISPLAY_VER(i915) >= 14) {
 		/*
 		 * for LNL+ if panel supports VRR and user has not set VRR,
 		 * always go for fixed average Vtotal mode.
@@ -148,6 +143,12 @@ intel_vrr_compute_config(struct intel_crtc_state *crtc_state,
 		crtc_state->vrr.fixed_rr = true;
 	} else {
 
+		crtc_state->vrr.in_range =
+		intel_vrr_is_in_range(connector, drm_mode_vrefresh(adjusted_mode));
+		if (!crtc_state->vrr.in_range)
+			return;
+
+
 		vmin = DIV_ROUND_UP(adjusted_mode->crtc_clock * 1000,
 				    adjusted_mode->crtc_htotal * info->monitor_range.max_vfreq);
 		vmax = adjusted_mode->crtc_clock * 1000 /
-- 
2.40.1



More information about the Intel-gfx-trybot mailing list