drm/i915/display: Wait for PHY readiness not needed for disabling sequence
Subsystems (3)
PATCH 1/1 drm/i915/display: Wait for PHY readiness not needed for disabling sequence
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
--- drivers/gpu/drm/i915/display/intel_tc.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/display/intel_tc.c +3 -0
@@ -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; +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 )) {
Signature · 1 line
2.34.1
Quoted 17 lines · Mika Kahola
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 <[email protected]>--- drivers/gpu/drm/i915/display/intel_tc.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/i915/display/intel_tc.c +0
-0
drivers/gpu/drm/i915/display/intel_tc.c static bool xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port *tc, bool enabl · line 1034
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_tc.c +2
-0@@ -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.
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_tc.c +1
-0+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 )) {Signature · 1 line
2.34.1
Quoted 28 lines
-----Original Message-----
From: Deak, Imre <[email protected]>
Sent: Tuesday, December 12, 2023 12:08 PM
To: Kahola, Mika <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/i915/display: Wait for PHY readiness not needed for disabling sequenceQuoted 20 lines · Mika Kahola
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 <[email protected]>--- drivers/gpu/drm/i915/display/intel_tc.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/i915/display/intel_tc.c +0
-0@@ -1030,6 +1030,9 @@ static boolxelpdp_tc_phy_enable_tcss_power(struct
intel_tc_port*tc, bool enabl
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_tc.c static bool xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port *tc, bool enabl · line 1034
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_tc.c +2
-0__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
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_tc.c +1
-1+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