summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorJernej Skrabec <jernej.skrabec@siol.net>2021-04-22 01:14:27 +0100
committerAnatolij Gustschin <agust@denx.de>2021-04-24 13:44:41 +0200
commit4fb0c3c43fbb4d28c80dc4019cdcbf57bf153021 (patch)
treee6dce538c384353ddf796e241f3759fdab5bc1d3 /common
parent3b9021a545d235f6bf53f37140e173318d79f9f8 (diff)
downloadu-boot-4fb0c3c43fbb4d28c80dc4019cdcbf57bf153021.tar.gz
u-boot-4fb0c3c43fbb4d28c80dc4019cdcbf57bf153021.tar.xz
u-boot-4fb0c3c43fbb4d28c80dc4019cdcbf57bf153021.zip
common: edid: check for digital display earlier
When searching for detailed timing in EDID, check for digital display earlier. There is no point parsing other parameters if this flag is not present. Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'common')
-rw-r--r--common/edid.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/common/edid.c b/common/edid.c
index 553ab8fd01..1cb7177742 100644
--- a/common/edid.c
+++ b/common/edid.c
@@ -185,6 +185,11 @@ int edid_get_timing_validate(u8 *buf, int buf_size,
return -EINVAL;
}
+ if (!EDID1_INFO_VIDEO_INPUT_DIGITAL(*edid)) {
+ debug("%s: Not a digital display\n", __func__);
+ return -ENOSYS;
+ }
+
if (!EDID1_INFO_FEATURE_PREFERRED_TIMING_MODE(*edid)) {
debug("%s: No preferred timing\n", __func__);
return -ENOENT;
@@ -211,10 +216,6 @@ int edid_get_timing_validate(u8 *buf, int buf_size,
if (!timing_done)
return -EINVAL;
- if (!EDID1_INFO_VIDEO_INPUT_DIGITAL(*edid)) {
- debug("%s: Not a digital display\n", __func__);
- return -ENOSYS;
- }
if (edid->version != 1 || edid->revision < 4) {
debug("%s: EDID version %d.%d does not have required info\n",
__func__, edid->version, edid->revision);