From 970e351c763ba412e5d5f526835ee622bc65d93c Mon Sep 17 00:00:00 2001 From: Sushil Chauhan Date: Mon, 19 Mar 2018 11:19:27 -0700 Subject: [PATCH] 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 --- sdm/libs/hwc2/hwc_display.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sdm/libs/hwc2/hwc_display.cpp b/sdm/libs/hwc2/hwc_display.cpp index 39daa13a..a296b039 100644 --- a/sdm/libs/hwc2/hwc_display.cpp +++ b/sdm/libs/hwc2/hwc_display.cpp @@ -1232,11 +1232,12 @@ HWC2::Error HWCDisplay::GetHdrCapabilities(uint32_t *out_num_types, int32_t *out } 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;