power: Add support for ADPF implementation.
ADPF provided the API for power/performance tuning. Add API support in power HAL. Change-Id: Ie00f97650b209a890da222e5911371a270efb131
This commit is contained in:
27
PowerHintSession.h
Normal file
27
PowerHintSession.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
|
||||
#ifndef __POWERHINTSESSION__
|
||||
#define __POWERHINTSESSION__
|
||||
|
||||
#include <aidl/android/hardware/power/WorkDuration.h>
|
||||
#include <aidl/android/hardware/power/SessionHint.h>
|
||||
#include <aidl/android/hardware/power/BnPowerHintSession.h>
|
||||
|
||||
std::shared_ptr<aidl::android::hardware::power::IPowerHintSession> setPowerHintSession();
|
||||
int64_t getSessionPreferredRate();
|
||||
|
||||
class PowerHintSessionImpl : public aidl::android::hardware::power::BnPowerHintSession{
|
||||
public:
|
||||
ndk::ScopedAStatus updateTargetWorkDuration(int64_t targetDurationNanos) override;
|
||||
ndk::ScopedAStatus reportActualWorkDuration(
|
||||
const std::vector<aidl::android::hardware::power::WorkDuration>& durations) override;
|
||||
ndk::ScopedAStatus pause() override;
|
||||
ndk::ScopedAStatus resume() override;
|
||||
ndk::ScopedAStatus close() override;
|
||||
ndk::ScopedAStatus sendHint(aidl::android::hardware::power::SessionHint hint) override;
|
||||
ndk::ScopedAStatus setThreads(const std::vector<int32_t>& threadIds) override;
|
||||
};
|
||||
#endif /* __POWERHINTSESSION__ */
|
||||
Reference in New Issue
Block a user