diff options
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2023-05-03 13:51:09 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2023-05-03 13:51:09 +0000 |
commit | 6d177968f750cb3635c686eb631adb18fa2021a5 (patch) | |
tree | dc80cb986e0217f47fd183975151e6834f6897c3 | |
parent | 8689a8a2da2c7ee31a9da52d8555c6afb365db4d (diff) | |
parent | 1abbf939c3f289ec65a30036fb09c81f12d63f59 (diff) | |
download | zuma-6d177968f750cb3635c686eb631adb18fa2021a5.tar.gz |
Merge "libhwc2.1: OperationRateManager: correct HS switching condition" into udc-d1-dev
-rw-r--r-- | libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp index 48e8654..f036c45 100644 --- a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp +++ b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp @@ -170,7 +170,7 @@ int32_t ExynosPrimaryDisplayModule::OperationRateManager::updateOperationRateLoc desiredOpRate = mDisplayNsOperationRate; } // check blocking zone - if (mDisplayLastDbv < mDisplayNsMinDbv || dbv < mDisplayNsMinDbv) { + if (dbv < mDisplayNsMinDbv) { desiredOpRate = mDisplayHsOperationRate; } @@ -195,7 +195,9 @@ int32_t ExynosPrimaryDisplayModule::OperationRateManager::updateOperationRateLoc } else if (cond == DispOpCondition::SET_DBV) { // TODO: tune brightness delta for different brightness curve and values int32_t delta = abs(dbv - mDisplayLastDbv); - if (delta > BRIGHTNESS_DELTA_THRESHOLD) effectiveOpRate = desiredOpRate; + if ((desiredOpRate == mDisplayHsOperationRate) || (delta > BRIGHTNESS_DELTA_THRESHOLD)) { + effectiveOpRate = desiredOpRate; + } mDisplayLastDbv = dbv; if (effectiveOpRate > LP_OP_RATE && (effectiveOpRate != mDisplayActiveOperationRate)) { OP_MANAGER_LOGD("brightness delta=%d", delta); @@ -204,8 +206,8 @@ int32_t ExynosPrimaryDisplayModule::OperationRateManager::updateOperationRateLoc } } - if (!mDisplay->isConfigSettingEnabled()) { - OP_MANAGER_LOGI("rate switching is disabled, skip op rate update"); + if (!mDisplay->isConfigSettingEnabled() && effectiveOpRate == mDisplayNsOperationRate) { + OP_MANAGER_LOGI("rate switching is disabled, skip NS op rate update"); return ret; } else if (effectiveOpRate > LP_OP_RATE) { ret = setOperationRate(effectiveOpRate); |