[Intel-gfx] [PATCH 07/13] drm/i915/tc: Add a mode for the TypeC PHY's disconnected state

Souza, Jose jose.souza at intel.com
Tue Sep 28 20:56:43 UTC 2021


On Tue, 2021-09-28 at 23:38 +0300, Imre Deak wrote:
> On Tue, Sep 28, 2021 at 11:29:49PM +0300, Souza, Jose wrote:
> > On Tue, 2021-09-28 at 23:08 +0300, Imre Deak wrote:
> > > On Tue, Sep 28, 2021 at 11:02:37PM +0300, Souza, Jose wrote:
> > > > On Tue, 2021-09-28 at 22:55 +0300, Imre Deak wrote:
> > > > > On Tue, Sep 28, 2021 at 10:45:50PM +0300, Souza, Jose wrote:
> > > > > > > > [...]
> > > > > > > > Would not be possible to use TC_PORT_DISCONNECTED when really
> > > > > > > > disconnected and dropping the use of TC_PORT_TBT_ALT for it?
> > > > > > > 
> > > > > > > TC_PORT_DISCONNECTED is the state when the PHY ownership is not held and
> > > > > > > we don't hold any power domains.
> > > > > > > 
> > > > > > > TC_PORT_TBT_ALT is the state when the PHY ownership is not held (like
> > > > > > > above), and we hold the power domain needed to block TC-cold.
> > > > > > 
> > > > > > Swapping it would make modes names do what their names intend to.
> > > > > > 
> > > > > > Up to the point that we only had TBT, TC alt and legacy it was fine to
> > > > > > keep into TBT mode when disconnected but now with a disconnected state
> > > > > > it do not make sense to keep it in TBT mode when disconnected.
> > > > > > 
> > > > > > Or you rename it to TC_PORT_UNKNOWN, as it sets to
> > > > > > TC_PORT_DISCONNECTED mode during tc_init() and when going to suspend.
> > > > > 
> > > > > Not sure what you mean, because what you describe is what actually
> > > > > happens. From all states icl_tc_phy_disconnect() will change to
> > > > > the disconnected state, which is the state at init time and during
> > > > > suspend or after unloading the driver.
> > > > 
> > > > I'm talking about the state when system is up without anything
> > > > connected to the port, after icl_tc_phy_disconnect() sets
> > > > dig_port->tc_mode = TC_PORT_DISCONNECTED, icl_tc_phy_connect() goes
> > > > and set it back to TC_PORT_TBT_ALT.
> > > 
> > > Yes, when the port is locked we are in one of TBT-alt, DP-alt or legacy
> > > mode. These are the only modes that make sense for an AUX transfer or a
> > > modeset, for which the lock was taken.
> > 
> > Okay at the end of the series mode goes to TC_PORT_DISCONNECTED if no
> > reference is held.
> 
> Yes.

With the warn_on fixed:

Reviewed-by: José Roberto de Souza <jose.souza at intel.com>

> 
> --Imre



More information about the Intel-gfx mailing list