summaryrefslogtreecommitdiffstats
path: root/power-common.h
Commit message (Collapse)AuthorAgeFilesLines
* power: Prepare for power profile supportdianlujitao2019-10-231-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* power: msm8916: Drop MIN_FREQ tweak for 8939nico2019-10-231-3/+0
| | | | | | | | Leave MIN_FREQ as default except for high performance profile. Besides, big cluster is turned off by power_set_interactive_ext when display off for some 8939 device. So, MIN_FREQ tweak would not work anyway. Change-Id: I57545364ab331f171d1ee1c26787189668c60a91
* power: Handle launch and interaction hints for perf HAL platformsBeYkeRYkt2019-10-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Author: BeYkeRYkt <beykerykt@gmail.com> 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 <arbiter1000@gmail.com> 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 <arbiter1000@gmail.com> 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
* power: Find online CPU core and get scaling governornico2019-10-231-1/+0
| | | | Change-Id: I90aed1aaee8d3819d1de921674da924efd0a6c4f
* power: Use ARRAY_SIZE macro where possibleZhao Wei Liew2019-10-231-0/+1
| | | | Change-Id: Ie47d0e6b91b7bba378b0fdf53a345a021b0c2d48
* power: Remove leftover support for ondemand governorMichael Bestas2019-10-231-1/+0
| | | | Change-Id: Id4c2aa5efa7101535a7311e34529e0b90c7491f1
* power: Remove leftover support for msm-dcvs governorMichael Bestas2019-10-231-5/+0
| | | | | | | * This is not used by any recent qcom SoC and not used by any SoC using this HAL. Change-Id: If9b2997104bcd5e3ff27fc39c75590d07e813f85
* power: clang-formatMichael Bestas2019-10-231-9/+4
| | | | | | | * Using AOSP interface .clang-format * Clean Android.mk while we are at it Change-Id: I630f72e3dffb676ca1930e72945e897f62103ada
* power: Fix power hal compiler warningsAdrian Salido2019-10-231-0/+2
| | | | | | Bug: 30432975 Test: compile power hal for walleye without warnings Change-Id: I0d90c26462c662690f8a179250000b9a449a109f
* power: Introducing PowerHAL binderized serviceAnanth Raghavan Subramanian2019-01-171-1/+20
| | | | | | | | Moving from the default implementation to a binderized service with no wrapping. Now using 1.2 implementation of the IPower interface. Change-Id: Ibefd916544f51545e6889684a051b2ecc5867fe2
* power: qcom: powerHal for sdm439 and sdm429Deevana Murthy Bandaru2018-08-161-1/+2
| | | | | | Power hal changes for camera encode Change-Id: Ib909844aea854ebffe8a00d83af9ca2d81c4f827
* Relocate power HAL from device/qcom/commonDavid Ng2018-05-241-0/+49
Split module from combined device/qcom/common project into its own project. Relocation of some files from device/qcom/common at b5ce80cb1f60759a142a9338104d3adf3303ec0c. Change-Id: I6c13729a822f6fb9b5574b759ae9ec12154be464