summaryrefslogtreecommitdiffstats
path: root/utils.c
diff options
context:
space:
mode:
authorBeYkeRYkt <beykerykt@gmail.com>2018-12-13 06:42:35 +0900
committerdianlujitao <dianlujitao@lineageos.org>2019-01-12 23:38:37 +0800
commitbd52e812630c99d510a212c408296e0e35571e2b (patch)
treec0f58e61ad51ec441b41f3229ad2ae29c3c814e6 /utils.c
parent48b4e273fde7ca1ac43dadf4c6421ffc765ce5e1 (diff)
downloadandroid_hardware_qcom_power-bd52e812630c99d510a212c408296e0e35571e2b.tar.gz
android_hardware_qcom_power-bd52e812630c99d510a212c408296e0e35571e2b.tar.bz2
android_hardware_qcom_power-bd52e812630c99d510a212c408296e0e35571e2b.zip
power: Handle launch and interaction hints for perf HAL platforms
* MP-CTL does not handle POWER_HINT_INTERACTION and POWER_HINT_LAUNCH directly. Requests for processing are sent by Qualcomm BoostFramework (QPerformance) at the framework service level. Since we do not have BoostFramework, process POWER_HINT_INTERACTION and POWER_HINT_LAUNCH in PowerHAL to ensure a sufficient level of performance. * For proper operation, perfboostsconfig.xml file is required. Change-Id: I4c67d886c9dd74ae07094d32bdffc8ef403e04e7
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index ffa3e34..d86ffd8 100644
--- a/utils.c
+++ b/utils.c
@@ -273,6 +273,21 @@ int perf_hint_enable(int hint_id , int duration)
return lock_handle;
}
+//Same as perf_hint_enable, but with the ability to
+//choose the type
+int perf_hint_enable_with_type(int hint_id, int duration, int type)
+{
+ int lock_handle = 0;
+
+ if (qcopt_handle) {
+ if (perf_hint) {
+ lock_handle = perf_hint(hint_id, NULL, duration, type);
+ if (lock_handle == -1)
+ ALOGE("Failed to acquire lock.");
+ }
+ }
+ return lock_handle;
+}
void release_request(int lock_handle) {
if (qcopt_handle && perf_lock_rel)