Re: [PATCH 5/5] drm/i915/crt: clean up encoder hook assignment

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

 



On Thu, Oct 05, 2017 at 01:52:14PM +0300, Jani Nikula wrote:
> Only assign the hooks once instead of overwriting for DDI.
> 
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>

Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx>

> ---
>  drivers/gpu/drm/i915/intel_crt.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
> index 2abe556ccaf5..668e8c3e791d 100644
> --- a/drivers/gpu/drm/i915/intel_crt.c
> +++ b/drivers/gpu/drm/i915/intel_crt.c
> @@ -955,16 +955,11 @@ void intel_crt_init(struct drm_i915_private *dev_priv)
>  
>  	crt->base.power_domain = POWER_DOMAIN_PORT_CRT;
>  
> -	crt->base.compute_config = intel_crt_compute_config;
> -	if (HAS_PCH_SPLIT(dev_priv)) {
> -		crt->base.disable = pch_disable_crt;
> -		crt->base.post_disable = pch_post_disable_crt;
> -	} else {
> -		crt->base.disable = intel_disable_crt;
> -	}
>  	if (I915_HAS_HOTPLUG(dev_priv) &&
>  	    !dmi_check_system(intel_spurious_crt_detect))
>  		crt->base.hpd_pin = HPD_CRT;
> +
> +	crt->base.compute_config = intel_crt_compute_config;
>  	if (HAS_DDI(dev_priv)) {
>  		crt->base.port = PORT_E;
>  		crt->base.get_config = hsw_crt_get_config;
> @@ -975,6 +970,12 @@ void intel_crt_init(struct drm_i915_private *dev_priv)
>  		crt->base.disable = hsw_disable_crt;
>  		crt->base.post_disable = hsw_post_disable_crt;
>  	} else {
> +		if (HAS_PCH_SPLIT(dev_priv)) {
> +			crt->base.disable = pch_disable_crt;
> +			crt->base.post_disable = pch_post_disable_crt;
> +		} else {
> +			crt->base.disable = intel_disable_crt;
> +		}
>  		crt->base.port = PORT_NONE;
>  		crt->base.get_config = intel_crt_get_config;
>  		crt->base.get_hw_state = intel_crt_get_hw_state;
> -- 
> 2.11.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux