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: I9089755b75118499bec37bdb96d1635f66252e65 Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/309316 Reviewed-by: David Hendricks <dhendrix@chromium.org> Reviewed-by: Yakir Yang <ykk@rock-chips.com> Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Julius Werner <jwerner@chromium.org> Tested-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
parent
7719ac411b
commit
bcd7deb01b
1 changed files with 2 additions and 2 deletions
|
|
@ -738,6 +738,8 @@ static int hdmi_read_edid(int block, u8 *buff)
|
|||
writel(block >> 1, &hdmi_regs->i2cm_segptr);
|
||||
|
||||
while (trytime--) {
|
||||
edid_read_err = 0;
|
||||
|
||||
for (n = 0; n < HDMI_EDID_BLOCK_SIZE/8; n++) {
|
||||
writel(shift + 8 * n, &hdmi_regs->i2cmess);
|
||||
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue