diff mbox series

[08/23] drm/i915/vrr: Remove condition flipline > vmin for LNL

Message ID 20241111091221.2992818-9-ankit.k.nautiyal@intel.com (mailing list archive)
State New
Headers show
Series Use VRR timing generator for fixed refresh rate modes | expand

Commit Message

Nautiyal, Ankit K Nov. 11, 2024, 9:12 a.m. UTC
For LNL+ the condition that flipline > vmin is no more required.
Only for platforms before LNL, set the vmin - 1 to have flipline > vmin.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
 drivers/gpu/drm/i915/display/intel_vrr.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
index 83b11f3d5eb5..0c0e78622073 100644
--- a/drivers/gpu/drm/i915/display/intel_vrr.c
+++ b/drivers/gpu/drm/i915/display/intel_vrr.c
@@ -210,12 +210,18 @@  int intel_vrr_compute_vmax(struct intel_connector *connector,
 static
 void intel_vrr_prepare_vrr_timings(struct intel_crtc_state *crtc_state, int vmin, int vmax)
 {
+	struct intel_display *display = to_intel_display(crtc_state);
+
 	/*
 	 * flipline determines the min vblank length the hardware will
-	 * generate, and flipline>=vmin+1, hence we reduce vmin by one
+	 * generate. For pre LNL flipline>=vmin+1, hence we reduce vmin by one
 	 * to make sure we can get the actual min vblank length.
+	 * For LNL+ there is no such restrictions.
 	 */
-	crtc_state->vrr.vmin = vmin - 1;
+	if (DISPLAY_VER(display) >= 20)
+		crtc_state->vrr.vmin = vmin;
+	else
+		crtc_state->vrr.vmin = vmin - 1;
 	crtc_state->vrr.vmax = vmax;
 	crtc_state->vrr.flipline = crtc_state->vrr.vmin + 1;
 }