drm/rockchip: dw-dp: enable phy when hpd irq coming

when hpd irq coming, the dptx will access dpcd registers, but
the phy may be disabled. it need enable phy first.

Change-Id: I0a07659eafdbf5d093949d85e9f6f18651dc04ec
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
This commit is contained in:
Zhang Yubing
2024-10-21 15:00:29 +08:00
committed by Tao Huang
parent 1170853176
commit b44192e488

View File

@@ -4996,24 +4996,30 @@ static void dw_dp_hpd_work(struct work_struct *work)
dev_dbg(dp->dev, "got hpd irq - %s\n", long_hpd ? "long" : "short");
if (!long_hpd) {
phy_power_on(dp->phy);
if (dp->is_mst) {
dw_dp_check_mst_status(dp);
phy_power_off(dp->phy);
return;
}
if (dw_dp_hpd_short_pulse(dp))
if (dw_dp_hpd_short_pulse(dp)) {
phy_power_off(dp->phy);
return;
}
if (dp->compliance.test_active &&
dp->compliance.test_type == DP_TEST_LINK_PHY_TEST_PATTERN) {
dw_dp_phy_test(dp);
/* just do the PHY test and nothing else */
phy_power_off(dp->phy);
return;
}
ret = dw_dp_link_retrain(dp);
if (ret)
dev_warn(dp->dev, "Retrain link failed\n");
phy_power_off(dp->phy);
} else {
drm_helper_hpd_irq_event(dp->bridge.dev);
}