mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
drm/bridge: synopsys: dw-hdmi: check hdmi status in resume
HDMI status maybe incorrect in the following condition: HDMI plug in -> system sleep -> HDMI plug out -> system wake up. At this time, cat /sys/class/drm/card 0-HDMI-A-1/status is connected. There is no hpd interrupt, because HDMI is powerdown during suspend. So we need check the current HDMI status in this case. Test on rk3288 & rk3399. Change-Id: I2fbafd1d80b59628bca65e9e45760a24d1668241 Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
This commit is contained in:
committed by
Shunqing Chen
parent
b8c2578c5a
commit
881ef729dd
@@ -4155,6 +4155,21 @@ void dw_hdmi_resume(struct device *dev, struct dw_hdmi *hdmi)
|
||||
dw_hdmi_i2c_init(hdmi);
|
||||
if (hdmi->irq)
|
||||
enable_irq(hdmi->irq);
|
||||
/*
|
||||
* HDMI status maybe incorrect in the following condition:
|
||||
* HDMI plug in -> system sleep -> HDMI plug out -> system wake up.
|
||||
* At this time, cat /sys/class/drm/card 0-HDMI-A-1/status is connected.
|
||||
* There is no hpd interrupt, because HDMI is powerdown during suspend.
|
||||
* So we need check the current HDMI status in this case.
|
||||
*/
|
||||
if (hdmi->connector.status == connector_status_connected) {
|
||||
if (hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data) ==
|
||||
connector_status_disconnected) {
|
||||
hdmi->hpd_state = false;
|
||||
mod_delayed_work(hdmi->workqueue, &hdmi->work,
|
||||
msecs_to_jiffies(20));
|
||||
}
|
||||
}
|
||||
mutex_unlock(&hdmi->mutex);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dw_hdmi_resume);
|
||||
|
||||
Reference in New Issue
Block a user