diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2020-08-18 06:23:29 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2020-08-18 06:23:29 -0700 |
commit | 2fad93ded98ef54fa404ccce3cf5f56ac73389be (patch) | |
tree | d9ae975a3f96a94414223659b54ab7c2423699d1 | |
parent | fd1029e363a15e222767d6ff0815c5e939839a0c (diff) | |
parent | f959227768a96750b12b287f7e845ea093978aa5 (diff) |
Merge "sdm: Fix avg luminance value for built-in displays" into display.lnx.5.1.r2-rel
-rw-r--r-- | sdm/libs/core/drm/hw_device_drm.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sdm/libs/core/drm/hw_device_drm.cpp b/sdm/libs/core/drm/hw_device_drm.cpp index 007cb2a9..da5c2710 100644 --- a/sdm/libs/core/drm/hw_device_drm.cpp +++ b/sdm/libs/core/drm/hw_device_drm.cpp @@ -706,6 +706,9 @@ void HWDeviceDRM::PopulateHWPanelInfo() { // Convert the luminance values to cd/m^2 units. hw_panel_info_.peak_luminance = FLOAT(connector_info_.panel_hdr_prop.peak_brightness) / 10000.0f; hw_panel_info_.blackness_level = FLOAT(connector_info_.panel_hdr_prop.blackness_level) / 10000.0f; + hw_panel_info_.average_luminance = FLOAT(connector_info_.panel_hdr_prop.peak_brightness + + connector_info_.panel_hdr_prop.blackness_level) / + (2 * 10000.0f); hw_panel_info_.primaries.white_point[0] = connector_info_.panel_hdr_prop.display_primaries[0]; hw_panel_info_.primaries.white_point[1] = connector_info_.panel_hdr_prop.display_primaries[1]; hw_panel_info_.primaries.red[0] = connector_info_.panel_hdr_prop.display_primaries[2]; |