sm6375-common: power-libperfmgr: Remove wakeup behavior from PowerHintSession and PowerSessionManager

Currently, all sessions get boosted any time DISPLAY_UPDATE_IMMINENT is
sent from SurfaceFlinger which can lead to large, unnecessary boosts.
This patch aims to change that by removing the wakeup behavior, relying
instead on sessions to boost themselves with new load change hints.

 * Remove wakeup() from PowerHintSession
 * Remove wakeSessions from PowerSessionManager
 * Remove related timers and message handlers
 * Remove DISPLAY_UPDATE_IMMINENT behavior entirely

Test: manual
Bug: b/260136431
Change-Id: I4610edfefe8fcbef7d4cdbf5768830a9392a54f7
This commit is contained in:
Matt Buckley 2024-07-18 20:16:00 +05:30 committed by Anand S
commit c0f264b813
No known key found for this signature in database
GPG key ID: 3B2983FA448B3D61
4 changed files with 1 additions and 75 deletions

View file

@ -376,33 +376,6 @@ void PowerHintSession::setStale() {
}
}
void PowerHintSession::wakeup() {
std::lock_guard<std::mutex> guard(mSessionLock);
// 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)", mIdString.c_str(), isActive(), isTimeout());
ATRACE_NAME(tag.c_str());
}
std::shared_ptr<AdpfConfig> adpfConfig = HintManager::GetInstance()->GetAdpfProfile();
mDescriptor->current_min =
std::max(mDescriptor->current_min, static_cast<int>(adpfConfig->mUclampMinInit));
if (ATRACE_ENABLED()) {
traceSessionVal("min", mDescriptor->current_min);
}
}
void PowerHintSession::StaleTimerHandler::updateTimer() {
auto now = std::chrono::steady_clock::now();
nanoseconds staleDuration = std::chrono::nanoseconds(