On Thu, Jan 28, 2021 at 05:59:48PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > > We shouldn't really trust tc_mode on non-TC PHYs since we never > initialize it explicitly. So let's check for the PHY type first. > Fortunately TC_PORT_TBT_ALT happens to be zero so I don't think > there's an actual bug here, just a possibility for a future one > if someone rearranges the enum values. > > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> Reviewed-by: Imre Deak <imre.deak@xxxxxxxxx> > --- > drivers/gpu/drm/i915/display/intel_ddi.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c > index efcdf5499903..5bc5033a2dea 100644 > --- a/drivers/gpu/drm/i915/display/intel_ddi.c > +++ b/drivers/gpu/drm/i915/display/intel_ddi.c > @@ -3463,10 +3463,12 @@ icl_program_mg_dp_mode(struct intel_digital_port *dig_port, > { > struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev); > enum tc_port tc_port = intel_port_to_tc(dev_priv, dig_port->base.port); > + enum phy phy = intel_port_to_phy(dev_priv, dig_port->base.port); > u32 ln0, ln1, pin_assignment; > u8 width; > > - if (dig_port->tc_mode == TC_PORT_TBT_ALT) > + if (!intel_phy_is_tc(dev_priv, phy) || > + dig_port->tc_mode == TC_PORT_TBT_ALT) > return; > > if (INTEL_GEN(dev_priv) >= 12) { > -- > 2.26.2 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx