From 1afb29721ec06786d0f44db66b215c93319fe902 Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Thu, 17 Apr 2014 09:48:47 +0800 Subject: [PATCH] edid: Do not set vbe_valid when decoding a EDID. The "vbe_valid" flag is used by Coreboot table to notify payloads if a valid VBE system is available. It is possible that display system initialization may fail after a valid EDID is found. In that case, currently payloads will crash when trying to output to video console. The original intention for this portion of code is to add some check so set_vbe_mode_info_valid can abort when no valid EDID is found. However now we do have platforms (ex, ARM/Exynos) that hard codes EDID structure without calling decode_edid, so we should let the callers decide if they want to continue by the return value of decode_edid. We don't need to set vbe_valid when checksum is correct. It should be safe to remove the setting of vbe_valid in decode_edid function, because vbe_valid is also set in set_vbe_mode_info_valid function. Currently all devices calling decode_edid (tegra124, link, peppy, falco) do invoke set_vbe_mode_info_valid after decode_edid. BRANCH=none BUG=none TEST=Manually built and tested on following devices: nyan_big, link, peppy, falco. Change-Id: I5232bca92f73b21314d37dcd6c81578232318fd5 Signed-off-by: Hung-Te Lin Reviewed-on: https://chromium-review.googlesource.com/195371 Reviewed-by: Julius Werner --- src/lib/edid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/edid.c b/src/lib/edid.c index 92d1027a8f..bb332e8769 100644 --- a/src/lib/edid.c +++ b/src/lib/edid.c @@ -1234,7 +1234,7 @@ int decode_edid(unsigned char *edid, int size, struct edid *out) } printk(BIOS_SPEW, "Checksum\n"); - vbe_valid = do_checksum(edid); + do_checksum(edid); /* 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