diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2020-11-21 13:46:49 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2020-11-21 13:46:49 +0100 |
commit | 45190a18df36a4294279aa79a6a928a51afa2046 (patch) | |
tree | bbe15ca4242a50e3e015a20638c0c7a87f203a93 | |
parent | 9e5323dfc606646b2c5a179562f587c1ac14761d (diff) |
edid-decode: add HDMI CTA-861 block checks
The HDMI Specification has some additional CTA-861 requirements.
Check those.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r-- | parse-cta-block.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/parse-cta-block.cpp b/parse-cta-block.cpp index d83949f..61a5e2c 100644 --- a/parse-cta-block.cpp +++ b/parse-cta-block.cpp @@ -1960,6 +1960,10 @@ void edid_state::parse_cta_block(const unsigned char *x) printf(" Revision: %u\n", version); if (version == 0) fail("Invalid CTA-861 Extension revision 0\n"); + if (version == 2) + fail("Deprecated CTA-861 Extension revision 2\n"); + if (cta.has_hdmi && version != 3) + fail("The HDMI Specification requires CTA Extension revision 3\n"); if (version > 3) warn("Unknown CTA-861 Extension revision %u\n", version); @@ -2015,6 +2019,8 @@ void edid_state::parse_cta_block(const unsigned char *x) sprintf(type, "DTD %3u", i + 1); cta.native_timings.push_back(timings_ext(i + 129, type)); } + if (cta.has_hdmi && block_nr != (block_map.saw_block_1 ? 2 : 1)) + fail("The HDMI Specification requires that the first Extension Block (that is not a Block Map) is an CTA-861 Extension Block\n"); } } if (version >= 3) { |