sm6375-common: power-libperfmgr: ADPF: uclamp.min integration
Integrate the uclamp.min across sessions. Add UClampMininit as the display update boost Bug: 232313238 Test: Manual test Change-Id: I601f407b0b5383a1e39eac448d45cbaaeb7788fb
This commit is contained in:
parent
7fc85e9871
commit
f032fe2747
6 changed files with 160 additions and 75 deletions
|
|
@ -45,10 +45,13 @@ class PowerSessionManager : public MessageHandler {
|
|||
public:
|
||||
// current hint info
|
||||
void updateHintMode(const std::string &mode, bool enabled);
|
||||
void updateHintBoost(const std::string &boost, int32_t durationMs);
|
||||
int getDisplayRefreshRate();
|
||||
// monitoring session status
|
||||
void addPowerSession(PowerHintSession *session);
|
||||
void removePowerSession(PowerHintSession *session);
|
||||
void setUclampMin(PowerHintSession *session, int min);
|
||||
void setUclampMinLocked(PowerHintSession *session, int min);
|
||||
|
||||
void handleMessage(const Message &message) override;
|
||||
|
||||
|
|
@ -59,21 +62,27 @@ class PowerSessionManager : public MessageHandler {
|
|||
}
|
||||
|
||||
private:
|
||||
void wakeSessions();
|
||||
std::optional<bool> isAnyAppSessionActive();
|
||||
void disableSystemTopAppBoost();
|
||||
void enableSystemTopAppBoost();
|
||||
const std::string kDisableBoostHintName;
|
||||
|
||||
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;
|
||||
bool mActive; // protected by mLock
|
||||
/**
|
||||
* mLock to pretect the above data objects opertions.
|
||||
**/
|
||||
std::mutex mLock;
|
||||
int mDisplayRefreshRate;
|
||||
bool mActive; // protected by mLock
|
||||
// Singleton
|
||||
PowerSessionManager()
|
||||
: kDisableBoostHintName(::android::base::GetProperty(kPowerHalAdpfDisableTopAppBoost,
|
||||
"ADPF_DISABLE_TA_BOOST")),
|
||||
mDisplayRefreshRate(60),
|
||||
mActive(false) {}
|
||||
mActive(false),
|
||||
mDisplayRefreshRate(60) {}
|
||||
PowerSessionManager(PowerSessionManager const &) = delete;
|
||||
void operator=(PowerSessionManager const &) = delete;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue