[Intel-gfx] [PATCH 1/5] drm/i915: ddi_clock_get sort platforms newer-to-older.

Ville Syrjälä ville.syrjala at linux.intel.com
Fri Oct 19 19:43:10 UTC 2018


On Fri, Oct 19, 2018 at 12:03:31PM -0700, Rodrigo Vivi wrote:
> No functional change.
> 
> Just sorting this "if" block from newer to older platform.
> 
> Cc: Jani Nikula <jani.nikula at intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 6b9742baa5f2..5e8173f28eaa 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -1737,16 +1737,16 @@ static void intel_ddi_clock_get(struct intel_encoder *encoder,
>  {
>  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
>  
> -	if (INTEL_GEN(dev_priv) <= 8)
> -		hsw_ddi_clock_get(encoder, pipe_config);
> +	if (IS_ICELAKE(dev_priv))
> +		icl_ddi_clock_get(encoder, pipe_config);
> +	else if (IS_CANNONLAKE(dev_priv))
> +		cnl_ddi_clock_get(encoder, pipe_config);
>  	else if (IS_GEN9_BC(dev_priv))
>  		skl_ddi_clock_get(encoder, pipe_config);
>  	else if (IS_GEN9_LP(dev_priv))
>  		bxt_ddi_clock_get(encoder, pipe_config);

These remaining two should get swapped too I think.

> -	else if (IS_CANNONLAKE(dev_priv))
> -		cnl_ddi_clock_get(encoder, pipe_config);
> -	else if (IS_ICELAKE(dev_priv))
> -		icl_ddi_clock_get(encoder, pipe_config);
> +	else if (INTEL_GEN(dev_priv) <= 8)
> +		hsw_ddi_clock_get(encoder, pipe_config);

This whole thing could be a candidate for a vfunc. Though this code
is perhaps misplaced altogether. It should probably be moved next
to the other dpll stuff in intel_dpll_mgr.c.

But anyways
Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

>  }
>  
>  void intel_ddi_set_pipe_settings(const struct intel_crtc_state *crtc_state)
> -- 
> 2.19.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list