@@ -247,17 +247,16 @@ void intel_vrr_compute_vrr_timings(struct intel_crtc_state *crtc_state)
}
static
-int intel_vrr_compute_vmin(struct intel_connector *connector,
- const struct drm_display_mode *adjusted_mode)
+int intel_vrr_compute_vmin(struct intel_crtc_state *crtc_state)
{
- const struct drm_display_info *info = &connector->base.display_info;
- int vmin;
-
- vmin = DIV_ROUND_UP(adjusted_mode->crtc_clock * 1000,
- adjusted_mode->crtc_htotal * info->monitor_range.max_vfreq);
- vmin = max_t(int, vmin, adjusted_mode->crtc_vtotal);
-
- return vmin;
+ /*
+ * To make fixed rr and vrr work seamless the guardband/pipeline full
+ * should be set such that it satisfies both the fixed and variable
+ * timings.
+ * For this set the vmin as crtc_vtotal. With this we never need to
+ * change anything to do with the guardband.
+ */
+ return crtc_state->hw.adjusted_mode.crtc_vtotal;
}
static
@@ -304,7 +303,7 @@ intel_vrr_compute_config(struct intel_crtc_state *crtc_state,
if (HAS_LRR(display))
crtc_state->update_lrr = true;
- vmin = intel_vrr_compute_vmin(connector, adjusted_mode);
+ vmin = intel_vrr_compute_vmin(crtc_state);
vmax = intel_vrr_compute_vmax(connector, adjusted_mode);
if (vmin >= vmax)