Commit 3203009f authored by Mika Kahola's avatar Mika Kahola

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.

v2: Cleanup for increased readibility (Imre)

BSpec: 65380

For VLK-53734
Signed-off-by: default avatarMika Kahola <mika.kahola@intel.com>
Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231212115130.485911-1-mika.kahola@intel.com
parent baf31a20
...@@ -1030,18 +1030,25 @@ static bool xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port *tc, bool enabl ...@@ -1030,18 +1030,25 @@ static bool xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port *tc, bool enabl
__xelpdp_tc_phy_enable_tcss_power(tc, enable); __xelpdp_tc_phy_enable_tcss_power(tc, enable);
if ((!tc_phy_wait_for_ready(tc) || if (enable && !tc_phy_wait_for_ready(tc))
!xelpdp_tc_phy_wait_for_tcss_power(tc, enable)) && goto out_disable;
!drm_WARN_ON(&i915->drm, tc->mode == TC_PORT_LEGACY)) {
if (enable) {
__xelpdp_tc_phy_enable_tcss_power(tc, false);
xelpdp_tc_phy_wait_for_tcss_power(tc, false);
}
return false; if (!xelpdp_tc_phy_wait_for_tcss_power(tc, enable))
} goto out_disable;
return true; return true;
out_disable:
if (drm_WARN_ON(&i915->drm, tc->mode == TC_PORT_LEGACY))
return false;
if (!enable)
return false;
__xelpdp_tc_phy_enable_tcss_power(tc, false);
xelpdp_tc_phy_wait_for_tcss_power(tc, false);
return false;
} }
static void xelpdp_tc_phy_take_ownership(struct intel_tc_port *tc, bool take) static void xelpdp_tc_phy_take_ownership(struct intel_tc_port *tc, bool take)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment