summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Wood <thomas.wood@intel.com>2013-11-27 15:59:02 +0000
committerDamien Lespiau <damien.lespiau@intel.com>2013-12-16 16:14:14 +0000
commitcfe8e568d1760803d8eb1c144660c7c5856c5b80 (patch)
tree923e14ef8c6c3b895d920ffa720d87f0b215c5d7
parenta01bb62107e2d76b5373b76077ec150eb341475d (diff)
Parse the list of additional 3D modes
Parse 2D_VIC_order_X and 3D_Structure_X from the list at the end of the HDMI Vendor Specific Block. v2: check 3D_Detail_X indicates horizontal sub-sampling in side-by-side (half) mode Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
-rw-r--r--edid-decode.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/edid-decode.c b/edid-decode.c
index 4265843..3f7e4da 100644
--- a/edid-decode.c
+++ b/edid-decode.c
@@ -851,6 +851,7 @@ cea_hdmi_block(unsigned char *x)
if (x[10 + b] & 0x01)
printf(" 3D: Frame-packing\n");
b += 2;
+ len_3d -= 2;
}
if (mask) {
int i;
@@ -864,14 +865,40 @@ cea_hdmi_block(unsigned char *x)
printf(" %d", i + 8);
printf("\n");
b += 2;
+ len_3d -= 2;
}
/*
- * XXX list of nibbles:
+ * list of nibbles:
* 2D_VIC_Order_X
* 3D_Structure_X
* (optionally: 3D_Detail_X and reserved)
*/
+ if (len_3d > 0) {
+ int end = b + len_3d;
+
+ while (b < end) {
+ printf(" VIC index %d supports ", x[9 + b] >> 4);
+ switch (x[9 + b] & 0x0f) {
+ case 0: printf("frame packing"); break;
+ case 6: printf("top-and-bottom"); break;
+ case 8:
+ if ((x[10 + b] >> 4) == 1) {
+ printf("side-by-side (half, horizontal)");
+ break;
+ }
+ default: printf("unknown");
+ }
+ printf("\n");
+
+ if ((x[9 + b] & 0x0f) > 7) {
+ /* Optional 3D_Detail_X and reserved */
+ b++;
+ }
+ b++;
+ }
+ }
+
}
}