> -----Original Message----- > From: Deak, Imre <imre.deak@xxxxxxxxx> > Sent: Tuesday, December 12, 2023 12:08 PM > To: Kahola, Mika <mika.kahola@xxxxxxxxx> > Cc: intel-gfx@xxxxxxxxxxxxxxxxxxxxx > Subject: Re: [PATCH] drm/i915/display: Wait for PHY readiness not needed for disabling sequence > > On Tue, Dec 12, 2023 at 11:55:20AM +0200, Mika Kahola wrote: > > When going through the disconnection flow we don't need to wait for > > PHY readiness and hence we can skip the wait part. For disabling the > > function returns false as an indicator that the power is not enabled. > > After all, we are not even using the return value when Type-C is disconnecting. > > > > BSpec: 65380 > > > > Signed-off-by: Mika Kahola <mika.kahola@xxxxxxxxx> > > --- > > drivers/gpu/drm/i915/display/intel_tc.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_tc.c > > b/drivers/gpu/drm/i915/display/intel_tc.c > > index f64d348a969e..79ec17fa3edd 100644 > > --- a/drivers/gpu/drm/i915/display/intel_tc.c > > +++ b/drivers/gpu/drm/i915/display/intel_tc.c > > @@ -1030,6 +1030,9 @@ static bool > > xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port *tc, bool enabl > > > > __xelpdp_tc_phy_enable_tcss_power(tc, enable); > > > > + if (!enable) > > + return false; > > Waiting for xelpdp_tc_phy_wait_for_tcss_power(tc, false); is also needed in the above case. Ok. I would still keep this disabling part separate as if I combine this with existing if() the code looks a bit busy for me. Thanks! Mika > > > + > > if ((!tc_phy_wait_for_ready(tc) || > > !xelpdp_tc_phy_wait_for_tcss_power(tc, enable)) && > > !drm_WARN_ON(&i915->drm, tc->mode == TC_PORT_LEGACY)) { > > -- > > 2.34.1 > >