mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
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:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user