hwc2: Add HLG cap in the HDR capabilities
Add HAL_HDR_HLG in the HDR Capabilities of HWC device implementation.
CRs-Fixed: 2209117
Change-Id: I64ea9c5f4dfe3f1eb8176906016242acbb2251e8
diff --git a/sdm/libs/hwc2/hwc_display.cpp b/sdm/libs/hwc2/hwc_display.cpp
index 39daa13..a296b03 100644
--- a/sdm/libs/hwc2/hwc_display.cpp
+++ b/sdm/libs/hwc2/hwc_display.cpp
@@ -1232,11 +1232,12 @@
}
if (out_types == nullptr) {
- // 1(now) - because we support only HDR10, change when HLG & DOLBY vision are supported
- *out_num_types = 1;
+ // We support HDR10 and HLG
+ *out_num_types = 2;
} else {
- // Only HDR10 supported
- *out_types = HAL_HDR_HDR10;
+ // HDR10 and HLG are supported
+ out_types[0] = HAL_HDR_HDR10;
+ out_types[1] = HAL_HDR_HLG;
static const float kLuminanceFactor = 10000.0;
// luminance is expressed in the unit of 0.0001 cd/m2, convert it to 1cd/m2.
*out_max_luminance = FLOAT(fixed_info.max_luminance)/kLuminanceFactor;