power-libperfmgr: ADPF: extend non-stale session timer in wakeup
For DISPLAY_UPDATE_IMMINENT wakeup signal, non-stale session's timer should be also extended. This resolves the performance issue caused those sessions to go stale prematurely. Bug: 241621485 Test: Build Signed-off-by: Wei Wang <wvw@google.com> Change-Id: I06330e064060248bb556ae35e0cb8fd302cef231
This commit is contained in:
parent
9cbf7b03e3
commit
dada1040af
@ -410,9 +410,16 @@ void PowerHintSession::setStale() {
|
||||
void PowerHintSession::wakeup() {
|
||||
std::lock_guard<std::mutex> guard(mSessionLock);
|
||||
|
||||
// We only wake up non-paused and stale sessions
|
||||
if (mSessionClosed || !isActive() || !isTimeout())
|
||||
// We only wake up non-paused session
|
||||
if (mSessionClosed || !isActive()) {
|
||||
return;
|
||||
}
|
||||
// Update session's timer
|
||||
mStaleTimerHandler->updateTimer();
|
||||
// Skip uclamp update for stale session
|
||||
if (!isTimeout()) {
|
||||
return;
|
||||
}
|
||||
if (ATRACE_ENABLED()) {
|
||||
std::string tag = StringPrintf("wakeup.%s(a:%d,s:%d)", getIdString().c_str(), isActive(),
|
||||
isTimeout());
|
||||
@ -422,7 +429,6 @@ void PowerHintSession::wakeup() {
|
||||
int min = std::max(mDescriptor->current_min, static_cast<int>(adpfConfig->mUclampMinInit));
|
||||
mDescriptor->current_min = min;
|
||||
PowerSessionManager::getInstance()->setUclampMinLocked(this, min);
|
||||
mStaleTimerHandler->updateTimer();
|
||||
|
||||
if (ATRACE_ENABLED()) {
|
||||
const std::string idstr = getIdString();
|
||||
|
Loading…
Reference in New Issue
Block a user