[Intel-gfx] [09/12] drm/i915: Move hpd_pin setup to encoder init

Souza, Jose jose.souza at intel.com
Tue Sep 8 16:57:27 UTC 2020


On Wed, 2020-07-01 at 00:55 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <
> ville.syrjala at linux.intel.com
> >
> 
> Currently DP/HDMI/DDI encoders init their hpd_pin from the
> connector init. Let's move it to the encoder init so that
> we don't need to add platform specific junk to the connector
> init (which is shared by all g4x+ platforms).
> 

Reviewed-by: José Roberto de Souza <jose.souza at intel.com>

> Signed-off-by: Ville Syrjälä <
> ville.syrjala at linux.intel.com
> >
> ---
>  drivers/gpu/drm/i915/display/intel_ddi.c  | 1 +
>  drivers/gpu/drm/i915/display/intel_dp.c   | 2 +-
>  drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +-
>  3 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 884b507c5f55..d024491738b3 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -4907,6 +4907,7 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
>  	encoder->port = port;
>  	encoder->cloneable = 0;
>  	encoder->pipe_mask = ~0;
> +	encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port);
>  
>  	if (INTEL_GEN(dev_priv) >= 11)
>  		intel_dig_port->saved_port_bits = intel_de_read(dev_priv,
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 3df5d901dd9d..cd516cd8acb8 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -8211,7 +8211,6 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
>  	if (INTEL_GEN(dev_priv) >= 11)
>  		connector->ycbcr_420_allowed = true;
>  
> -	intel_encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port);
>  	intel_connector->polled = DRM_CONNECTOR_POLL_HPD;
>  
>  	intel_dp_aux_init(intel_dp);
> @@ -8354,6 +8353,7 @@ bool intel_dp_init(struct drm_i915_private *dev_priv,
>  	}
>  	intel_encoder->cloneable = 0;
>  	intel_encoder->port = port;
> +	intel_encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port);
>  
>  	intel_dig_port->hpd_pulse = intel_dp_hpd_pulse;
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 864a1642e81c..f515d0fce968 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -3253,7 +3253,6 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
>  	if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
>  		connector->ycbcr_420_allowed = true;
>  
> -	intel_encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port);
>  	intel_connector->polled = DRM_CONNECTOR_POLL_HPD;
>  
>  	if (HAS_DDI(dev_priv))
> @@ -3385,6 +3384,7 @@ void intel_hdmi_init(struct drm_i915_private *dev_priv,
>  		intel_encoder->pipe_mask = ~0;
>  	}
>  	intel_encoder->cloneable = 1 << INTEL_OUTPUT_ANALOG;
> +	intel_encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port);
>  	/*
>  	 * BSpec is unclear about HDMI+HDMI cloning on g4x, but it seems
>  	 * to work on real hardware. And since g4x can send infoframes to
> 


More information about the Intel-gfx mailing list