summaryrefslogtreecommitdiffstats
path: root/service.cpp
diff options
context:
space:
mode:
authordianlujitao <dianlujitao@lineageos.org>2018-01-18 21:24:30 +0800
committerMichael Bestas <mkbestas@lineageos.org>2019-10-23 01:12:57 +0300
commit19a43ccd9aa1db86585a01988d6f487df4e5793d (patch)
treeda3b7027379f64306582cffa7e24764f72d4bb5d /service.cpp
parent60d5a540eec686e78dfa03b6676fc926d96f58df (diff)
downloadvendor_qcom_opensource_power-19a43ccd9aa1db86585a01988d6f487df4e5793d.tar.gz
vendor_qcom_opensource_power-19a43ccd9aa1db86585a01988d6f487df4e5793d.tar.bz2
vendor_qcom_opensource_power-19a43ccd9aa1db86585a01988d6f487df4e5793d.zip
power: Prepare for power profile support
* Add support for system performance profiles and CPU boost. * Uses mpctl to configure the CPUs in the appropriate modes. * Implement binderized Lineage power HAL. Author: Steve Kondik <shade@chemlab.org> Date: Sat May 17 03:37:53 2014 -0700 power: Add support for CPU boost hint Change-Id: I07c3e8daf8a5f3b568e27334f26d4ba8f4cf40c4 Author: Steve Kondik <shade@chemlab.org> Date: Sun May 18 23:55:23 2014 -0700 power: Add power hint to set profile * A PowerHAL can implement support for this hint to receive power profile changes from the framework. Change-Id: Ie1e9e3b827c731cf5a817a0491677e3451fe8678 Author: Steve Kondik <shade@chemlab.org> Date: Mon May 19 17:26:34 2014 -0700 power: Add support for SET_PROFILE hints * Add support for system performance profiles. * Uses mpctl to configure the CPUs in the appropriate modes. * PERFORMANCE = all cores at max * POWER_SAVE = max two cores at non-turbo voltage * If a custom profile is set, don't honor any other hints * Clean up the code and firm up the locking. Change-Id: Ie6acada805780c9ae6e6bc2002843aef638ca63b Author: Steve Kondik <steve@cyngn.com> Date: Tue Nov 3 03:27:42 2015 -0800 power: Update for PerformanceManager changes * Undo damage caused by the previous patch which broke all hint arguments. We were actually using these wrong to begin with anyway. * Add support for get_profile * Clean up code Change-Id: Ibc3f21bfb7aa46ec97b9b63d09737d4331a5a714 Author: dianlujitao <dianlujitao@lineageos.org> Date: Sat Feb 23 20:24:57 2019 +0800 power: Pass NULL parameter in powerHint if data is zero * This restores the behavior in AOSP and CAF power HAL to avoid confusion. Change-Id: I72f5bb9286e2f57121e39eea82d2fe8854989393 Change-Id: I7ae614667e3182eaf0a90b81e8ed839689cfbf28
Diffstat (limited to 'service.cpp')
-rw-r--r--service.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/service.cpp b/service.cpp
index 85f84d1..ed9ada4 100644
--- a/service.cpp
+++ b/service.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ * Copyright (C) 2017-2019 The LineageOS Project
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -29,6 +30,8 @@
#define LOG_TAG "android.hardware.power@1.2-service-qti"
+// #define LOG_NDEBUG 0
+
#include <hardware/power.h>
#include <hidl/HidlTransportSupport.h>
#ifdef ARCH_ARM_32
@@ -46,7 +49,6 @@ using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
// Generated HIDL files
-using android::hardware::power::V1_2::IPower;
using android::hardware::power::V1_2::implementation::Power;
int main() {
@@ -55,7 +57,7 @@ int main() {
#endif
status_t status;
- android::sp<IPower> service = nullptr;
+ android::sp<Power> service = nullptr;
ALOGI("Power HAL Service 1.2 is starting.");
@@ -68,7 +70,7 @@ int main() {
configureRpcThreadpool(1, true /*callerWillJoin*/);
- status = service->registerAsService();
+ status = service->registerAsSystemService();
if (status != OK) {
ALOGE("Could not register service for Power HAL(%d).", status);
goto shutdown;