drm/rockchip: rk3066_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: Iffe3164af1f1ad32002c26b5bbac14f2ff417c96
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This commit is contained in:
Algea Cao
2018-07-14 16:22:43 +08:00
committed by Tao Huang
parent aa3e5d4088
commit d929366968

View File

@@ -498,6 +498,7 @@ static int rk3066_hdmi_connector_get_modes(struct drm_connector *connector)
struct edid *edid;
const u8 def_modes[6] = {4, 16, 31, 19, 17, 2};
struct drm_display_mode *mode;
struct drm_display_info *info = &connector->display_info;
int i, ret = 0;
if (!hdmi->ddc)
@@ -524,6 +525,11 @@ static int rk3066_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");
}