drm_hwcomposer: Add getter/setter for Colorspace

Optionally, get the Colorspace drm property and populate an enum mapping
for the property types. Add implementation to HwcDisplay::SetColorMode
to set this property and map between HAL_COLOR_MODE types to Colorspace
formats.

Change-Id: Id532e94207c1b1a2623b7d77db239735df18b30f
Signed-off-by: Sasha McIntosh <sashamcintosh@google.com>
diff --git a/drm/DrmAtomicStateManager.cpp b/drm/DrmAtomicStateManager.cpp
index 32cc68e..bb26189 100644
--- a/drm/DrmAtomicStateManager.cpp
+++ b/drm/DrmAtomicStateManager.cpp
@@ -139,6 +139,12 @@
       return -EINVAL;
   }
 
+  if (args.colorspace && connector->GetColorspaceProperty()) {
+    if (!connector->GetColorspaceProperty()
+             .AtomicSet(*pset, connector->GetColorspacePropertyValue(*args.colorspace)))
+      return -EINVAL;
+  }
+
   if (args.content_type && connector->GetContentTypeProperty()) {
     if (!connector->GetContentTypeProperty().AtomicSet(*pset, *args.content_type))
       return -EINVAL;