aboutsummaryrefslogtreecommitdiffstats
path: root/parse-base-block.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-02-03 10:19:33 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-02-03 10:19:33 +0100
commit863038c16a0e380f54cd5560413dbb426a4abf29 (patch)
tree5a1d441f757520e4903e28639a5f23fa75f66696 /parse-base-block.cpp
parenta004802a68f85992fb92bc0c93b2773d413d7f9e (diff)
edid-decode: improve image/display size checks
1) when print_timings is called to show preferred and/or native timings, skip any checks. Those have been done already when these timings were first parsed, and doing it again results in duplicate messages. 2) if the display size is 0x0 and the max image size > 2559x2559mm, then do not fail since the display size can only report sizes smaller than that. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'parse-base-block.cpp')
-rw-r--r--parse-base-block.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/parse-base-block.cpp b/parse-base-block.cpp
index 03abdbc..7ada311 100644
--- a/parse-base-block.cpp
+++ b/parse-base-block.cpp
@@ -1940,6 +1940,13 @@ void edid_state::check_base_block()
*/
msg(!out_of_range || base.edid_minor >= 4, "%s", err.c_str());
}
+ // The base block will only go up to 255x255 cm for the display size,
+ // so don't fail if one or more image sizes exceeds that.
+ if (!base.max_display_width_mm && !base.max_display_height_mm &&
+ dtd_max_hsize_mm && dtd_max_vsize_mm &&
+ dtd_max_hsize_mm <= 2559 && dtd_max_vsize_mm <= 2559) {
+ fail("One or more DTDs specified an image size, but no display size was set.\n");
+ }
if (base.edid_minor == 3 && num_blocks > 2 && !block_map.saw_block_1)
fail("EDID 1.3 requires a Block Map Extension in Block 1 if there are more than 2 blocks in the EDID.\n");
if (base.edid_minor == 3 && num_blocks > 128 && !block_map.saw_block_128)

Privacy Policy