sm6375-common: power-libperfmgr: ADPF: use PID algorithm to control cpu resource
The patch includes: 1. Move from folder adpf to aidl. 2. Add PowerSessionManager class to maintain hint status. And PowerHintMointor looper thread for monitoring or updating PowerHintSession status. 3. Use PID algorithm to replace the step-wise alogrithm for cpu resource control. Test: build, boot to home, trace analysis Bug: 177493042 Change-Id: Ib7d3f414225b18954350341ca22b7be87a6202e7
This commit is contained in:
parent
4ce47872f0
commit
4f6e93f30a
9 changed files with 809 additions and 4 deletions
|
|
@ -31,7 +31,8 @@
|
|||
#include <utils/Log.h>
|
||||
#include <utils/Trace.h>
|
||||
|
||||
#include "adpf/PowerHintSession.h"
|
||||
#include "PowerHintSession.h"
|
||||
#include "PowerSessionManager.h"
|
||||
|
||||
#define TAP_TO_WAKE_NODE "/sys/class/sensors/dt-gesture/enable"
|
||||
|
||||
|
|
@ -42,7 +43,7 @@ namespace power {
|
|||
namespace impl {
|
||||
namespace pixel {
|
||||
|
||||
using ::aidl::google::hardware::power::impl::pixel::adpf::PowerHintSession;
|
||||
using ::aidl::google::hardware::power::impl::pixel::PowerHintSession;
|
||||
|
||||
constexpr char kPowerHalStateProp[] = "vendor.powerhal.state";
|
||||
constexpr char kPowerHalAudioProp[] = "vendor.powerhal.audio";
|
||||
|
|
@ -86,6 +87,7 @@ Power::Power(std::shared_ptr<HintManager> hm)
|
|||
ndk::ScopedAStatus Power::setMode(Mode type, bool enabled) {
|
||||
LOG(DEBUG) << "Power setMode: " << toString(type) << " to: " << enabled;
|
||||
ATRACE_INT(toString(type).c_str(), enabled);
|
||||
PowerSessionManager::getInstance().updateHintMode(toString(type), enabled);
|
||||
switch (type) {
|
||||
#ifdef TAP_TO_WAKE_NODE
|
||||
case Mode::DOUBLE_TAP_TO_WAKE:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue