sm6375-common: power-libperfmgr: Fix uclamp_min stuck at high freq
Separate Stale and EarlyBoost handlers and refine the code. Test: adb shell dumpsys android.hardware.power.IPower/default Test: Manual Bug: 232992641 Change-Id: I81a4fd96fb7311ae5bbb7cbabe72378c9cad4aa3
This commit is contained in:
parent
00036d86cc
commit
620a6da869
3 changed files with 191 additions and 154 deletions
|
|
@ -162,12 +162,11 @@ void PowerSessionManager::setUclampMinLocked(PowerHintSession *session, int val)
|
|||
// Get thex max uclamp.min across sessions which include the tid.
|
||||
int tidMax = 0;
|
||||
for (PowerHintSession *s : mTidSessionListMap[t]) {
|
||||
if (!s->isActive() || s->isStale())
|
||||
if (!s->isActive() || s->isTimeout())
|
||||
continue;
|
||||
tidMax = std::max(tidMax, s->getUclampMin());
|
||||
}
|
||||
val = std::max(val, tidMax);
|
||||
set_uclamp_min(t, val);
|
||||
set_uclamp_min(t, std::max(val, tidMax));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -176,7 +175,7 @@ std::optional<bool> PowerSessionManager::isAnyAppSessionActive() {
|
|||
bool active = false;
|
||||
for (PowerHintSession *s : mSessions) {
|
||||
// session active and not stale is actually active.
|
||||
if (s->isActive() && !s->isStale() && s->isAppSession()) {
|
||||
if (s->isActive() && !s->isTimeout() && s->isAppSession()) {
|
||||
active = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue