From bd52e812630c99d510a212c408296e0e35571e2b Mon Sep 17 00:00:00 2001 From: BeYkeRYkt Date: Thu, 13 Dec 2018 06:42:35 +0900 Subject: 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 --- utils.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'utils.c') 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) -- cgit v1.2.3