sm6375-common: power-libperfmgr: ADPF: make uclamp.min stable
Considering the previous uclamp.min value is the base of PID output. Instead of: `next_min = std::min(sUclampMinHighLimit, output);` We should use: `next_min = std::min(sUclampMinHighLimit, current_min + output);` When session status entered stale state, set the uclamp to 0, but keep the current_min. That would be helpful for boosting the heavy workload of the first few frames. Bug: 204444691 Test: build && manual test Change-Id: Idb19e2bfd8e9522fae5fd452b1fcc58786e96e65
This commit is contained in:
parent
473d400819
commit
c69f1e93fa
2 changed files with 66 additions and 59 deletions
|
|
@ -59,6 +59,7 @@ struct AppHintDesc {
|
|||
const std::vector<int> threadIds;
|
||||
nanoseconds duration;
|
||||
int current_min;
|
||||
int transitioanl_min;
|
||||
// status
|
||||
std::atomic<bool> is_active;
|
||||
// pid
|
||||
|
|
@ -81,6 +82,7 @@ class PowerHintSession : public BnPowerHintSession {
|
|||
bool isActive();
|
||||
bool isStale();
|
||||
const std::vector<int> &getTidList() const;
|
||||
int restoreUclamp();
|
||||
|
||||
private:
|
||||
class StaleHandler : public MessageHandler {
|
||||
|
|
@ -106,7 +108,7 @@ class PowerHintSession : public BnPowerHintSession {
|
|||
private:
|
||||
void setStale();
|
||||
void updateUniveralBoostMode();
|
||||
int setUclamp(int32_t min, int32_t max = kMaxUclampValue);
|
||||
int setUclamp(int32_t min, bool update = true);
|
||||
std::string getIdString() const;
|
||||
AppHintDesc *mDescriptor = nullptr;
|
||||
sp<StaleHandler> mStaleHandler;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue