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:
parent
9e3f57229d
commit
caedda6122
4 changed files with 1 additions and 75 deletions
|
|
@ -62,14 +62,6 @@ class PowerSessionManager : public MessageHandler {
|
|||
}
|
||||
|
||||
private:
|
||||
class WakeupHandler : public MessageHandler {
|
||||
public:
|
||||
WakeupHandler() {}
|
||||
void handleMessage(const Message &message) override;
|
||||
};
|
||||
|
||||
private:
|
||||
void wakeSessions();
|
||||
std::optional<bool> isAnyAppSessionActive();
|
||||
void disableSystemTopAppBoost();
|
||||
void enableSystemTopAppBoost();
|
||||
|
|
@ -78,7 +70,6 @@ class PowerSessionManager : public MessageHandler {
|
|||
std::unordered_set<PowerHintSession *> mSessions; // protected by mLock
|
||||
std::unordered_map<int, int> mTidRefCountMap; // protected by mLock
|
||||
std::unordered_map<int, std::unordered_set<PowerHintSession *>> mTidSessionListMap;
|
||||
sp<WakeupHandler> mWakeupHandler;
|
||||
bool mActive; // protected by mLock
|
||||
/**
|
||||
* mLock to pretect the above data objects opertions.
|
||||
|
|
@ -90,9 +81,7 @@ class PowerSessionManager : public MessageHandler {
|
|||
: kDisableBoostHintName(::android::base::GetProperty(kPowerHalAdpfDisableTopAppBoost,
|
||||
"ADPF_DISABLE_TA_BOOST")),
|
||||
mActive(false),
|
||||
mDisplayRefreshRate(60) {
|
||||
mWakeupHandler = sp<WakeupHandler>(new WakeupHandler());
|
||||
}
|
||||
mDisplayRefreshRate(60) {}
|
||||
PowerSessionManager(PowerSessionManager const &) = delete;
|
||||
void operator=(PowerSessionManager const &) = delete;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue