[coreboot-gerrit] Patch set updated for coreboot: 52559a3 edid: Fix extension parsing when EDID blob does not have any extensions.

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Mon Sep 29 22:49:03 CEST 2014


Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6995

-gerrit

commit 52559a3989718502f71e2336ed0a2702db8d1844
Author: Hung-Te Lin <hungte at chromium.org>
Date:   Thu Apr 3 18:35:58 2014 +0800

    edid: Fix extension parsing when EDID blob does not have any extensions.
    
    When parsing "extensions", we should skip the first EDID (main) block and start
    from offset 128 (EDID may have only main block, so an EDID without any
    extension is fine) because the header format for main block and extensions are
    different.
    
    Without this we will see "Unknown extension block" on all EDIDs, and seeing an
    error (1) return value for EDIDs without extension.
    
    Also, after the first "unknown" error is fixed, we can now collect all return
    values from parse_extension, and return an error when any of the extensions are
    wrong (not just last one).
    
    Change-Id: I0ee029ac8ec6800687cd7749e23989399e721109
    Signed-off-by: Hung-Te Lin <hungte at chromium.org>
    Reviewed-on: https://chromium-review.googlesource.com/193011
    (cherry picked from commit fdf0cc2e9573c19b550fa2b5e4e06337b114f864)
    Signed-off-by: Isaac Christensen <isaac.christensen at se-eng.com>
---
 src/lib/edid.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/lib/edid.c b/src/lib/edid.c
index 0dc86d5..6bd471a 100644
--- a/src/lib/edid.c
+++ b/src/lib/edid.c
@@ -1261,8 +1261,14 @@ int decode_edid(unsigned char *edid, int size, struct edid *out)
 
 	printk(BIOS_SPEW, "Checksum\n");
 	do_checksum(edid);
-	for(i = 0; i < size; i += 128)
-		nonconformant_extension = parse_extension(out, &edid[i]);
+
+	/* EDID v2.0 has a larger blob (256 bytes) and may have some problem in
+	 * the extension parsing loop below.  Since v2.0 was quickly deprecated
+	 * by v1.3 and we are unlikely to use any EDID 2.0 panels, we ignore
+	 * that case now and can fix it when we need to use a real 2.0 panel.
+	 */
+	for(i = 128; i < size; i += 128)
+		nonconformant_extension += parse_extension(out, &edid[i]);
 	/*
 	 * x = edid;
 	 * for (edid_lines /= 8; edid_lines > 1; edid_lines--) {



More information about the coreboot-gerrit mailing list