Re: [PATCH v2 1/6] drm/i915: move ICL port F hack to intel_bios

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

 



On Wed, 24 Jun 2020, Lucas De Marchi <lucas.demarchi@xxxxxxxxx> wrote:
> Move the check for port F to intel_bios.c and just make intel_ddi_init()
> call it. This will allow the output initialization of ICL to be like
> platforms after it, allowing us to make it generic.
>
> Suggested-by: Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/display/intel_bios.c    | 23 +++++++++++++++-----
>  drivers/gpu/drm/i915/display/intel_display.c | 10 +--------
>  2 files changed, 18 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 6593e2c38043..9d42ea3721cd 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -1668,16 +1668,27 @@ static enum port dvo_port_to_port(struct drm_i915_private *dev_priv,
>  		[PORT_E] = { DVO_PORT_HDMID, DVO_PORT_DPD, -1 },
>  	};
>  
> -	if (IS_ROCKETLAKE(dev_priv))
> +	if (IS_ROCKETLAKE(dev_priv)) {
>  		return __dvo_port_to_port(ARRAY_SIZE(rkl_port_mapping),
>  					  ARRAY_SIZE(rkl_port_mapping[0]),
>  					  rkl_port_mapping,
>  					  dvo_port);
> -	else
> -		return __dvo_port_to_port(ARRAY_SIZE(port_mapping),
> -					  ARRAY_SIZE(port_mapping[0]),
> -					  port_mapping,
> -					  dvo_port);
> +	} else {
> +		enum port port = __dvo_port_to_port(ARRAY_SIZE(port_mapping),
> +						    ARRAY_SIZE(port_mapping[0]),
> +						    port_mapping,
> +						    dvo_port);
> +
> +		/*
> +		 * On some ICL SKUs port F is not present. Work around broken
> +		 * VBTs by allowing port F only on select SKUs.
> +		 */
> +		if (port == PORT_F && IS_ICELAKE(dev_priv) &&
> +		    !IS_ICL_WITH_PORT_F(dev_priv))

I'd perhaps add a debug message here, but either way,

Reviewed-by: Jani Nikula <jani.nikula@xxxxxxxxx>

> +			return PORT_NONE;
> +
> +		return port;
> +	}
>  }
>  
>  static void parse_ddi_port(struct drm_i915_private *dev_priv,
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index a11bb675f9b3..49772c82a299 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -16842,15 +16842,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
>  		intel_ddi_init(dev_priv, PORT_C);
>  		intel_ddi_init(dev_priv, PORT_D);
>  		intel_ddi_init(dev_priv, PORT_E);
> -		/*
> -		 * On some ICL SKUs port F is not present. No strap bits for
> -		 * this, so rely on VBT.
> -		 * Work around broken VBTs on SKUs known to have no port F.
> -		 */
> -		if (IS_ICL_WITH_PORT_F(dev_priv) &&
> -		    intel_bios_is_port_present(dev_priv, PORT_F))
> -			intel_ddi_init(dev_priv, PORT_F);
> -
> +		intel_ddi_init(dev_priv, PORT_F);
>  		icl_dsi_init(dev_priv);
>  	} else if (IS_GEN9_LP(dev_priv)) {
>  		/*

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux