aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-09-20 17:16:55 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-09-20 17:16:55 +0200
commit30927dac873a34a24542b4609f192c37174d2c86 (patch)
tree2af3e9a582675917d9eaeec6629eaa33542a9990
parent1cd18f5f0c0b9ebd06968ad473e60dcb577b1bb2 (diff)
edid-decode: add support for DisplayID Adaptive Sync DBHEADmaster
Support this new DisplayID v2 data block. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--edid-decode.h1
-rw-r--r--parse-displayid-block.cpp44
2 files changed, 45 insertions, 0 deletions
diff --git a/edid-decode.h b/edid-decode.h
index 612d22a..aef2bab 100644
--- a/edid-decode.h
+++ b/edid-decode.h
@@ -387,6 +387,7 @@ struct edid_state {
void parse_displayid_type_9_timing(const unsigned char *x);
void parse_displayid_dynamic_video_timings_range_limits(const unsigned char *x);
void parse_displayid_ContainerID(const unsigned char *x);
+ void parse_displayid_adaptive_sync(const unsigned char *x);
void parse_displayid_type_10_timing(const unsigned char *x, unsigned sz,
bool is_cta = false);
void preparse_displayid_block(const unsigned char *x);
diff --git a/parse-displayid-block.cpp b/parse-displayid-block.cpp
index 5c81294..e4c3bff 100644
--- a/parse-displayid-block.cpp
+++ b/parse-displayid-block.cpp
@@ -1368,6 +1368,48 @@ void edid_state::parse_displayid_ContainerID(const unsigned char *x)
}
}
+// tag 0x2b
+
+void edid_state::parse_displayid_adaptive_sync(const unsigned char *x)
+{
+ check_displayid_datablock_revision(x[1], 0x70);
+
+ unsigned size = 6 + ((x[1] >> 4) & 0x7);
+ unsigned len = x[2];
+ unsigned descriptor = 1;
+
+ x += 3;
+ if (len % size)
+ fail("DisplayID payload length %u is not a multiple of %u.\n", len, size);
+ while (len >= size) {
+ printf(" Descriptor #%u:\n", descriptor++);
+
+ printf(" %sNative Panel Range\n", (x[0] & 1) ? "" : "Non-");
+ unsigned v = (x[0] >> 2) & 3;
+ switch (v) {
+ case 0: printf(" Fixed Average V-Total\n"); break;
+ case 1: printf(" Fixed Average V-Total and Adaptive V-Total\n"); break;
+ default:
+ printf(" Reserved %u\n", v);
+ fail("Use of reserved value %u.\n", v);
+ break;
+ }
+ if (x[0] & 0x10)
+ printf(" Supports Seamless Transition\n");
+ if (x[0] & 0x02)
+ printf(" 'Max Single Frame Duration Increase' field value without jitter impact\n");
+ if (x[0] & 0x20)
+ printf(" 'Max Single Frame Duration Decrease' field value without jitter impact\n");
+ printf(" Max Duration Increase: %.2f ms\n", x[1] / 4.0);
+ printf(" Max Duration Decrease: %.2f ms\n", x[5] / 4.0);
+ printf(" Min Refresh Rate: %u Hz\n", x[2]);
+ printf(" Max Refresh Rate: %u Hz\n", 1 + x[3] + (x[4] & 3) * 256);
+
+ len -= size;
+ x += size;
+ }
+}
+
// tag 0x32
void edid_state::parse_displayid_type_10_timing(const unsigned char *x,
@@ -1687,6 +1729,7 @@ void edid_state::parse_displayid_block(const unsigned char *x)
case 0x27: data_block = "Stereo Display Interface Data Block (" + utohex(tag) + ")"; break;
case 0x28: data_block = "Tiled Display Topology Data Block (" + utohex(tag) + ")"; break;
case 0x29: data_block = "ContainerID Data Block"; break;
+ case 0x2b: data_block = "Adaptive Sync Data Block"; break;
case 0x32: data_block = "Video Timing Modes Type 10 - Formula-based Timings Data Block"; break;
// 0x2a .. 0x7d RESERVED for Additional VESA-defined Data Blocks
case 0x7e: // DisplayID 2.0
@@ -1862,6 +1905,7 @@ void edid_state::parse_displayid_block(const unsigned char *x)
case 0x27: parse_displayid_stereo_display_intf(x + offset); break;
case 0x28: parse_displayid_tiled_display_topology(x + offset, true); break;
case 0x29: parse_displayid_ContainerID(x + offset); break;
+ case 0x2b: parse_displayid_adaptive_sync(x + offset); break;
case 0x32: {
unsigned sz = 6 + ((x[offset + 1] & 0x70) >> 4);

Privacy Policy