[Intel-gfx] [PATCH 06/17] drm/i915: s/need_cd2x_updare/can_cd2x_update/

Imre Deak imre.deak at intel.com
Fri Jan 24 12:24:40 UTC 2020


On Mon, Jan 20, 2020 at 07:47:16PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> intel_cdclk_needs_cd2x_update() is named rather confusingly.
> We don't have to do a cd2x update, rather we are allowed to
> do one (as opposed to a full PLL reprogramming with its heavy
> handed modeset). So let's rename the function to
> intel_cdclk_can_cd2x_update().
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Imre Deak <imre.deak at intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_cdclk.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
> index f7f886dcd6ae..9d4cf412b65d 100644
> --- a/drivers/gpu/drm/i915/display/intel_cdclk.c
> +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
> @@ -1767,7 +1767,7 @@ bool intel_cdclk_needs_modeset(const struct intel_cdclk_state *a,
>  }
>  
>  /**
> - * intel_cdclk_needs_cd2x_update - Determine if two CDCLK states require a cd2x divider update
> + * intel_cdclk_can_cd2x_update - Determine if two CDCLK states need a cd2x divider update
>   * @dev_priv: Not a CDCLK state, it's the drm_i915_private!
>   * @a: first CDCLK state
>   * @b: second CDCLK state
> @@ -1775,9 +1775,9 @@ bool intel_cdclk_needs_modeset(const struct intel_cdclk_state *a,
>   * Returns:
>   * True if the CDCLK states require just a cd2x divider update, false if not.
>   */
> -static bool intel_cdclk_needs_cd2x_update(struct drm_i915_private *dev_priv,
> -					  const struct intel_cdclk_state *a,
> -					  const struct intel_cdclk_state *b)
> +static bool intel_cdclk_can_cd2x_update(struct drm_i915_private *dev_priv,
> +					const struct intel_cdclk_state *a,
> +					const struct intel_cdclk_state *b)
>  {
>  	/* Older hw doesn't have the capability */
>  	if (INTEL_GEN(dev_priv) < 10 && !IS_GEN9_LP(dev_priv))
> @@ -2393,9 +2393,9 @@ int intel_modeset_calc_cdclk(struct intel_atomic_state *state)
>  	}
>  
>  	if (is_power_of_2(state->active_pipes) &&
> -	    intel_cdclk_needs_cd2x_update(dev_priv,
> -					  &dev_priv->cdclk.actual,
> -					  &state->cdclk.actual)) {
> +	    intel_cdclk_can_cd2x_update(dev_priv,
> +					&dev_priv->cdclk.actual,
> +					&state->cdclk.actual)) {
>  		struct intel_crtc *crtc;
>  		struct intel_crtc_state *crtc_state;
>  
> -- 
> 2.24.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list