diff options
authorHans de Goede <>2013-01-10 02:11:14 +0400
committerAlejandro Mery <>2013-01-14 14:36:05 +0400
commitf07b3f290ce4ba804990754663c3f3097972c2c1 (patch)
parentbc284ccd34c3073657f09e80909c7941a533486c (diff)
sunxi-hdmi: Don't overwrite the current timings when receiving new EDID
Besides that overwriting the current timings is just wrong, this also fixes a lot of "EDID mode used without valid EDID info" messages getting thrown and more nasty side effects when unplugging and replugging a monitor. What was happening is that the hdmi-edid code calls hdmi_edid_received, which updates the fb_dev mode-list, the fbdev core code responds to this by asking us what the current mode is, which ends up with a call to hdmi_get_video_timing(). which would fail in Hdmi_tv_mode_to_hdmi_mode because the Device_Support_VIC[HDMI_EDID] has been set to 0. After the fbdev core failed to get the current mode, it tries to set things to a new mode, which ends up doing a hdmi_get_video_timing() again (to save the current mode as a fallback in case the new mode fails), which fails, and things go downhill from there... This patches fixes all this by keeping the current timing info in place as *the* EDID mode when the current video_mode is HDMI_EDID. Signed-off-by: Hans de Goede <>
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/video/sunxi/hdmi/hdmi_edid.c b/drivers/video/sunxi/hdmi/hdmi_edid.c
index 5cee38399a48..68936c22511a 100644
--- a/drivers/video/sunxi/hdmi/hdmi_edid.c
+++ b/drivers/video/sunxi/hdmi/hdmi_edid.c
@@ -427,7 +427,14 @@ __s32 ParseEDID(void)
- memset(Device_Support_VIC, 0, HDMI_DEVICE_SUPPORT_VIC_SIZE);
+ if (video_mode == HDMI_EDID) {
+ /* HDMI_DEVICE_SUPPORT_VIC_SIZE - 1 so as to not overwrite
+ the currently in use timings with a new preferred mode! */
+ memset(Device_Support_VIC, 0,
+ } else {
+ memset(Device_Support_VIC, 0, HDMI_DEVICE_SUPPORT_VIC_SIZE);
+ }
memset(EDID_Buf, 0, sizeof(EDID_Buf));