Commit c173a91b authored by Imre Deak's avatar Imre Deak
Browse files

drm/i915/tc: Fix TC mode for a legacy port if the PHY is not ready



A legacy TC port can't be switched to TBT mode, even if the PHY
initialization wasn't ready yet for some reason, so prevent this.

This shouldn't normally happen as the driver waits for the IOM/TCSS
PHY initialization during driver loading and system resume.

Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230316131724.359612-9-imre.deak@intel.com
parent a8da6c18
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -482,7 +482,8 @@ static void icl_tc_phy_connect(struct intel_digital_port *dig_port,
	u32 live_status_mask;
	int max_lanes;

	if (!tc_phy_status_complete(dig_port)) {
	if (!tc_phy_status_complete(dig_port) &&
	    !drm_WARN_ON(&i915->drm, dig_port->tc_legacy_port)) {
		drm_dbg_kms(&i915->drm, "Port %s: PHY not ready\n",
			    dig_port->tc_port_name);
		goto out_set_tbt_alt_mode;