sm6375-common: power-libperfmgr: add PowerHintSession for ADPF implementation
Adapted from PoC from ag/13100800
Added more ATRACE for further tuning and debug
Test: APPPID=$(adb shell pidof com.prefabulated.touchlatency); watch -n
1 adb shell grep uclamp /proc/${APPPID}/sched
Test: atest VtsHalPowerTargetTest
Bug: 177492680
Change-Id: I6bfd61b21dc1cde04f6ba9ae8d3533cd263ad814
Signed-off-by: Wei Wang <wvw@google.com>
This commit is contained in:
parent
1f8a6a10d6
commit
89c05aa49a
6 changed files with 55 additions and 10 deletions
|
|
@ -33,6 +33,7 @@ namespace impl {
|
|||
namespace pixel {
|
||||
|
||||
using ::aidl::android::hardware::power::Boost;
|
||||
using ::aidl::android::hardware::power::IPowerHintSession;
|
||||
using ::aidl::android::hardware::power::Mode;
|
||||
using ::android::perfmgr::HintManager;
|
||||
|
||||
|
|
@ -43,12 +44,18 @@ class Power : public ::aidl::android::hardware::power::BnPower {
|
|||
ndk::ScopedAStatus isModeSupported(Mode type, bool *_aidl_return) override;
|
||||
ndk::ScopedAStatus setBoost(Boost type, int32_t durationMs) override;
|
||||
ndk::ScopedAStatus isBoostSupported(Boost type, bool *_aidl_return) override;
|
||||
ndk::ScopedAStatus createHintSession(int32_t tgid, int32_t uid,
|
||||
const std::vector<int32_t> &threadIds,
|
||||
int64_t durationNanos,
|
||||
std::shared_ptr<IPowerHintSession> *_aidl_return) override;
|
||||
ndk::ScopedAStatus getHintSessionPreferredRate(int64_t *outNanoseconds) override;
|
||||
binder_status_t dump(int fd, const char **args, uint32_t numArgs) override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<HintManager> mHintManager;
|
||||
std::unique_ptr<InteractionHandler> mInteractionHandler;
|
||||
std::atomic<bool> mSustainedPerfModeOn;
|
||||
const int64_t mAdpfRate;
|
||||
};
|
||||
|
||||
} // namespace pixel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue