video: rockchip: hdmi: fix parsing 1st block edid
authorZheng Yang <zhengyang@rock-chips.com>
Mon, 12 Oct 2015 03:46:43 +0000 (11:46 +0800)
committerZheng Yang <zhengyang@rock-chips.com>
Mon, 12 Oct 2015 06:13:07 +0000 (14:13 +0800)
If parsing 1st block edid failed, we think it is good
only when there is more than one external block.

Change-Id: I1eb11405dade41ebb2ad041ba909de0c7ea120f8
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
drivers/video/rockchip/hdmi/rockchip-hdmi-edid.c

index 610937e703ed037adc8be6c1ff12b685fa1e96e7..1ade35096198c398bfd0399da3f0787583af4a3c 100644 (file)
@@ -122,7 +122,8 @@ int hdmi_edid_parse_base(unsigned char *buf,
        fb_edid_to_monspecs(buf, pedid->specs);
 
 out:
-       if (rc != E_HDMI_EDID_SUCCESS && *extend_num > 4)
+       if ((rc != E_HDMI_EDID_SUCCESS) &&
+           (*extend_num < 1 && *extend_num > 4))
                return rc;
        else
                return E_HDMI_EDID_SUCCESS;