diff options
author | Shunqing Chen <csq@rock-chips.com> | 2019-01-16 11:21:05 +0800 |
---|---|---|
committer | Tao Huang <huangtao@rock-chips.com> | 2019-01-18 18:32:24 +0800 |
commit | 268d47af6983140cfdfda5a2e6cde67fd7fd165e (patch) | |
tree | 2d5d6ed031b29c48eee4d3d6094e1236c7fd494f /drivers | |
parent | 2078e9f7634da559877e7252e3d7420c11c4b954 (diff) |
drm/rockchip: rk618: if hpd status is disconnected, not to read edid
If dual display, software assumes the hpd status is always connected,
so if hpd status on hardware is disconnected, not to read edid.
Change-Id: I43b08b8f7a605089eac4cae6622a8830e2dd17c2
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/rockchip/rk618/rk618_hdmi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/rockchip/rk618/rk618_hdmi.c b/drivers/gpu/drm/rockchip/rk618/rk618_hdmi.c index 4961970a6e4b..341d774028e6 100644 --- a/drivers/gpu/drm/rockchip/rk618/rk618_hdmi.c +++ b/drivers/gpu/drm/rockchip/rk618/rk618_hdmi.c @@ -957,14 +957,16 @@ static int rk618_hdmi_connector_get_modes(struct drm_connector *connector) struct drm_display_mode *mode; struct drm_display_info *info = &connector->display_info; const u8 def_modes[6] = {4, 16, 31, 19, 17, 2}; - struct edid *edid; + struct edid *edid = NULL; int ret = 0; u8 i; if (!hdmi->ddc) return 0; - edid = drm_get_edid(connector, hdmi->ddc); + if ((hdmi_readb(hdmi, HDMI_STATUS) & m_HOTPLUG)) + edid = drm_get_edid(connector, hdmi->ddc); + if (edid) { hdmi->hdmi_data.sink_is_hdmi = drm_detect_hdmi_monitor(edid); hdmi->hdmi_data.sink_has_audio = drm_detect_monitor_audio(edid); |