summaryrefslogtreecommitdiff
path: root/include/powermanager/PowerHalController.h
diff options
context:
space:
mode:
author Matt Buckley <mattbuckley@google.com> 2023-12-21 20:00:32 +0000
committer Matt Buckley <mattbuckley@google.com> 2024-01-23 02:23:55 +0000
commitdb4192ada9dee591ec897a51c07c489c84c860c1 (patch)
tree6ac33f484d7adfa0bc26a9d1d18589e3b8a91d58 /include/powermanager/PowerHalController.h
parenta34d58ed8cdb4763576b42b0fa735ff1d92d46d1 (diff)
Add support for new PowerHAL methods to PowerHalWrapper
This patch adds FMQ support, createHintSessionWithConfig support, and refactors the class structure slightly to allow wrapper subclasses to share unsupported method logic with EmptyHalWrapper Bug: 317387260 Test: atest libpowermanager_test libsurfaceflinger_unittest libcompositionengine_test Change-Id: I53b67055b3ada4dc8576533a9b961ff5ec3367a5
Diffstat (limited to 'include/powermanager/PowerHalController.h')
-rw-r--r--include/powermanager/PowerHalController.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/powermanager/PowerHalController.h b/include/powermanager/PowerHalController.h
index 9e426d3ea3..c50bc4a188 100644
--- a/include/powermanager/PowerHalController.h
+++ b/include/powermanager/PowerHalController.h
@@ -62,7 +62,15 @@ public:
virtual HalResult<std::shared_ptr<aidl::android::hardware::power::IPowerHintSession>>
createHintSession(int32_t tgid, int32_t uid, const std::vector<int32_t>& threadIds,
int64_t durationNanos) override;
+ virtual HalResult<std::shared_ptr<aidl::android::hardware::power::IPowerHintSession>>
+ createHintSessionWithConfig(int32_t tgid, int32_t uid, const std::vector<int32_t>& threadIds,
+ int64_t durationNanos,
+ aidl::android::hardware::power::SessionTag tag,
+ aidl::android::hardware::power::SessionConfig* config) override;
virtual HalResult<int64_t> getHintSessionPreferredRate() override;
+ virtual HalResult<aidl::android::hardware::power::ChannelConfig> getSessionChannel(
+ int tgid, int uid) override;
+ virtual HalResult<void> closeSessionChannel(int tgid, int uid) override;
private:
std::mutex mConnectedHalMutex;
@@ -75,7 +83,7 @@ private:
std::shared_ptr<HalWrapper> initHal();
template <typename T>
- HalResult<T> processHalResult(HalResult<T> result, const char* functionName);
+ HalResult<T> processHalResult(HalResult<T>&& result, const char* functionName);
};
// -------------------------------------------------------------------------------------------------