sm6375-common: 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
fbcc05b19b
commit
de130faac2
1 changed files with 9 additions and 3 deletions
|
@ -410,9 +410,16 @@ void PowerHintSession::setStale() {
|
||||||
void PowerHintSession::wakeup() {
|
void PowerHintSession::wakeup() {
|
||||||
std::lock_guard<std::mutex> guard(mSessionLock);
|
std::lock_guard<std::mutex> guard(mSessionLock);
|
||||||
|
|
||||||
// We only wake up non-paused and stale sessions
|
// We only wake up non-paused session
|
||||||
if (mSessionClosed || !isActive() || !isTimeout())
|
if (mSessionClosed || !isActive()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
// Update session's timer
|
||||||
|
mStaleTimerHandler->updateTimer();
|
||||||
|
// Skip uclamp update for stale session
|
||||||
|
if (!isTimeout()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (ATRACE_ENABLED()) {
|
if (ATRACE_ENABLED()) {
|
||||||
std::string tag = StringPrintf("wakeup.%s(a:%d,s:%d)", getIdString().c_str(), isActive(),
|
std::string tag = StringPrintf("wakeup.%s(a:%d,s:%d)", getIdString().c_str(), isActive(),
|
||||||
isTimeout());
|
isTimeout());
|
||||||
|
@ -422,7 +429,6 @@ void PowerHintSession::wakeup() {
|
||||||
int min = std::max(mDescriptor->current_min, static_cast<int>(adpfConfig->mUclampMinInit));
|
int min = std::max(mDescriptor->current_min, static_cast<int>(adpfConfig->mUclampMinInit));
|
||||||
mDescriptor->current_min = min;
|
mDescriptor->current_min = min;
|
||||||
PowerSessionManager::getInstance()->setUclampMinLocked(this, min);
|
PowerSessionManager::getInstance()->setUclampMinLocked(this, min);
|
||||||
mStaleTimerHandler->updateTimer();
|
|
||||||
|
|
||||||
if (ATRACE_ENABLED()) {
|
if (ATRACE_ENABLED()) {
|
||||||
const std::string idstr = getIdString();
|
const std::string idstr = getIdString();
|
||||||
|
|
Loading…
Reference in a new issue