sm6375-common: power-libperfmgr: Adpf: set uclamp when session is created
When seesion is created, set uclamp to boost CPU for top-app. Bug: 192143316 Test: Build and run UiBenchSlowNestedRecyclerViewInitialFlingMicrobenchmark test Change-Id: I748037019fae439ab1863a5ed21aa98b9d26e0dc
This commit is contained in:
parent
5bd1d34db3
commit
31357f2e25
1 changed files with 4 additions and 0 deletions
|
@ -136,6 +136,8 @@ PowerHintSession::PowerHintSession(int32_t tgid, int32_t uid, const std::vector<
|
||||||
ATRACE_INT(sz.c_str(), mDescriptor->is_active.load());
|
ATRACE_INT(sz.c_str(), mDescriptor->is_active.load());
|
||||||
}
|
}
|
||||||
PowerSessionManager::getInstance()->addPowerSession(this);
|
PowerSessionManager::getInstance()->addPowerSession(this);
|
||||||
|
// init boost
|
||||||
|
setUclamp(sUclampCap, 1024);
|
||||||
ALOGV("PowerHintSession created: %s", mDescriptor->toString().c_str());
|
ALOGV("PowerHintSession created: %s", mDescriptor->toString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,6 +214,8 @@ ndk::ScopedAStatus PowerHintSession::resume() {
|
||||||
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
|
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE);
|
||||||
mDescriptor->is_active.store(true);
|
mDescriptor->is_active.store(true);
|
||||||
mDescriptor->integral_error = std::max(sPidIInit, mDescriptor->integral_error);
|
mDescriptor->integral_error = std::max(sPidIInit, mDescriptor->integral_error);
|
||||||
|
// resume boost
|
||||||
|
setUclamp(sUclampCap, 1024);
|
||||||
if (ATRACE_ENABLED()) {
|
if (ATRACE_ENABLED()) {
|
||||||
const std::string idstr = getIdString();
|
const std::string idstr = getIdString();
|
||||||
std::string sz = StringPrintf("adpf.%s-active", idstr.c_str());
|
std::string sz = StringPrintf("adpf.%s-active", idstr.c_str());
|
||||||
|
|
Loading…
Reference in a new issue