diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2019-12-07 14:00:42 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2019-12-07 14:00:42 +0100 |
commit | 46a0691551e44d49a2c3951a7d944786131c97c3 (patch) | |
tree | 2f1341a031aa2b0faaee91ed127cc72ae8a7c07f /parse-vtb-ext-block.cpp | |
parent | 9b3d4ce45d978c9fe4571b571b060c3317bbf1b9 (diff) |
edid-decode: add VTB-Ext support
Support the VTB-Ext standard.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'parse-vtb-ext-block.cpp')
-rw-r--r-- | parse-vtb-ext-block.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/parse-vtb-ext-block.cpp b/parse-vtb-ext-block.cpp new file mode 100644 index 0000000..119fc7d --- /dev/null +++ b/parse-vtb-ext-block.cpp @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +/* + * Copyright 2019 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * + * Author: Hans Verkuil <hverkuil-cisco@xs4all.nl> + */ + +#include "edid-decode.h" + +void edid_state::parse_vtb_ext_block(const unsigned char *x) +{ + printf("%s Version %u\n", block.c_str(), x[1]); + if (x[1] != 1) + fail("Invalid version %u\n", x[1]); + + unsigned num_dtb = x[2]; + unsigned num_cvt = x[3]; + unsigned num_st = x[4]; + + x += 5; + for (unsigned i = 0; i < num_dtb; i++, x += 18) + detailed_timings(" ", x); + for (unsigned i = 0; i < num_cvt; i++, x += 3) + detailed_cvt_descriptor(" ", x, false); + for (unsigned i = 0; i < num_st; i++, x += 2) { + if ((x[1] & 0x3f) >= 60) + print_standard_timing(" ", x[0], x[1] - 60, true); + else + print_standard_timing(" ", x[0], x[1], true, 0); + } +} |