sm6375-common: power-libperfmgr: allow powerhint calls as soon as service starts

Bug: 147840817
Test: boot
Change-Id: Ic1d6e04109683b999bb99484930e95dc9813fc59
This commit is contained in:
Wei Wang 2024-07-18 12:56:42 +05:30 committed by Anand S
commit 0d151b245f
No known key found for this signature in database
GPG key ID: 3B2983FA448B3D61
5 changed files with 23 additions and 53 deletions

View file

@ -38,16 +38,7 @@ namespace extension {
namespace power {
namespace impl {
void PowerExt::setReady() {
// Now start to take powerhint
mReady.store(true);
ALOGI("PowerHAL extension ready to process hints");
}
ndk::ScopedAStatus PowerExt::setMode(const std::string &mode, bool enabled) {
if (!mReady) {
return ndk::ScopedAStatus::ok();
}
LOG(DEBUG) << "PowerExt setMode: " << mode << " to: " << enabled;
ATRACE_INT(mode.c_str(), enabled);
@ -68,9 +59,6 @@ ndk::ScopedAStatus PowerExt::isModeSupported(const std::string &mode, bool *_aid
}
ndk::ScopedAStatus PowerExt::setBoost(const std::string &boost, int32_t durationMs) {
if (!mReady) {
return ndk::ScopedAStatus::ok();
}
LOG(DEBUG) << "PowerExt setBoost: " << boost << " duration: " << durationMs;
ATRACE_INT(boost.c_str(), durationMs);