aboutsummaryrefslogtreecommitdiffstats
path: root/parse-displayid-block.cpp
diff options
context:
space:
mode:
authorjoevt <joevt@shaw.ca>2021-09-26 01:33:22 -0700
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-09-27 12:47:21 +0200
commit9ec0f56dfc1546907fc408f548dc7987310c72ec (patch)
tree7fd004bab067da0a99f541ace8185920cad921eb /parse-displayid-block.cpp
parentf622e7370a2cc00904a1d4e6241f72e6b8aa3888 (diff)
edid-decode: ignore DisplayID version for OUI check.
- Interpret VESA data block even if DisplayID version is not 2.0. See example apple-xdr-6k. - Remove the "Unknown DisplayID Data Block" fail message for these tags because there's a "Use of DisplayID v#.# tag for DisplayID v%u.%u.\n" fail message for them. - Include tag number for ambiguous DisplayID tags. - Don't need tag number for 0x81 because it's not ambiguous. Signed-off-by: Joe van Tunen <joevt@shaw.ca> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'parse-displayid-block.cpp')
-rw-r--r--parse-displayid-block.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/parse-displayid-block.cpp b/parse-displayid-block.cpp
index c090056..5266bb3 100644
--- a/parse-displayid-block.cpp
+++ b/parse-displayid-block.cpp
@@ -1697,8 +1697,7 @@ unsigned edid_state::displayid_block(const unsigned version, const unsigned char
// 0x2a .. 0x7d RESERVED for Additional VESA-defined Data Blocks
case 0x7e: // DisplayID 2.0
case 0x7f: // DisplayID 1.3
- if ((tag == 0x7e && version >= 0x20) ||
- (tag == 0x7f && version < 0x20)) {
+ {
oui = (x[3] << 16) + (x[4] << 8) + x[5];
const char *name = oui_name(oui);
bool reversed = false;
@@ -1709,17 +1708,15 @@ unsigned edid_state::displayid_block(const unsigned version, const unsigned char
reversed = true;
}
if (name)
- data_block = std::string("Vendor-Specific Data Block (") + name + ")";
+ data_block = "Vendor-Specific Data Block (" + utohex(tag) + ") (" + name + ")";
else
- data_block = "Vendor-Specific Data Block, OUI " + ouitohex(oui);
+ data_block = "Vendor-Specific Data Block (" + utohex(tag) + "), OUI " + ouitohex(oui);
if (reversed)
fail((std::string("OUI ") + ouitohex(oui) + " is in the wrong byte order.\n").c_str());
- } else {
- data_block = "Unknown DisplayID Data Block (" + utohex(tag) + ")";
}
break;
// 0x80 RESERVED
- case 0x81: data_block = "CTA-861 DisplayID Data Block (" + utohex(tag) + ")"; break;
+ case 0x81: data_block = "CTA-861 DisplayID Data Block"; break;
// 0x82 .. 0xff RESERVED
default: data_block = "Unknown DisplayID Data Block (" + utohex(tag) + ")"; break;
}

Privacy Policy