[Intel-gfx] [PATCH 1/3] drm/i915/dp: Move initialization of hpd_pin to a new function

Chris Wilson chris at chris-wilson.co.uk
Fri Feb 3 13:47:15 UTC 2017


On Fri, Feb 03, 2017 at 03:39:01PM +0200, Ander Conselvan de Oliveira wrote:
> This shaves a few lines from intel_dp_init_connector() and will serve as
> a good place to add other port specific information in a follow up
> patch.
> 
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 54 ++++++++++++++++++++++++-----------------
>  1 file changed, 32 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 2ab0192..5cac14f 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -5903,6 +5903,37 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
>  	return false;
>  }
>  
> +static void
> +intel_dp_init_connector_port_info(struct intel_digital_port *intel_dig_port)
> +{
> +	struct drm_i915_private *dev_priv =
> +		to_i915(intel_dig_port->base.base.dev);
> +	struct intel_encoder *encoder = &intel_dig_port->base;
> +
> +	/* Set up the hotplug pin. */
> +	switch (intel_dig_port->port) {
> +	case PORT_A:
> +		encoder->hpd_pin = HPD_PORT_A;
> +		break;
> +	case PORT_B:
> +		encoder->hpd_pin = HPD_PORT_B;
> +		if (IS_BXT_REVID(dev_priv, 0, BXT_REVID_A1))
> +			encoder->hpd_pin = HPD_PORT_A;
> +		break;
> +	case PORT_C:
> +		encoder->hpd_pin = HPD_PORT_C;
> +		break;
> +	case PORT_D:
> +		encoder->hpd_pin = HPD_PORT_D;
> +		break;
> +	case PORT_E:
> +		encoder->hpd_pin = HPD_PORT_E;
> +		break;
> +	default:
> +		BUG();

MISSING_CASE(intel_dig_port->port);
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list