From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Souza, Jose" Subject: Re: [PATCH] drm/i915/icl: Add TypeC ports only if VBT is present Date: Fri, 25 Jan 2019 21:16:08 +0000 Message-ID: <52a608e22ba08325ce2a25faebcd2f4d53bb031f.camel@intel.com> References: <20190125143441.15121-1-imre.deak@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1887948870==" Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id DABFE6E08C for ; Fri, 25 Jan 2019 21:16:09 +0000 (UTC) In-Reply-To: <20190125143441.15121-1-imre.deak@intel.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "intel-gfx@lists.freedesktop.org" , "Deak, Imre" Cc: "Nikula, Jani" , "Zanoni, Paulo R" List-Id: intel-gfx@lists.freedesktop.org --===============1887948870== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-RASNs+uz469mwbY0W+QI" --=-RASNs+uz469mwbY0W+QI Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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. >=20 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=C3=A9 Roberto de Souza >=20 > Cc: Jani Nikula > Cc: Paulo Zanoni > Cc: Jose Roberto de Souza > Cc: Ville Syrj=C3=A4l=C3=A4 > Cc: Rodrigo Vivi > Signed-off-by: Imre Deak > --- > drivers/gpu/drm/i915/intel_bios.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) >=20 > 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 =3D PORT_A; port < I915_MAX_PORTS; port++) { > struct ddi_vbt_port_info *info =3D > &dev_priv->vbt.ddi_port_info[port]; > + bool is_tc_port =3D intel_port_is_tc(dev_priv, port); Nit: if (intel_port_is_tc(dev_priv, port)) continue; instead? > =20 > - info->supports_dvi =3D (port !=3D PORT_A && port !=3D > PORT_E); > + info->supports_dvi =3D (port !=3D PORT_A && port !=3D PORT_E > && > + !is_tc_port); > info->supports_hdmi =3D info->supports_dvi; > - info->supports_dp =3D (port !=3D PORT_E); > + info->supports_dp =3D (port !=3D PORT_E && !is_tc_port); > } > } > =20 --=-RASNs+uz469mwbY0W+QI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEVNG051EijGa0MiaQVenbO/mOWkkFAlxLfJYACgkQVenbO/mO WklSlQgAm5yBPZHytMKCM1ObEnyeC+DZgvdMhQhBM/92QA5NfzNBhBpVZ55kXbO+ NWEqsJqXrprB9dok0R18hBNZ06L63FklBC70ZtHeIZrfm23T/CQb44Lg+Z0/Zd+V oFMSltIZcYwWtO2FOAZHrZJBTAZaF49rIUk2rnePX1B4yju9lNfAUC10+6YAFqmZ tV45GQE1k1Q4+W9Yihgw9d6RCMEr2YMRiPd79R+omxKoOF4wtwo1FVhtwM7RrMj3 puOMnbKXsbkaiiA7kpPN2/lid9BPeZCQck6EP8/hc0YpFiz5CNlHZ7rgiCX+h4BF SUyfWo5pQWdbazRAcYLbsTObzfXaLA== =epRs -----END PGP SIGNATURE----- --=-RASNs+uz469mwbY0W+QI-- --===============1887948870== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============1887948870==--