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
diff --git a/utils.c b/utils.c
index ffa3e34..d86ffd8 100644
--- a/utils.c
+++ b/utils.c
@@ -273,6 +273,21 @@
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)