drm/i915: Respect VBT seamless DRRS min refresh rate
Make sure our choice of downclock mode respects the VBT seameless DRRS min refresh rate limit. v2: s/vrefesh/vrefresh/ (Jani) Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220504150440.13748-10-ville.syrjala@linux.intel.com
This commit is contained in:
parent
790b45f1bc
commit
949665a6e2
|
@ -75,13 +75,17 @@ const struct drm_display_mode *
|
|||
intel_panel_downclock_mode(struct intel_connector *connector,
|
||||
const struct drm_display_mode *adjusted_mode)
|
||||
{
|
||||
struct drm_i915_private *i915 = to_i915(connector->base.dev);
|
||||
const struct drm_display_mode *fixed_mode, *best_mode = NULL;
|
||||
int vrefresh = drm_mode_vrefresh(adjusted_mode);
|
||||
int min_vrefresh = i915->vbt.seamless_drrs_min_refresh_rate;
|
||||
int max_vrefresh = drm_mode_vrefresh(adjusted_mode);
|
||||
|
||||
/* pick the fixed_mode with the lowest refresh rate */
|
||||
list_for_each_entry(fixed_mode, &connector->panel.fixed_modes, head) {
|
||||
if (drm_mode_vrefresh(fixed_mode) < vrefresh) {
|
||||
vrefresh = drm_mode_vrefresh(fixed_mode);
|
||||
int vrefresh = drm_mode_vrefresh(fixed_mode);
|
||||
|
||||
if (vrefresh >= min_vrefresh && vrefresh < max_vrefresh) {
|
||||
max_vrefresh = vrefresh;
|
||||
best_mode = fixed_mode;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue