summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-01-10 02:11:15 +0400
committerAlejandro Mery <amery@geeks.cl>2013-01-14 14:36:06 +0400
commit6a723af5f76d2da03478cdea3e417db1c3a7aa5b (patch)
treeacfb7fcf6e883ca18ee053cbc0b29688699a75f4
parentf07b3f290ce4ba804990754663c3f3097972c2c1 (diff)
downloadlinux-sunxi-6a723af5f76d2da03478cdea3e417db1c3a7aa5b.tar.xz
sunxi-hdmi: Call hdmi_edid_received after checking the checksum
As it is not really helpful to pass bogus data to the fbdev ... Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r--drivers/video/sunxi/hdmi/hdmi_edid.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/sunxi/hdmi/hdmi_edid.c b/drivers/video/sunxi/hdmi/hdmi_edid.c
index 68936c22511a..6d2eb2ea9e77 100644
--- a/drivers/video/sunxi/hdmi/hdmi_edid.c
+++ b/drivers/video/sunxi/hdmi/hdmi_edid.c
@@ -440,11 +440,12 @@ __s32 ParseEDID(void)
DDC_Init();
GetEDIDData(0, EDID_Buf);
- hdmi_edid_received(EDID_Buf, 0);
if (EDID_CheckSum(0, EDID_Buf) != 0)
return 0;
+ hdmi_edid_received(EDID_Buf, 0);
+
if (EDID_Header_Check(EDID_Buf) != 0)
return 0;
@@ -463,10 +464,12 @@ __s32 ParseEDID(void)
for (i = 1; i <= BlockCount; i++) {
GetEDIDData(i, EDID_Buf);
- hdmi_edid_received(EDID_Buf+(0x80*i), i);
+
if (EDID_CheckSum(i, EDID_Buf) != 0)
return 0;
+ hdmi_edid_received(EDID_Buf+(0x80*i), i);
+
if (EDID_Buf[0x80 * i + 0] == 2) {
if (EDID_Buf[0x80 * i + 3] & 0x40) {
audio_info.supported_rates |=