Re: [PATCH] drm/i915/icl: Add TypeC ports only if VBT is present

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

 



On Fri, 2019-01-25 at 16:34 +0200, Imre Deak wrote:
> We can't safely probe Type C ports, whether they are a legacy or a
> USB/Thunderbolt DP Alternate Type C port. This would require
> performing
> the TypeC connect sequence - as described by the specification - but
> that may have unwanted side-effects. These side-effects include at
> least
> - without completeness - timeouts during AUX power well enabling and
> subsequent PLL enabling errors.
> 

Makes sense, behaps there is a bug open with this timeouts and errors
to link to?

> To safely identify these ports we really need VBT, which has the
> proper
> flag for this (ddi_vbt_port_info::supports_typec_usb, supports_tbt).
> Based on the above disable Type C ports if we can't load VBT for some
> reason.


Reviewed-by: José Roberto de Souza <jose.souza@xxxxxxxxx>

> 
> Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
> Cc: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
> Cc: Jose Roberto de Souza <jose.souza@xxxxxxxxx>
> Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
> Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_bios.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_bios.c
> b/drivers/gpu/drm/i915/intel_bios.c
> index 561a4f9f044c..270e7f0ad5cd 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1662,10 +1662,12 @@ init_vbt_missing_defaults(struct
> drm_i915_private *dev_priv)
>  	for (port = PORT_A; port < I915_MAX_PORTS; port++) {
>  		struct ddi_vbt_port_info *info =
>  			&dev_priv->vbt.ddi_port_info[port];
> +		bool is_tc_port = intel_port_is_tc(dev_priv, port);

Nit:

if (intel_port_is_tc(dev_priv, port))
	continue;

instead?

>  
> -		info->supports_dvi = (port != PORT_A && port !=
> PORT_E);
> +		info->supports_dvi = (port != PORT_A && port != PORT_E
> &&
> +				      !is_tc_port);
>  		info->supports_hdmi = info->supports_dvi;
> -		info->supports_dp = (port != PORT_E);
> +		info->supports_dp = (port != PORT_E && !is_tc_port);
>  	}
>  }
>  

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
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