diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2023-03-09 03:40:39 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2023-03-09 03:40:39 +0000 |
commit | 24c3aff6d08b1acc3871b65ec339637c3b137493 (patch) | |
tree | 85ef61b8ca0f2554940f5d983515e83f86bcfff1 | |
parent | 292ee1512472018c49f479a964e080c98b888bf0 (diff) | |
parent | 60838fc7a637c497067def75e04e84c681858eb7 (diff) |
Merge "thermal: Fix throttle/release step bypass issue" into tm-qpr-dev
-rw-r--r-- | thermal/utils/thermal_throttling.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/thermal/utils/thermal_throttling.cpp b/thermal/utils/thermal_throttling.cpp index 0a5f926..b2fd9d2 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); |