summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-03-10 00:21:28 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-03-10 00:21:28 +0000
commite8a0404d3ea479b9b348ba4e3c6c3744b19143ba (patch)
tree85ef61b8ca0f2554940f5d983515e83f86bcfff1
parent57f67d6315ec21c5a2f3f57c708585360d8fa133 (diff)
parent24c3aff6d08b1acc3871b65ec339637c3b137493 (diff)
downloadpixel-android13-qpr3-s11-release.tar.gz
Change-Id: Ie9d3c5c330b2e7eed6ceda5e810d248ca350606b
-rw-r--r--thermal/utils/thermal_throttling.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/thermal/utils/thermal_throttling.cpp b/thermal/utils/thermal_throttling.cpp
index 0a5f926b..b2fd9d26 100644
--- a/thermal/utils/thermal_throttling.cpp
+++ b/thermal/utils/thermal_throttling.cpp
@@ -427,7 +427,7 @@ bool ThermalThrottling::allocatePowerToCdev(
if (binded_cdev_info_pair.second.max_release_step !=
std::numeric_limits<int>::max() &&
- cdev_power_adjustment > 0) {
+ (power_data_invalid || cdev_power_adjustment > 0)) {
auto target_state =
std::max(curr_state - binded_cdev_info_pair.second.max_release_step, 0);
cdev_power_budget =
@@ -436,7 +436,7 @@ bool ThermalThrottling::allocatePowerToCdev(
if (binded_cdev_info_pair.second.max_throttle_step !=
std::numeric_limits<int>::max() &&
- cdev_power_adjustment < 0) {
+ (power_data_invalid || cdev_power_adjustment < 0)) {
auto target_state =
std::min(curr_state + binded_cdev_info_pair.second.max_throttle_step,
cdev_info.max_state);