summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2023-05-03 13:51:09 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2023-05-03 13:51:09 +0000
commit6d177968f750cb3635c686eb631adb18fa2021a5 (patch)
treedc80cb986e0217f47fd183975151e6834f6897c3
parent8689a8a2da2c7ee31a9da52d8555c6afb365db4d (diff)
parent1abbf939c3f289ec65a30036fb09c81f12d63f59 (diff)
downloadzuma-6d177968f750cb3635c686eb631adb18fa2021a5.tar.gz
Merge "libhwc2.1: OperationRateManager: correct HS switching condition" into udc-d1-dev
-rw-r--r--libhwc2.1/libmaindisplay/ExynosPrimaryDisplayModule.cpp10
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);