summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Anderson <dianders@chromium.org>2015-10-27 16:27:29 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-10-29 21:07:19 +0100
commit6db10452b4ad5d99d160fd6f6c52c4c9a6c30635 (patch)
tree85ab2c8c5025c06980fbbc6d335a0c3e68fa6802
parent5ece96a00f0701a0035f13584a4460e881d8ed5d (diff)
downloadcoreboot-staging-6db10452b4ad5d99d160fd6f6c52c4c9a6c30635.zip
coreboot-staging-6db10452b4ad5d99d160fd6f6c52c4c9a6c30635.tar.gz
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>
-rw-r--r--src/soc/rockchip/rk3288/hdmi.c4
1 files 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;
OpenPOWER on IntegriCloud