[PATCH edid-decode] Parse the list of additional 3D modes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Parse 2D_VIC_order_X and 3D_Structure_X from the list at the end of the
HDMI Vendor Specific Block.

Signed-off-by: Thomas Wood <thomas.wood@xxxxxxxxx>
---
 edid-decode.c | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/edid-decode.c b/edid-decode.c
index 4265843..8441dec 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,35 @@ 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: printf("side-by-side (half)"); break;
+					default: printf("unknown");
+				}
+				if ((x[9 + b] & 0x0f) > 7) {
+					/* XXX Optional 3D_Detail_X and reserved */
+					b++;
+				}
+				printf("\n");
+				b++;
+			}
+		}
+
 	    }
 
 	}
-- 
1.8.3.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux