UPSTREAM: lib/edid.c: Differentiate between absent and non-conformant EDID

BUG=none
BRANCH=none
TEST=none

Change-Id: Iedd3c5ff51fd8488b48eb36dc50556169a7606e4
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 8c5884e8d7
Original-Change-Id: Id90aa210ff72092c4ab638a7bafb82bd11889bdc
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/19502
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://chromium-review.googlesource.com/496052
This commit is contained in:
Arthur Heymans 2017-04-30 08:28:05 +02:00 committed by chrome-bot
commit ffdbb72fa5
7 changed files with 28 additions and 21 deletions

View file

@ -1322,7 +1322,7 @@ static void tegra_dp_update_config(struct tegra_dc_dp_data *dp,
return;
}
if (decode_edid(buf, sizeof(buf), &edid)) {
if (decode_edid(buf, sizeof(buf), &edid) != EDID_CONFORMANT) {
printk(BIOS_ERR, "%s: Failed to decode EDID. Use defaults.\n",
__func__);
return;

View file

@ -1361,7 +1361,7 @@ static void tegra_dp_update_config(struct tegra_dc_dp_data *dp,
return;
}
if (decode_edid(buf, sizeof(buf), &edid)) {
if (decode_edid(buf, sizeof(buf), &edid) != EDID_CONFORMANT) {
printk(BIOS_ERR, "%s: Failed to decode EDID. Use defaults.\n",
__func__);
return;

View file

@ -778,7 +778,7 @@ static int rk_edp_read_edid(struct rk_edp *edp, struct edid *edid)
}
}
if (decode_edid(buf, edid_size, edid)) {
if (decode_edid(buf, edid_size, edid) != EDID_CONFORMANT) {
printk(BIOS_ERR, "%s: Failed to decode EDID.\n",
__func__);
return -1;

View file

@ -814,7 +814,7 @@ int rk_hdmi_get_edid(struct edid *edid)
/* Assume usage of HDMI implies an external display in which case
* we should be lenient about errors that the EDID decoder finds. */
if (decode_edid(edid_buf, edid_size, edid))
if (decode_edid(edid_buf, edid_size, edid) != EDID_CONFORMANT)
hdmi_debug("failed to decode edid.\n");
/* Try 480p for best compatibility. */