This is an automatic generated email to let you know that the following patch were queued:
Subject: edid-decode: partial Apple VSDB decoding Author: Hans Verkuil <hverkuil-ci...@xs4all.nl> Date: Thu Mar 10 18:26:54 2022 +0100 Googling uncovered a snippet of code from Apple that indicates what the first two bytes are. Implement and document this. Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl> edid-decode.h | 1 + parse-cta-block.cpp | 5 +++++ parse-displayid-block.cpp | 22 ++++++++++++++++++++++ 3 files changed, 28 insertions(+) --- diff --git a/edid-decode.h b/edid-decode.h index fdd0d413c46c..41f8e6377042 100644 --- a/edid-decode.h +++ b/edid-decode.h @@ -412,6 +412,7 @@ struct edid_state { unsigned displayid_block(const unsigned version, const unsigned char *x, unsigned length); void parse_displayid_block(const unsigned char *x); void parse_displayid_vesa(const unsigned char *x); + void parse_displayid_apple(const unsigned char *x); void parse_displayid_cta_data_block(const unsigned char *x); void check_displayid_blocks(); diff --git a/parse-cta-block.cpp b/parse-cta-block.cpp index 576227823788..8de6e6bf0008 100644 --- a/parse-cta-block.cpp +++ b/parse-cta-block.cpp @@ -2169,6 +2169,11 @@ void edid_state::cta_block(const unsigned char *x, std::vector<unsigned> &found_ case 0x700: cta_vcdb(x, length); break; case 0x701|kOUI_HDR10: cta_hdr10plus(x, length); break; case 0x701|kOUI_Dolby: cta_dolby_video(x, length); break; + // 0x701|kOUI_Apple: this almost certainly contains 'BLC Info/Corrections', + // since the data (spread out over two VSDBs) is very similar to what is seen + // in DisplayID blocks. Since I don't know how to parse this data, we still + // default to a hex dump, but I mention this here in case data on how to + // parse this becomes available. case 0x702: cta_vesa_vdddb(x, length); break; case 0x705: cta_colorimetry_block(x, length); break; case 0x706: cta_hdr_static_metadata_block(x, length); break; diff --git a/parse-displayid-block.cpp b/parse-displayid-block.cpp index 81eb287a57a1..dbc2a60dbabe 100644 --- a/parse-displayid-block.cpp +++ b/parse-displayid-block.cpp @@ -1574,6 +1574,27 @@ void edid_state::parse_displayid_vesa(const unsigned char *x) } } +// tag 0x7f, OUI 00-10-FA (Apple) + +void edid_state::parse_displayid_apple(const unsigned char *x) +{ + int length = x[2] - 3; + + x += 6; + + // Based on the very limited information I found here: + // https://opensource.apple.com/source/IOKitUser/IOKitUser-1445.40.1/graphics.subproj/IODisplayLib.c + switch (x[0]) { + case 1: + printf(" Type: BLC Info/Corrections, Version: %u\n", x[1]); + break; + default: + printf(" Type: %u, Version: %u\n", x[0], x[1]); + break; + } + hex_block(" ", x + 2, length - 2); +} + // tag 0x81 void edid_state::parse_displayid_cta_data_block(const unsigned char *x) @@ -1917,6 +1938,7 @@ unsigned edid_state::displayid_block(const unsigned version, const unsigned char break; } case 0x7e|kOUI_VESA: parse_displayid_vesa(x); break; + case 0x7f|kOUI_Apple: parse_displayid_apple(x); break; case 0x81: parse_displayid_cta_data_block(x); break; default: hex_block(" ", x + 3 + (hasoui ? 3 : 0), (len > (hasoui ? 3 : 0)) ? len - (hasoui ? 3 : 0) : 0); break; } _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits