[PATCH 10/27] edid-decode: add Display Color Management support

Hans Verkuil hverkuil at xs4all.nl
Thu Aug 31 11:41:03 UTC 2017


From: Hans Verkuil <hans.verkuil at cisco.com>

Print the contents of the DCM definition.

Signed-off-by: Hans Verkuil <hans.verkuil at cisco.com>
---
 edid-decode.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/edid-decode.c b/edid-decode.c
index 3ea3cb78..e4d70e8e 100644
--- a/edid-decode.c
+++ b/edid-decode.c
@@ -366,8 +366,14 @@ detailed_block(unsigned char *x, int in_extension)
 	    return valid_cvt;
 	}
 	case 0xF9:
-	    /* TODO */
-	    printf("Color management data\n");
+	    printf("Color management data:\n");
+	    printf("  Version:  %d\n", x[5]);
+	    printf("  Red a3:   %.2f\n", (short)(x[6] | (x[7] << 8)) / 100.0);
+	    printf("  Red a2:   %.2f\n", (short)(x[8] | (x[9] << 8)) / 100.0);
+	    printf("  Green a3: %.2f\n", (short)(x[10] | (x[11] << 8)) / 100.0);
+	    printf("  Green a2: %.2f\n", (short)(x[12] | (x[13] << 8)) / 100.0);
+	    printf("  Blue a3:  %.2f\n", (short)(x[14] | (x[15] << 8)) / 100.0);
+	    printf("  Blue a2:  %.2f\n", (short)(x[16] | (x[17] << 8)) / 100.0);
 	    return 1;
 	case 0xFA:
 	    printf("More standard timings:\n");
-- 
2.14.1



More information about the xorg-devel mailing list