From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Souza, Jose" Subject: Re: [PATCH v2] drm/i915/icl: Add TypeC ports only if VBT is present Date: Mon, 28 Jan 2019 18:06:26 +0000 Message-ID: <12bb9ed981c6179102dc8dc32e827efd290bfad3.camel@intel.com> References: <20190125143441.15121-1-imre.deak@intel.com> <20190128114242.28666-1-imre.deak@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0297963312==" Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id AF6276E50C for ; Mon, 28 Jan 2019 18:06:29 +0000 (UTC) In-Reply-To: <20190128114242.28666-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 --===============0297963312== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-97vBA+iQJmxyUhI6Fztt" --=-97vBA+iQJmxyUhI6Fztt Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2019-01-28 at 13:42 +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 > 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. >=20 > v2: > - Notice that we disable TypeC ports completely and simplify > accordingly > (Jose). > - Add code comment explaining why we disabled the ports. (Jani) 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 | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/drivers/gpu/drm/i915/intel_bios.c > b/drivers/gpu/drm/i915/intel_bios.c > index 561a4f9f044c..b508d8a735e0 100644 > --- a/drivers/gpu/drm/i915/intel_bios.c > +++ b/drivers/gpu/drm/i915/intel_bios.c > @@ -1663,6 +1663,13 @@ init_vbt_missing_defaults(struct > drm_i915_private *dev_priv) > struct ddi_vbt_port_info *info =3D > &dev_priv->vbt.ddi_port_info[port]; > =20 > + /* > + * VBT has the TypeC mode (native,TBT/USB) and we don't > want > + * to detect it. > + */ > + if (intel_port_is_tc(dev_priv, port)) > + continue; > + > info->supports_dvi =3D (port !=3D PORT_A && port !=3D > PORT_E); > info->supports_hdmi =3D info->supports_dvi; > info->supports_dp =3D (port !=3D PORT_E); --=-97vBA+iQJmxyUhI6Fztt 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/mOWkkFAlxPRKAACgkQVenbO/mO WkkAYAf+P1SrAidnoYNXDaalAIs2omt5I6NnG/CaCSgMTqtalRppfDuWwJubQ4m1 gZFojODM++RrPqmDnxdWxMonl6xS4z1FsiJTB8yTDyphxwpCAqG+MbCFbJjlEc4O iIvKHc6PUikSFux9RdLFIhHYY2S0Fx5wU6gfXJbl2ijINqhRZHnH9ZrWbOR3hOQB tA4BJQERLyv1Udtr2LctQFx5AnrHX4P/OMhmB3VFzAA3LNSJSBtK97hiovDM77RG qpcSt3TVE8S1SXrbwJIffDYjkz6MJe1SBRijugaTWufu0faA2njvQQU33RuONPy+ Hmv0nUzoS4Pe1dBBaI3c59EGx0Z5kg== =yP1C -----END PGP SIGNATURE----- --=-97vBA+iQJmxyUhI6Fztt-- --===============0297963312== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============0297963312==--