summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlinpeter <linpeter@google.com>2021-07-01 23:24:15 +0800
committerPeter Lin <linpeter@google.com>2021-08-09 08:22:08 +0000
commit96cc67568493e9ab2087e1878facc622534f02e9 (patch)
treec8f3576bedb431de57b88270d18903b9dcc4b9bf
parent33ed3676bd20d3a6ab6e862a4fd39f28d9f72ece (diff)
downloadgs101-96cc67568493e9ab2087e1878facc622534f02e9.tar.gz
hwc/gs101: set enhanced hbm when LBE HBM mode
Bug: 177144573 test: check IRC OFF when LBE HBM mode Change-Id: I4d00fffaba7fd7093b60e9341ded99ab2b9c0553
-rw-r--r--libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp
index 4f3ea81..a05ac07 100644
--- a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp
+++ b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp
@@ -917,6 +917,7 @@ int32_t ExynosPrimaryDisplayModule::setAtcMode(std::string mode_name) {
void ExynosPrimaryDisplayModule::setLbeState(LbeState state) {
if (!mAtcInit) return;
std::string modeStr;
+ bool enhanced_hbm = false;
switch (state) {
case LbeState::OFF:
mCurrentLux = 0;
@@ -926,6 +927,7 @@ void ExynosPrimaryDisplayModule::setLbeState(LbeState state) {
break;
case LbeState::HIGH_BRIGHTNESS:
modeStr = kAtcModeHbmStr;
+ enhanced_hbm = true;
break;
case LbeState::POWER_SAVE:
modeStr = kAtcModePowerSaveStr;
@@ -937,6 +939,9 @@ void ExynosPrimaryDisplayModule::setLbeState(LbeState state) {
if (setAtcMode(modeStr) != NO_ERROR) return;
+ requestEnhancedHbm(enhanced_hbm);
+ mDisplayInterface->updateBrightness(false);
+
if (mCurrentLbeState != state) {
mCurrentLbeState = state;
mDevice->invalidate();