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@chromium.org>
Original-Commit-Id: 44bda7311f9ee677235e4dc8db669226518b3895
Original-Change-Id: I9089755b75118499bec37bdb96d1635f66252e65
Original-Signed-off-by: Douglas Anderson <dianders@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/309298
Original-Commit-Ready: David Hendricks <dhendrix@chromium.org>
Original-Tested-by: David Hendricks <dhendrix@chromium.org>
Original-Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/12231
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Douglas Anderson 2015-10-27 16:27:29 -07:00 committed by Patrick Georgi
parent 5ece96a00f
commit 6db10452b4
1 changed files with 2 additions and 2 deletions

View File

@ -738,6 +738,8 @@ static int hdmi_read_edid(int block, u8 *buff)
write32(&hdmi_regs->i2cm_segptr, block >> 1); write32(&hdmi_regs->i2cm_segptr, block >> 1);
while (trytime--) { while (trytime--) {
edid_read_err = 0;
for (n = 0; n < HDMI_EDID_BLOCK_SIZE/8; n++) { for (n = 0; n < HDMI_EDID_BLOCK_SIZE/8; n++) {
write32(&hdmi_regs->i2cmess, shift + 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) if (!edid_read_err)
break; break;
edid_read_err = 0;
} }
return edid_read_err; return edid_read_err;