[Intel-gfx] [PATCH v2 20/22] drm/i915: Respect VBT seamless DRRS min refresh rate
Jani Nikula
jani.nikula at linux.intel.com
Thu Apr 7 18:01:10 UTC 2022
On Tue, 05 Apr 2022, Ville Syrjala <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Make sure our choice of downclock mode respects the VBT
> seameless DRRS min refresh rate limit.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_panel.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> index 03398feb6676..35d8676438a3 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.c
> +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> @@ -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;
Just remembered the rabbit hole goes deeper with dual eDP and supporting
multiple copies of all the panel type specific stuff... ;)
> + 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 vrefesh = drm_mode_vrefresh(fixed_mode);
*vrefresh
Reviewed-by: Jani Nikula <jani.nikula at intel.com>
> +
> + if (vrefesh >= min_vrefresh && vrefesh < max_vrefresh) {
> + max_vrefresh = vrefesh;
> best_mode = fixed_mode;
> }
> }
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list