edid: Relax EDID 1.3 requirements.

In E-EDID (EDID v1.3), Monitor Name (0xfc) and Monitor Range Limits (0xfd) are
always required. However, some panels do not really have these fields. As a
workaround (and since we don't really use these fields), we only print warning
messages for that case.

Change-Id: I81b1db7d7f6c6f9320a862608dec4c7be298d7db
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/193742
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
(cherry picked from commit c633215ef8342664d9a4478e821fc8aad368b7f3)
Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com>
Reviewed-on: http://review.coreboot.org/7009
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
diff --git a/src/lib/edid.c b/src/lib/edid.c
index 6efe6a9..c8e3203 100644
--- a/src/lib/edid.c
+++ b/src/lib/edid.c
@@ -1272,12 +1272,22 @@
 		if (nonconformant_digital_display ||
 		    !has_valid_string_termination ||
 		    !has_valid_descriptor_pad ||
-		    !has_name_descriptor ||
-		    !has_preferred_timing ||
-		    !has_range_descriptor)
+		    !has_preferred_timing) {
 			conformant = 0;
+		}
+		/**
+		 * According to E-EDID (EDIDv1.3), has_name_descriptor and
+		 * has_range_descriptor are both required. These fields are
+		 * optional in v1.4. However some v1.3 panels (Ex, B133XTN01.3)
+		 * don't have them. As a workaround, we only print warning
+		 * messages.
+		 */
 		if (!conformant)
 			printk(BIOS_ERR, "EDID block does NOT conform to EDID 1.3!\n");
+		else if (!has_name_descriptor || !has_range_descriptor)
+			printk(BIOS_WARNING, "WARNING: EDID block does NOT "
+			       "fully conform to EDID 1.3.\n");
+
 		if (nonconformant_digital_display)
 			printk(BIOS_ERR, "\tDigital display field contains garbage: %x\n",
 			       nonconformant_digital_display);