diff options
author | Arun Kumar K.R <akumarkr@codeaurora.org> | 2018-04-04 10:45:58 +0530 |
---|---|---|
committer | Arun Kumar K.R <akumarkr@codeaurora.org> | 2018-04-05 08:08:04 +0530 |
commit | 057462200343d4329a8e66425910648c8b373f15 (patch) | |
tree | 7a93befac76e5d4d49b85822c4e334dcccd03f53 /sdm/libs/hwc2/hwc_layers.cpp | |
parent | 28ace6a9f1287cbe7ffaab6be3ab842272a0ada2 (diff) |
display: Set and handle default csc as BT709
- Some clients don't set the csc for a layer and as a result
HWC will error out. Avoid this by setting the default csc as
BT709 in gralloc for RGB buffers.
- HWC will default to BT709 if clients have not set.
Change-Id: I6f2e0f5bf39d0e06450d50f9c7da6857aaff8b8f
Crs-fixed: 2218048
Diffstat (limited to 'sdm/libs/hwc2/hwc_layers.cpp')
-rw-r--r-- | sdm/libs/hwc2/hwc_layers.cpp | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/sdm/libs/hwc2/hwc_layers.cpp b/sdm/libs/hwc2/hwc_layers.cpp index 96e74990..070f2359 100644 --- a/sdm/libs/hwc2/hwc_layers.cpp +++ b/sdm/libs/hwc2/hwc_layers.cpp @@ -41,24 +41,22 @@ DisplayError SetCSC(const private_handle_t *pvt_handle, ColorMetaData *color_met } switch (csc) { - case ITU_R_601: - case ITU_R_601_FR: - // video and display driver uses 601_525 - color_metadata->colorPrimaries = ColorPrimaries_BT601_6_525; - break; - case ITU_R_709: - color_metadata->colorPrimaries = ColorPrimaries_BT709_5; - break; - case ITU_R_2020: - case ITU_R_2020_FR: - color_metadata->colorPrimaries = ColorPrimaries_BT2020; - break; - default: - DLOGE("Unsupported CSC: %d", csc); - return kErrorNotSupported; + case ITU_R_601: + case ITU_R_601_FR: + // video and display driver uses 601_525 + color_metadata->colorPrimaries = ColorPrimaries_BT601_6_525; + break; + case ITU_R_709: + color_metadata->colorPrimaries = ColorPrimaries_BT709_5; + break; + case ITU_R_2020: + case ITU_R_2020_FR: + color_metadata->colorPrimaries = ColorPrimaries_BT2020; + break; + default: + DLOGE("Unsupported CSC: %d", csc); + return kErrorNotSupported; } - } else { - return kErrorNotSupported; } } |