drm_hwcomposer: Add support for color encoding and range properties
Starting from the linux-v4.17, the DRM module has support for different
non-RGB color encodings that are controlled through plane-specific
COLOR_ENCODING and COLOR_RANGE properties.
This patch creates a matching between the HWC layer dataspace which is
supported by DRM driver and DRM plane properties.
Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
diff --git a/DrmHwcTwo.cpp b/DrmHwcTwo.cpp
index 93b6fa7..b5b460e 100644
--- a/DrmHwcTwo.cpp
+++ b/DrmHwcTwo.cpp
@@ -1099,6 +1099,7 @@
layer->alpha = static_cast<uint16_t>(65535.0f * alpha_ + 0.5f);
layer->SetSourceCrop(source_crop_);
layer->SetTransform(static_cast<int32_t>(transform_));
+ layer->dataspace = dataspace_;
}
void DrmHwcTwo::HandleDisplayHotplug(hwc2_display_t displayid, int state) {