summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2023-05-03 14:31:50 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-05-03 14:31:50 +0000
commit43ed8abb852bdd565762ec1e679ba458159db542 (patch)
treedc80cb986e0217f47fd183975151e6834f6897c3
parent170e6a0725d7f163e6d263a88b23d01d4b6436f2 (diff)
parent6d177968f750cb3635c686eb631adb18fa2021a5 (diff)
downloadzuma-43ed8abb852bdd565762ec1e679ba458159db542.tar.gz
Merge "libhwc2.1: OperationRateManager: correct HS switching condition" into udc-d1-dev am: 6d177968f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/graphics/zuma/+/22922175 Change-Id: I7b7bb11347a2fbfc991975edd40a55e78e624819 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-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);