From 31357f2e25201f324c4a018cb7439a4fbffce593 Mon Sep 17 00:00:00 2001 From: Jimmy Shiu Date: Thu, 18 Jul 2024 12:56:42 +0530 Subject: [PATCH] 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 --- power-libperfmgr/PowerHintSession.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/power-libperfmgr/PowerHintSession.cpp b/power-libperfmgr/PowerHintSession.cpp index 4d84353..7b398e8 100644 --- a/power-libperfmgr/PowerHintSession.cpp +++ b/power-libperfmgr/PowerHintSession.cpp @@ -136,6 +136,8 @@ PowerHintSession::PowerHintSession(int32_t tgid, int32_t uid, const std::vector< ATRACE_INT(sz.c_str(), mDescriptor->is_active.load()); } PowerSessionManager::getInstance()->addPowerSession(this); + // init boost + setUclamp(sUclampCap, 1024); ALOGV("PowerHintSession created: %s", mDescriptor->toString().c_str()); } @@ -212,6 +214,8 @@ ndk::ScopedAStatus PowerHintSession::resume() { return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE); mDescriptor->is_active.store(true); mDescriptor->integral_error = std::max(sPidIInit, mDescriptor->integral_error); + // resume boost + setUclamp(sUclampCap, 1024); if (ATRACE_ENABLED()) { const std::string idstr = getIdString(); std::string sz = StringPrintf("adpf.%s-active", idstr.c_str());