[Intel-gfx] [PATCH 02/13] drm/i915/adlp/tc: Fix PHY connected check for Thunderbolt mode

Imre Deak imre.deak at intel.com
Fri Sep 24 15:24:15 UTC 2021


On Fri, Sep 24, 2021 at 02:18:30AM +0300, Souza, Jose wrote:
> On Tue, 2021-09-21 at 03:23 +0300, Imre Deak wrote:
> > On ADL-P the PHY ready (aka status complete on other platforms) flag is
> > always set, besides when a DP-alt, legacy sink is connected also when a
> > TBT sink is connected or nothing is connected. So assume the PHY to be
> > connected when both the TBT live status and PHY ready flags are set.
> > 
> > Cc: José Roberto de Souza <jose.souza at intel.com>
> > Signed-off-by: Imre Deak <imre.deak at intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_tc.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
> > index 3ffece568ed98..7dc3696085c71 100644
> > --- a/drivers/gpu/drm/i915/display/intel_tc.c
> > +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> > @@ -509,6 +509,10 @@ static bool icl_tc_phy_is_connected(struct intel_digital_port *dig_port)
> >  		return dig_port->tc_mode == TC_PORT_TBT_ALT;
> >  	}
> >  
> > +	/* On ADL-P the PHY complete flag is set in TBT mode as well. */
> > +	if (IS_ALDERLAKE_P(i915) && dig_port->tc_mode == TC_PORT_TBT_ALT)
> > +		return true;
> 
> I don't have hardware to test(My adl-p do not have TC ports enabled)
> but if phy complete/ready is set in TBT mode, this change makes sense.

The reg description has been updated now, it's a bit clearer. But yes,
that's what I see it's set regardless of something being connected or
not and regardless of what is connected.

> Reviewed-by: José Roberto de Souza <jose.souza at intel.com>
> 
> > +
> >  	if (!tc_phy_is_owned(dig_port)) {
> >  		drm_dbg_kms(&i915->drm, "Port %s: PHY not owned\n",
> >  			    dig_port->tc_port_name);
> 


More information about the Intel-gfx mailing list