drm/bridge: synopsys: dw-hdmi: Clear color depth mask and format if get edid failed

If edid can't be got when hdmi plug in, hdmi color depth mask and format
won't be updated. The color list in the setting are those of the previous
TV. This commit fix the error.

Change-Id: I5ed4be5efa2a69be0b58489f58a3af5de9912292
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This commit is contained in:
Algea Cao 2018-07-14 15:02:54 +08:00 committed by Tao Huang
parent d8a557f838
commit aa3e5d4088

View File

@ -2498,6 +2498,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
struct edid *edid;
struct drm_display_mode *mode;
const u8 def_modes[6] = {4, 16, 31, 19, 17, 2};
struct drm_display_info *info = &connector->display_info;
struct hdr_static_metadata *metedata =
&connector->display_info.hdmi.hdr_panel_metadata;
int i, ret = 0;
@ -2533,6 +2534,10 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
ret++;
}
}
info->edid_hdmi_dc_modes = 0;
info->hdmi.y420_dc_modes = 0;
info->color_formats = 0;
dev_info(hdmi->dev, "failed to get edid\n");
}