path: root/power-common.h
diff options
authorBeYkeRYkt <>2018-12-13 06:42:35 +0900
committerMichael Bestas <>2019-10-23 01:12:57 +0300
commitef7a7ed7e04d113afdbe96ca07f55dd74111cc3c (patch)
tree7b2fac246a8614a6deda51eaacc7d5c8d77ee063 /power-common.h
parent2c5b2b8afe66195d926adc0e4085b36625f2f4b0 (diff)
power: Handle launch and interaction hints for perf HAL platforms
Author: BeYkeRYkt <> Date: Thu Dec 13 06:42:35 2018 +0900 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 Author: tomascus <> Date: Wed Feb 13 14:42:27 2019 +1100 power: don't use SCROLL_PREFILING The current use of the SCROLL_PREFILING hint hurts scroll performance and results in a lot of dropped frames. The hint ID corresponding to SCROLL_PREFILING only takes into effect for a default timeout value of 80 ms (as found in perfboostsconfig.xml), while the duration value in the process_interaction_hint function runs for a much longer time, from 1500 ms up to 5000 ms (bounds of kMinFlingDuration and kMaxInteractiveDuration). During the period of time, when the timeout value has elapsed and current time is less than duration, another interaction hint cannot be processed. Therefore, if the user decides to scroll during this period, high frame drops can be experienced as the CPU freq isn't raised by processing another hint to account for this additional scrolling. By only using SCROLL_VERTICAL, fluidity can be maintained, improving user experience. Furthmore, kMinInteractiveDuration has been lowered to 400 ms for some platforms as it is more than sufficient to maintain fluidity (minimal frames dropped) while scrolling. Change-Id: I42edd07a67c7dca43a10ae2fa1b44b64b7794b43 commit e9063a6956974a2e33652e2df0ecac991ee84c80 Author: tomascus <> Date: Tue Feb 19 17:15:58 2019 +1100 power: Release launch boost perflock when launch is completed Currently, the launch boost perflock is held for a fixed duration, either specified in perfboostsconfig.xml for perf HAL platforms or hardcoded in the powerHAL for non-perf HAL platforms. Using a fixed duration for this perflock has two shortcomings: * perflock can be held for too long, causing the CPU freq and other resources to be boosted for too long even if the application has finished launching, resulting in excessive battery drainage * perflock can be held not long enough if it takes more than the timeout time to finish launch The framework sends out a powerhint for both when launch starts and when launch ends. The launch finish hint can be used to signal when to release the perflock. Reference: Wahoo power-libperfmgr Change-Id: I405cc453c5f58d9fb2583b9c6017f3964a0ce024 Change-Id: I8ef6a890bc191f9504980707107750a720b50da3
Diffstat (limited to 'power-common.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/power-common.h b/power-common.h
index c989e97..9124aac 100644
--- a/power-common.h
+++ b/power-common.h
@@ -51,6 +51,7 @@ void power_hint(power_hint_t hint, void* data);
void set_interactive(int on);
#define ARRAY_SIZE(x) (sizeof((x)) / sizeof((x)[0]))
+#define CHECK_HANDLE(x) ((x) > 0)
#define UNUSED(x) UNUSED_##x __attribute__((__unused__))
#ifdef __cplusplus