@@ -223,6 +223,18 @@ cmrr_get_vtotal(struct intel_crtc_state *crtc_state, bool video_mode_required)
return vtotal;
}
+static
+void intel_vrr_prepare_fixed_timings(struct intel_crtc_state *crtc_state, int vmin)
+{
+ /*
+ * For fixed refresh rate mode Vmin, Vmax and Flipline all are set to
+ * Vtotal value, which is already computed in vmin.
+ */
+ crtc_state->vrr.vmin = vmin;
+ crtc_state->vrr.vmax = crtc_state->vrr.vmin;
+ crtc_state->vrr.flipline = crtc_state->vrr.vmax;
+}
+
static
void intel_vrr_prepare_vrr_timings(struct intel_crtc_state *crtc_state, int vmin, int vmax)
{
@@ -350,7 +362,7 @@ intel_vrr_compute_config(struct intel_crtc_state *crtc_state,
else if (is_cmrr_frac_required(crtc_state) && is_edp)
intel_vrr_compute_cmrr_timings(crtc_state);
else
- intel_vrr_prepare_vrr_timings(crtc_state, vmin, vmax);
+ intel_vrr_prepare_fixed_timings(crtc_state, vmin);
if (HAS_AS_SDP(display)) {
crtc_state->vrr.vsync_start =
Currently we always compute the timings as if vrr is enabled. With this approach the state checker becomes complicated when we introduce fixed refresh rate mode with vrr timing generator. To avoid the complications, instead of always computing vrr timings, we compute vrr timings based on uapi.vrr_enable knob. So when the knob is disabled we always compute vmin=flipline=vmax. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> --- drivers/gpu/drm/i915/display/intel_vrr.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)