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>
This commit is contained in:
Shunqing Chen
2019-01-16 11:21:05 +08:00
committed by Tao Huang
parent 2078e9f763
commit 268d47af69

View File

@@ -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);