[coreboot-gerrit] New patch to review for coreboot: rockchip/rk3288: If we fail to read the EDID 5 times in a row, it's an error

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Wed Oct 28 22:32:15 CET 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12231

-gerrit

commit c3a80ec79af36670eaa9e4faa2dbebaea12e64fa
Author: Douglas Anderson <dianders at chromium.org>
Date:   Tue Oct 27 16:27:29 2015 -0700

    rockchip/rk3288: If we fail to read the EDID 5 times in a row, it's an error
    
    Previously if we tried to read the HDMI EDID several times and failed
    each time then we're return from hdmi_read_edid() with no error.  Then
    we'd interpret whatever happened to be in memory at the time as an
    EDID--not so great.
    
    Let's actually look at the error.
    
    BRANCH=none
    BUG=chrome-os-partner:46256
    TEST=Monitor that can't read EDID not shows that in the log
    
    Change-Id: I6e64b13ae3f8c61bf1baaa1cfc8b24987bd75cf3
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: 44bda7311f9ee677235e4dc8db669226518b3895
    Original-Change-Id: I9089755b75118499bec37bdb96d1635f66252e65
    Original-Signed-off-by: Douglas Anderson <dianders at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/309298
    Original-Commit-Ready: David Hendricks <dhendrix at chromium.org>
    Original-Tested-by: David Hendricks <dhendrix at chromium.org>
    Original-Reviewed-by: David Hendricks <dhendrix at chromium.org>
---
 src/soc/rockchip/rk3288/hdmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/soc/rockchip/rk3288/hdmi.c b/src/soc/rockchip/rk3288/hdmi.c
index a520399..104d80f 100644
--- a/src/soc/rockchip/rk3288/hdmi.c
+++ b/src/soc/rockchip/rk3288/hdmi.c
@@ -738,6 +738,8 @@ static int hdmi_read_edid(int block, u8 *buff)
 	write32(&hdmi_regs->i2cm_segptr, block >> 1);
 
 	while (trytime--) {
+		edid_read_err = 0;
+
 		for (n = 0; n < HDMI_EDID_BLOCK_SIZE/8; n++) {
 			write32(&hdmi_regs->i2cmess, shift + 8 * n);
 
@@ -764,8 +766,6 @@ static int hdmi_read_edid(int block, u8 *buff)
 
 		if (!edid_read_err)
 			break;
-
-		edid_read_err = 0;
 	}
 
 	return edid_read_err;



More information about the coreboot-gerrit mailing list