diff options
author | Ch Ganesh Kumar <chganesh@codeaurora.org> | 2018-04-05 17:52:17 +0530 |
---|---|---|
committer | Gurpreet Singh Dhami <gdhami@codeaurora.org> | 2018-05-08 18:06:56 -0400 |
commit | 670b4e577ca2984196c3ba6198ec2f70340bab6b (patch) | |
tree | 17cf9706779a5b17573d7b8d526cf3a594756dc0 /sdm | |
parent | f125251d7d8d1e849cbbdb996f2c7eb4f07376f3 (diff) | |
download | android_hardware_qcom_sdm710_display-670b4e577ca2984196c3ba6198ec2f70340bab6b.tar.gz android_hardware_qcom_sdm710_display-670b4e577ca2984196c3ba6198ec2f70340bab6b.tar.bz2 android_hardware_qcom_sdm710_display-670b4e577ca2984196c3ba6198ec2f70340bab6b.zip |
sdm: Update vendor HDR capability logic
HDR support capabilities were populated to SF, when panel and target
supports HDR. At SF, HDR layer is forced to GPU composition with new
HDR solution, if vendor does not support HDR. This change will populate
marking HDR support to true (for all display types) when primary panel
is internal.
Change-Id: I8305ae672cf8a721abf25ce026f21dbcbbb17928
Diffstat (limited to 'sdm')
-rw-r--r-- | sdm/libs/core/display_base.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sdm/libs/core/display_base.cpp b/sdm/libs/core/display_base.cpp index a50dd944..22aff56f 100644 --- a/sdm/libs/core/display_base.cpp +++ b/sdm/libs/core/display_base.cpp @@ -401,8 +401,14 @@ DisplayError DisplayBase::GetConfig(DisplayConfigFixedInfo *fixed_info) { HWResourceInfo hw_resource_info = HWResourceInfo(); hw_info_intf_->GetHWResourceInfo(&hw_resource_info); - // hdr can be supported by display when target and panel supports HDR. - fixed_info->hdr_supported = (hw_resource_info.has_hdr && hw_panel_info_.hdr_enabled); + bool hdr_supported = hw_resource_info.has_hdr; + HWDisplayInterfaceInfo hw_disp_info = {}; + hw_info_intf_->GetFirstDisplayInterfaceType(&hw_disp_info); + if (hw_disp_info.type == kHDMI) { + hdr_supported = (hdr_supported && hw_panel_info_.hdr_enabled); + } + + fixed_info->hdr_supported = hdr_supported; // Populate luminance values only if hdr will be supported on that display fixed_info->max_luminance = fixed_info->hdr_supported ? hw_panel_info_.peak_luminance: 0; fixed_info->average_luminance = fixed_info->hdr_supported ? hw_panel_info_.average_luminance : 0; |