display: Add color space metadata field

Add color space field in gralloc buffer metadata
for buffer producer to propogate color space
information to consumer.

This approach is more flexible in the sense
that gralloc doesn't need to depend on usage
flag to derive color space.

Change-Id: I89d5a85f84a6f36dca7c5fc754dc7eb19581169a
diff --git a/libqdutils/qdMetaData.cpp b/libqdutils/qdMetaData.cpp
index ecbf873..9920513 100644
--- a/libqdutils/qdMetaData.cpp
+++ b/libqdutils/qdMetaData.cpp
@@ -103,6 +103,9 @@
             }
         }
         break;
+        case UPDATE_COLOR_SPACE:
+            data->colorSpace = *((ColorSpace_t *)param);
+            break;
         default:
             ALOGE("Unknown paramType %d", paramType);
             break;
diff --git a/libqdutils/qdMetaData.h b/libqdutils/qdMetaData.h
index 4b6e678..b4f67da 100644
--- a/libqdutils/qdMetaData.h
+++ b/libqdutils/qdMetaData.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -45,6 +45,12 @@
     return indx;
 }
 
+typedef enum {
+    ITU_R_601,
+    ITU_R_601_FR,
+    ITU_R_709,
+} ColorSpace_t;
+
 struct HSICData_t {
     int32_t hue;
     float   saturation;
@@ -87,6 +93,7 @@
     int64_t timestamp;
     int32_t vfmDataBitMap;
     VfmData_t vfmData[MAX_VFM_DATA_COUNT];
+    ColorSpace_t colorSpace;
 };
 
 typedef enum {
@@ -99,6 +106,7 @@
     PP_PARAM_TIMESTAMP  = 0x0040,
     UPDATE_BUFFER_GEOMETRY = 0x0080,
     PP_PARAM_VFM_DATA   = 0x0100,
+    UPDATE_COLOR_SPACE = 0x0200,
 } DispParamType;
 
 int setMetaData(private_handle_t *handle, DispParamType paramType, void *param);