Re: [PATCH v2 20/22] drm/i915: Respect VBT seamless DRRS min refresh rate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 05 Apr 2022, Ville Syrjala <ville.syrjala@xxxxxxxxxxxxxxx> wrote:
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
>
> Make sure our choice of downclock mode respects the VBT
> seameless DRRS min refresh rate limit.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> ---
>  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@xxxxxxxxx>


> +
> +		if (vrefesh >= min_vrefresh && vrefesh < max_vrefresh) {
> +			max_vrefresh = vrefesh;
>  			best_mode = fixed_mode;
>  		}
>  	}

-- 
Jani Nikula, Intel Open Source Graphics Center




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux