[Intel-gfx] [PATCH 03/13] drm/i915: Untangle .fdi_link_train and cdclk vfunc setup

Jani Nikula jani.nikula at linux.intel.com
Thu May 12 10:06:14 UTC 2016


On Wed, 11 May 2016, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Split the .fdi_link_train and .modeset_commit_cdclk/.modeset_calc_cdclk
> into two separate if ladders. Much easier to read when you're not
> confusing two totally separate subjects.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula at intel.com>


> ---
>  drivers/gpu/drm/i915/intel_display.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index b55075e6020c..a9e5d6b81043 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -15044,12 +15044,13 @@ void intel_init_display_hooks(struct drm_i915_private *dev_priv)
>  		dev_priv->display.fdi_link_train = ivb_manual_fdi_link_train;
>  	} else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
>  		dev_priv->display.fdi_link_train = hsw_fdi_link_train;
> -		if (IS_BROADWELL(dev_priv)) {
> -			dev_priv->display.modeset_commit_cdclk =
> -				broadwell_modeset_commit_cdclk;
> -			dev_priv->display.modeset_calc_cdclk =
> -				broadwell_modeset_calc_cdclk;
> -		}
> +	}
> +
> +	if (IS_BROADWELL(dev_priv)) {
> +		dev_priv->display.modeset_commit_cdclk =
> +			broadwell_modeset_commit_cdclk;
> +		dev_priv->display.modeset_calc_cdclk =
> +			broadwell_modeset_calc_cdclk;
>  	} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
>  		dev_priv->display.modeset_commit_cdclk =
>  			valleyview_modeset_commit_cdclk;

-- 
Jani Nikula, Intel Open Source Technology Center


More information about the Intel-gfx mailing list