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 4240b810a9
commit cf754a978d

View File

@@ -2774,6 +2774,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
connector);
struct edid *edid;
struct drm_display_mode *mode;
struct drm_display_info *info = &connector->display_info;
int i, ret = 0;
edid = dw_hdmi_get_edid(hdmi, connector);
@@ -2797,6 +2798,9 @@ 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");
}