Commit 6a38b36c authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Validate that the timings are within the VRR range

Let's assume there are some crazy displays where the high
end of the VRR range ends up being lower than the refresh
rate as determined by the actual timings. In that case
when we toggle VRR on/off we would step outside the VRR
range when toggling VRR on/off. Let's just make sure that
never happens by not using VRR in such cases. If the user
really wants VRR they should then select the timings to
land within the VRR range.

Cc: Manasi Navare <navaremanasi@chromium.org>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230901130440.2085-9-ville.syrjala@linux.intel.comReviewed-by: default avatarManasi Navare <navaremanasi@chromium.org>
Reviewed-by: default avatarMitul Golani <mitulkumar.ajitkumar.golani@intel.com>
parent f0f7ec74
......@@ -117,10 +117,10 @@ intel_vrr_compute_config(struct intel_crtc_state *crtc_state,
const struct drm_display_info *info = &connector->base.display_info;
int vmin, vmax;
if (!intel_vrr_is_capable(connector))
if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
return;
if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
if (!intel_vrr_is_in_range(connector, drm_mode_vrefresh(adjusted_mode)))
return;
vmin = DIV_ROUND_UP(adjusted_mode->crtc_clock * 1000,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment