summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* power: Add the custom set_feature lib as whole static librarylineage-17.1Arian2020-04-101-1/+1
| | | | | | | * When using LOCAL_STATIC_LIBRARIES linker removes functions that it considers as unused, which may result in removing the set_device_specific_feature void from the set_feature lib. * Work this around by adding the whole static library and by that skipping the removement of maybe unused functions. Change-Id: I9be9323b19c16e92f66ef5802e443a9484146ee9
* Add Powerhal support for bengalSowjanya Galla2020-03-182-0/+282
| | | | | | Enable camera powerhint Change-Id: I00758b785cbfd375e2bce7dbfa27ed03047c0914
* Power: Add Camera Powerhal settings for BitraSumit Gemini2020-03-181-0/+245
| | | | | | Enable power hints for camera Change-Id: I2fcf28465cff45df7bf9a6a2aa0263681ffcb380
* qvr powerhintsSathish Ambley2020-03-181-6/+143
| | | | Change-Id: I13bd1f0e93e5ad1a9cfafaeddc089cabb7d41017
* Add power hints for FHD480 and HD960Ananth Raghavan Subramanian2020-03-091-1/+4
| | | | Change-Id: Ifb74e4b952bf94d9f720340d7e2a5a5e127dbc10
* power: add core ctl and io power changes to powerhalRajashekar Adi2020-03-081-4/+12
| | | | | | make core ctl min cpus as 6 and io percent as 100 Change-Id: Ie74ef07db3245feebea077380c08a5c3adf9b07f
* power: Add powerhints for QVR use-casesrbandi2020-03-081-0/+18
| | | | | | Add powerhints for QVR performance module. Change-Id: I942894a6b700f99b4c08af920ef8fb1d438d7562
* Power: update powerhal settingsRajashekar Adi2020-03-081-8/+12
| | | | | | Add new use ab tunable to powerhal Change-Id: Ife50f76c44370b27612d8e4b5f766635f8fab138
* power : Modified APC freqency of lito for R2Sumit Gemini2020-03-081-65/+100
| | | | | | Added APC freqncy accordingly R2 plan Change-Id: I021ec85e2f155bb6ad1679894a964e40348349d6
* Power:Add powerhints to camera and VRRajashekar Adi2020-03-082-0/+273
| | | | | | Add powerhint support for atoll Change-Id: I7dd1ce7eba459e80ad08f0b97390cc265e0908fa
* power: Follow symlinks when writing to dt2w toggle pathlineage-17.0LuK13372019-12-071-1/+1
| | | | | | | * Some devices tend to symlink touchpanel related toggles to common path due to having to deal with different panels. Change-Id: I429e4c5acfbcd3ff26a019f919fbe880692160bd
* power: Support power profiles on legacy platformsMichael Bestas2019-10-239-0/+861
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Author: Michael Bestas <mkbestas@lineageos.org> Date: Mon Mar 26 01:52:03 2018 +0300 power: apq8084: Add support for power profile & boost * Based on msm8974 HAL. Change-Id: I88ce707b022f7b122ad7a2fcfc67fde0075d7e7a Author: Michael Bestas <mkbestas@lineageos.org> Date: Fri May 25 21:30:28 2018 +0300 power: Spring cleanup * Cleanup SoC specific files: - Fix code spacing and indentation - Remove dead code - Remove useless comments - Remove useless logs - Make code uniform between the files so it's easier to diff - Use declared enums when possible for power hints Change-Id: Ie1378c94c53b33299927c5eb1bfc19f1a42b8743 Author: Stefan Assmann <sassmann@kpanic.de> Date: Mon Jul 23 18:42:02 2018 +0200 power-8084: rework power profiles profile_power_save: 2 cores max freq 1,2GHz profile_bias_power: 2 cores max freq 2,4GHz profile_bias_performance: 4 cores min freq 1,2GHz (2 active) profile_high_performance: 4 cores min freq 1,5GHz (4 active) - rearranged profiles in ascending order - fixed typo in profile_bias_performance Change-Id: I6f5d34e797c4f1f7ce9f7344f7f489c40debd094 Author: Corinna Vinschen <xda@vinschen.de> Date: Thu Aug 9 12:51:12 2018 +0200 power-8084: document performance settings Change-Id: Ic6dbe8511d694be0c0883f3052c612aa0a30c581 Signed-off-by: Corinna Vinschen <xda@vinschen.de> Author: Michael Bestas <mkbestas@lineageos.org> Date: Mon Mar 26 02:07:03 2018 +0300 power: msm8226: Add support for power profile & boost * Based on legacy HAL implementation Change-Id: Ifb93945e4e4005ef922cacee95e51bb95d5df9e3 Author: Michael Bestas <mkbestas@lineageos.org> Date: Mon Mar 26 02:13:51 2018 +0300 power: msm8610: Add support for power profile & boost * Based on legacy HAL implementation Change-Id: If778938b9703fd01185c2448bc83a09f04348333 Author: dianlujitao <dianlujitao@lineageos.org> Date: Sun Mar 25 18:08:45 2018 +0800 power: msm8916: Add support for power profile & boost * Based on legacy HAL implementation Change-Id: I20225ae9244023555724c76df5e208fd60eb3841 Author: Corinna Vinschen <xda@vinschen.de> Date: Wed Aug 29 14:18:03 2018 +0200 power-8916: fix using wrong array size in perform_hint_action * Fix a copy/paste bug using the wrong array size Change-Id: I07172b8e857ad3e6ad7761b3e090b518005ba26b Author: Ethan Chen <intervigil@gmail.com> Date: Sun Feb 25 20:46:37 2018 -0800 msm8952: Support power profiles * Add support for power profiles Change-Id: I0ce3578530dd8618468fd97b1e49ba512cb8fa83 Author: Zhao Wei Liew <zhaoweiliew@gmail.com> Date: Tue Nov 17 17:45:03 2015 +0800 power: msm8960: Implement performance profiles * Based on legacy HAL implementation Change-Id: Id7d16f97c177a790427d848e8ccea3286cf37a4e Author: Michael Bestas <mkbestas@lineageos.org> Date: Mon Jan 22 02:30:25 2018 +0200 power: msm8974: Add support for power profile * Based on Steve Kondik's and Zhao Wei Liew's implementation from the legacy HAL. Change-Id: Ie2a28b589537349cbcefc5b64e5404d346edf2c2 Author: dianlujitao <dianlujitao@lineageos.org> Date: Fri Mar 2 12:40:04 2018 +0800 power: Don't advertise power profile when interaction boost disabled * Power profile is fake news without interaction boost. Change-Id: Iceea885e6cb176f0620e76cfc335b7da500a0c2b Author: Michael Bestas <mkbestas@lineageos.org> Date: Mon Mar 26 03:00:15 2018 +0300 power: msm8992: Add support for power profile & boost * Based on legacy HAL implementation Change-Id: I9ebb44c1e215a76a95180a6188e80cb24f0b03ba Author: Michael Bestas <mkbestas@lineageos.org> Date: Mon Mar 26 03:00:30 2018 +0300 power: msm8994: Add support for power profile & boost * Based on legacy HAL implementation Change-Id: I5aa0b75b493825f2d87ce6eea0f3c3b1c3bba135 Author: Han Wang <wanghan1995315@gmail.com> Date: Tue Jul 24 17:12:14 2018 +0200 power: Fix several typos in power profiles Change-Id: I8302d41a902a037548ab52dc68ab8a0d7ca47861 Author: Corinna Vinschen <xda@vinschen.de> Date: Sun Aug 26 22:11:49 2018 +0200 power: set_power_profile: handle errors * Make sure current_power_profile reflects actual setting. * Propagate error condition up to caller. * Handle error from set_power_profile in power_hint_override. Change-Id: I8518d921a94c912c75f59fbf993a8f44116bdca9 Signed-off-by: Corinna Vinschen <xda@vinschen.de> 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: Ic483c0aa5e095f29f5de450472a6243d663468b6
* power: msm8937: Support power profilesBeYkeRYkt2019-10-231-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Author: BeYkeRYkt <beykerykt@gmail.com> Date: Sun Dec 23 22:55:35 2018 +0900 power: Add specific powerhal for msm8937 * msm8937 is on the same CAF line along with msm8953 and msm8996 and also supports the MPCTL_V3 commands, in contrast to msm8952. Separate it from msm8952. Change-Id: I58b0d7563cd3896ee4484ed0e0f38a6ef7eb01b2 Author: BeYkeRYkt <beykerykt@gmail.com> Date: Sun Dec 23 23:21:50 2018 +0900 power: msm8937: Update power profile settings * msm8937 supports the MPCTL_V3 commands. Change-Id: Ibeaaf3d4577a8378f1d9a495b87ac58f75b1da73 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: Ibaaf9a8a4398dfac12c901835f2f7aae9eefec3b
* power: msm8953: Support power profilesMichael Bestas2019-10-231-0/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Author: Michael Bestas <mkbestas@lineageos.org> Date: Fri May 25 22:57:04 2018 +0300 power: msm8953: Add support for power profiles * Based on legacy HAL implementation * We no longer handle POWER_HINT_INTERACTION and POWER_HINT_LAUNCH, they're now supported directly by Qualcomm mp-ctl. Change-Id: If5b239a6fa1880e2e650f0e5c50c1357e8e3ac1a Author: Corinna Vinschen <xda@vinschen.de> Date: Sun Aug 26 22:11:49 2018 +0200 power: set_power_profile: handle errors * Make sure current_power_profile reflects actual setting. * Propagate error condition up to caller. * Handle error from set_power_profile in power_hint_override. Change-Id: I8518d921a94c912c75f59fbf993a8f44116bdca9 Signed-off-by: Corinna Vinschen <xda@vinschen.de> Author: dianlujitao <dianlujitao@lineageos.org> Date: Thu Sep 6 21:43:14 2018 +0800 power: Clean up hint IDs * Group MPCTL v3 opcodes according to major type. * Remove some unused/dead opcodes. * Rename some misleading/inconsistency names. Change-Id: I3a06930c8fff18a50f77cb230951dbd43d62fed3 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: I991bb6e3b20a0e6c8674136b309561af491d277f
* power: msm8996: Support power profilesdianlujitao2019-10-231-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Author: dianlujitao <dianlujitao@lineageos.org> Date: Thu Jan 18 23:34:38 2018 +0800 power: msm8996: Add support for power profiles * We no longer handle POWER_HINT_INTERACTION and POWER_HINT_LAUNCH, they're now supported directly by Qualcomm mp-ctl. Change-Id: I03a5229fc8b97e8fb593ba831625c001e926e1d6 Author: Zhao Wei Liew <zhaoweiliew@gmail.com> Date: Tue Jun 21 10:44:49 2016 +0800 power: msm8996: Support boost and perf profile hints Change-Id: I010d4d1d3fb495e523b065c11ca95c4305530f9f Author: Ricardo Cerqueira <ricardo@cyngn.com> Date: Sat Jul 16 02:15:14 2016 +0100 power: 8996: Fix only sending the first pair out of every perf profile When acquiring the perflock, we were only passing the first pair of arguments out of every profile. Because... sizeof(*)/sizeof(int) is always 2 on a 64bit arch. There's no need to put the profile into a pointer anyway, just pass it directly to ARRAY_SIZE (and the lock) Change-Id: I25f2a9b059290c3a0b36fc8dc29c711da938430e Author: dianlujitao <dianlujitao@lineageos.org> Date: Fri Mar 2 12:40:04 2018 +0800 power: Don't advertise power profile when interaction boost disabled * Power profile is fake news without interaction boost. Change-Id: Iceea885e6cb176f0620e76cfc335b7da500a0c2b Author: Zhao Wei Liew <zhaoweiliew@gmail.com> Date: Sun Jun 26 11:37:59 2016 +0800 power: Use ARRAY_SIZE macro where possible The common macro was introduced in the commit: 8fe35cc7dd88bbb82a7732591fac4b8ecd935970 So use it. Change-Id: Ie47d0e6b91b7bba378b0fdf53a345a021b0c2d48 Author: Michael Bestas <mkbestas@lineageos.org> Date: Mon Mar 26 05:21:23 2018 +0300 power: Consistent skipping of non perf profile hints Change-Id: I9129de9046df7b922af7b32eac94167776f820cf Author: Michael Bestas <mkbestas@lineageos.org> Date: Fri May 25 21:30:28 2018 +0300 power: Spring cleanup * Cleanup SoC specific files: - Fix code spacing and indentation - Remove dead code - Remove useless comments - Remove useless logs - Make code uniform between the files so it's easier to diff - Use declared enums when possible for power hints Change-Id: Ie1378c94c53b33299927c5eb1bfc19f1a42b8743 Author: Corinna Vinschen <xda@vinschen.de> Date: Sun Aug 26 22:11:49 2018 +0200 power: set_power_profile: handle errors * Make sure current_power_profile reflects actual setting. * Propagate error condition up to caller. * Handle error from set_power_profile in power_hint_override. Change-Id: I8518d921a94c912c75f59fbf993a8f44116bdca9 Signed-off-by: Corinna Vinschen <xda@vinschen.de> Author: dianlujitao <dianlujitao@lineageos.org> Date: Thu Sep 6 21:43:14 2018 +0800 power: Clean up hint IDs * Group MPCTL v3 opcodes according to major type. * Remove some unused/dead opcodes. * Rename some misleading/inconsistency names. Change-Id: I3a06930c8fff18a50f77cb230951dbd43d62fed3 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: I0b58da6f840caf78e79c1a463d4211460be3c02d
* power: sdm660: Support power profilesdianlujitao2019-10-231-0/+100
| | | | | | | | | | | | | | | | | | | | | Author: dianlujitao <dianlujitao@lineageos.org> Date: Thu Sep 6 17:45:43 2018 +0800 power: sdm660: Support power profiles Change-Id: I54c92db62599d9bd48e685f770adc2ae72eec4cb 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: I2dd8ed517ba2a6b8333e2506b79cbc712814a889
* power: msm8998: Support power profilesdianlujitao2019-10-231-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Author: dianlujitao <dianlujitao@lineageos.org> Date: Sat Oct 14 12:08:10 2017 +0800 power: msm8998: Support power profiles Change-Id: I8a11aa9db00051cfaae650273d980ce5080f6567 Author: dianlujitao <dianlujitao@lineageos.org> Date: Sat Jan 20 22:19:17 2018 +0800 power: msm8998: Fix perf mode switch * Checking a pointer is NULL or not makes no sense, and as a result perf mode cannot be turned off. Fix it by checking the value. Change-Id: I4feb37da72b757631619e1aa2917f2a345a8032b Author: dianlujitao <dianlujitao@lineageos.org> Date: Fri Mar 2 12:40:04 2018 +0800 power: Don't advertise power profile when interaction boost disabled * Power profile is fake news without interaction boost. Change-Id: Iceea885e6cb176f0620e76cfc335b7da500a0c2b Author: Michael Bestas <mkbestas@lineageos.org> Date: Mon Mar 26 05:21:23 2018 +0300 power: Consistent skipping of non perf profile hints Change-Id: I9129de9046df7b922af7b32eac94167776f820cf Author: Michael Bestas <mkbestas@lineageos.org> Date: Fri May 25 21:30:28 2018 +0300 power: Spring cleanup * Cleanup SoC specific files: - Fix code spacing and indentation - Remove dead code - Remove useless comments - Remove useless logs - Make code uniform between the files so it's easier to diff - Use declared enums when possible for power hints Change-Id: Ie1378c94c53b33299927c5eb1bfc19f1a42b8743 Author: Corinna Vinschen <xda@vinschen.de> Date: Sun Aug 26 22:11:49 2018 +0200 power: set_power_profile: handle errors * Make sure current_power_profile reflects actual setting. * Propagate error condition up to caller. * Handle error from set_power_profile in power_hint_override. Change-Id: I8518d921a94c912c75f59fbf993a8f44116bdca9 Signed-off-by: Corinna Vinschen <xda@vinschen.de> 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: I06d33afacea2e221d778a87cf81f8d89296019a9
* power: Prepare for power profile supportdianlujitao2019-10-237-5/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-232-43/+2
| | | | | | | | 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 legacy platformsMichael Bestas2019-10-237-20/+571
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Author: Michael Bestas <mkbestas@lineageos.org> Date: Mon Mar 26 01:52:03 2018 +0300 power: apq8084: Add support for power profile & boost * Based on msm8974 HAL. Change-Id: I88ce707b022f7b122ad7a2fcfc67fde0075d7e7a Author: Michael Bestas <mkbestas@lineageos.org> Date: Mon Mar 26 02:07:03 2018 +0300 power: msm8226: Add support for power profile & boost * Based on legacy HAL implementation Change-Id: Ifb93945e4e4005ef922cacee95e51bb95d5df9e3 Author: Michael Bestas <mkbestas@lineageos.org> Date: Mon Mar 26 02:13:51 2018 +0300 power: msm8610: Add support for power profile & boost * Based on legacy HAL implementation Change-Id: If778938b9703fd01185c2448bc83a09f04348333 Author: dianlujitao <dianlujitao@lineageos.org> Date: Sun Mar 25 18:08:45 2018 +0800 power: msm8916: Add support for power profile & boost * Based on legacy HAL implementation Change-Id: I20225ae9244023555724c76df5e208fd60eb3841 Author: Michael Bestas <mkbestas@lineageos.org> Date: Mon Jan 22 02:30:25 2018 +0200 power: msm8974: Add support for power profile * Based on Steve Kondik's and Zhao Wei Liew's implementation from the legacy HAL. Change-Id: Ie2a28b589537349cbcefc5b64e5404d346edf2c2 Author: Michael Bestas <mkbestas@lineageos.org> Date: Mon Mar 26 03:24:26 2018 +0300 power: msm8974: POWER_HINT_INTERACTION improvements Change-Id: I9bde2a1d62fcb9e987741b5932f8f50a019cdfd2 Author: Craig Tatlor <ctatlor97@gmail.com> Date: Mon May 21 17:22:31 2018 +0100 power: msm8974: Build with with BOARD_VNDK_VERSION time.h isnt included by default when vndk is enabled. Change-Id: I7ca6ca601a8d25557bd1bb0484766121a9ae5633 Author: Michael Bestas <mkbestas@lineageos.org> Date: Mon Mar 26 03:00:15 2018 +0300 power: msm8992: Add support for power profile & boost * Based on legacy HAL implementation Change-Id: I9ebb44c1e215a76a95180a6188e80cb24f0b03ba Author: Michael Bestas <mkbestas@lineageos.org> Date: Mon Mar 26 03:00:30 2018 +0300 power: msm8994: Add support for power profile & boost * Based on legacy HAL implementation Change-Id: I5aa0b75b493825f2d87ce6eea0f3c3b1c3bba135 Author: Michael Bestas <mkbestas@lineageos.org> Date: Fri May 25 21:30:28 2018 +0300 power: Spring cleanup * Cleanup SoC specific files: - Fix code spacing and indentation - Remove dead code - Remove useless comments - Remove useless logs - Make code uniform between the files so it's easier to diff - Use declared enums when possible for power hints Change-Id: Ie1378c94c53b33299927c5eb1bfc19f1a42b8743 Author: Corinna Vinschen <xda@vinschen.de> Date: Mon Aug 6 21:14:12 2018 +0200 power-8084: clean up code * express interactive boost frequencies as descriptive symbolic values rather than arbitrary hex numbers * express durations as descriptive symbolic values rather than just numbers in the code Change-Id: I47a92bd4c9b0b86ae0444d87345daf4e94d56126 Signed-off-by: Corinna Vinschen <xda@vinschen.de> Author: Corinna Vinschen <xda@vinschen.de> Date: Mon Aug 6 10:58:20 2018 +0200 power-8084: reduce interactive boost * 1,1 GHz min freq is more than enough for interactive boost on apq8084 * default duration is unnecessarily long, reduce to 200 ms * 1,5 GHz min freq on 2 CPUs for 1 sec is entirely sufficient for launch action Change-Id: I5e51267ed32a3e50899627e4281321820fac237f Signed-off-by: Corinna Vinschen <xda@vinschen.de> Author: Corinna Vinschen <xda@vinschen.de> Date: Mon Aug 6 16:52:08 2018 +0200 power-8084: drop POWER_HINT_LAUNCH handling * kernel governor is doing well by itself, but thanks all the same Change-Id: I64fa61a1d8ff0f20bac9e5c32c56b031570a564f Signed-off-by: Corinna Vinschen <xda@vinschen.de> Author: Corinna Vinschen <xda@vinschen.de> Date: Fri Oct 12 21:40:24 2018 +0200 power-8084: Revert POWER_HINT_LAUNCH handling This effectively reverts commit 0ef4cb429ff3d42e8f8bd27d749ecd80f2911dc5. Users (including myself) noticed some laggy behaviour. The patch reverts to some more oomph at launch time, trying for a compromise between performance and power saving. Change-Id: I2d07686a131dcb75c9e590d99764d2a650cae507 Author: Craig Tatlor <ctatlor97@gmail.com> Date: Mon May 21 17:22:31 2018 +0100 power: Build with with BOARD_VNDK_VERSION time.h isnt included by default when vndk is enabled. Change-Id: I949ed271d7e7ed31e186019b0289299c1c8ff940 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: I8a1d8101bc40d3fc169a0f1f2982a5cac76e6a13
* power: Handle launch and interaction hints for perf HAL platformsBeYkeRYkt2019-10-2310-11/+452
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Use monotonic time for interaction boostWei Wang2019-10-232-0/+11
| | | | | | | | | | Using the wall clock will cause boosts to be disabled when/if the clock is adjusted backward. Bug: 29191415 Bug: 29208304 Change-Id: I8af5f40b46d996ce7bccb8324fc186e2f3a5b267 (cherry picked from commit 2bf13f822cf39123ee0e97e40caf1288ba4f457a)
* power: perform_hint_action: return an error codeCorinna Vinschen2019-10-232-35/+35
| | | | | | | | | | | So far the caller never knows if setting the hint actually worked. This leads to a potential disconnect between the actual setting and the UI because set_power_profile simply assumes perform_hint_action worked. Return an error code or 0, so the callers can check for success. Change-Id: I180a367e9d8581a63dfa703046b37bc5cae8c6cb Signed-off-by: Corinna Vinschen <xda@vinschen.de>
* power: Use declared enums where possibleMichael Bestas2019-10-2311-46/+63
| | | | Change-Id: I079490f8ff61bf278dd69eb89b9dae5ce42e6052
* power: Add known perf hint IDsdianlujitao2019-10-231-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Author: Zhao Wei Liew <zhaoweiliew@gmail.com> Date: Tue Jun 21 10:44:49 2016 +0800 power: msm8996: Support boost and perf profile hints Change-Id: I010d4d1d3fb495e523b065c11ca95c4305530f9f Author: Zhao Wei Liew <zhaoweiliew@gmail.com> Date: Thu Oct 20 21:51:09 2016 +0800 power: msm8937: Improve boost values * Bring boost values more in line with CAF's recommended values * Make performance profile values saner Change-Id: I9827d25a347a8ab959c766a71e30b3d29267983f Author: Diogo Ferreira <diogo@underdev.org> Date: Sun May 7 11:00:12 2017 +0100 power: Use the correct opcode for STOR_CLK_SCALE_DIS This is actually wrong, 0x42C0C000 is the opcode for SWAP_RATIO and 0x42C10000 is the correct opcode for storage clock scale disabling. Change-Id: I6b1db525acf061ffe419011acd1f91525a27a35d Author: dianlujitao <dianlujitao@lineageos.org> Date: Wed Sep 20 16:40:57 2017 +0800 power: sdm660: Use declared enums Change-Id: I21691f9595f3730b9046012d1cae3951eb9da6a7 Author: dianlujitao <dianlujitao@lineageos.org> Date: Sat Sep 23 20:22:17 2017 +0800 power: sdm660: Support boost and power profiles * perfd needs /vendor/etc/appboosts.xml on sdm660 platform. Change-Id: I92632da032ebd1a629fcc0b9c7e1811dee9117fe Author: dianlujitao <dianlujitao@lineageos.org> Date: Thu Sep 6 21:43:14 2018 +0800 power: Clean up hint IDs * Group MPCTL v3 opcodes according to major type. * Remove some unused/dead opcodes. * Rename some misleading/inconsistency names. Change-Id: I3a06930c8fff18a50f77cb230951dbd43d62fed3 Change-Id: I611ef9651486f6f3caa6a6d6a08434912c114659
* power: msm8996: Support VR + Sustained performance modedianlujitao2019-10-231-0/+99
| | | | Change-Id: I2eabcf48eac01d2f06050dea2392a8b853fc3129
* power: Clean up and fix set_interactive_overrideMichael Bestas2019-10-2317-122/+173
| | | | | | | | | | | * Remove debug logs and useless comments * Consistent return values * Add back display hints for legacy platforms, they used to live in power-common.c but removed in commit 561cffcbfa66192e839e040d2da3bff2ecf8dcac * Check if set_interactive_override handled hints and print info message if it didn't Change-Id: Iff9f7327ba71c282e34ff3143c45a3f40f72fc92
* power: Clean up and fix video encode/decode hint handlingMichael Bestas2019-10-2317-429/+986
| | | | | | | | * Unify code style for non legacy SoCs * Restore legacy SoC handling which used to live in power-common.c but was removed in commit 561cffcbfa66192e839e040d2da3bff2ecf8dcac Change-Id: Ieb84e6d6c8d762614e21267e81e6057aa64b36dd
* power: Find online CPU core and get scaling governornico2019-10-237-96/+39
| | | | Change-Id: I90aed1aaee8d3819d1de921674da924efd0a6c4f
* power: msm8952: Remove HBTP supportMichael Bestas2019-10-231-38/+0
| | | | | | * Not used Change-Id: I208275139b95911c88ccf930bf65e0c6089cc94a
* power: Rename power-8952.c to power-8937.cMichael Bestas2019-10-232-1/+247
| | | | | | | * Latest power-8952.c is used for msm8937 with mpctl V3. Rename the file so we can add back the legacy msm8952 handling. Change-Id: Iccd2a3c0abed2ef10d5f6c2182c0509a2fbe611d
* Reduce hwbinder buffer size for power HALVinay Verma2019-10-232-0/+12
| | | | | | | Set hwbinder buffer size to 16KB for 32 bit architecture. Change-Id: I4272a12853269dd6363f58a5bb81caa09cc47e9a CRs-Fixed: 2315283
* power: Remove unused camera_hint_ref_countMichael Bestas2019-10-234-80/+34
| | | | | | | | * These were part of the commit that added mutex locks for camera hints. We have now removed the locks so this is no longer necessary Change-Id: I38b91ce4e8fc811b8d9a04e6ec20521adde1b264
* power: Compile with -Wall -Wextra -WerrorMichael Bestas2019-10-239-16/+16
| | | | | | * And fix the build errors Change-Id: I183203edfd92d4672893d74aa7428bc9f5e17772
* power: msm8916: Code clean updianlujitao2019-10-231-15/+5
| | | | | | | * Minor cleanup * Remove unused varibles and checks Change-Id: I128953c2aa6a822d3950a872e50489b864e7a99c
* power: fix sysfs_read/sysfs_write usageCorinna Vinschen2019-10-233-12/+12
| | | | | | | | | | | | * The incoming path to sysfs_read/sysfs_write should be const, as in open(2) call. * Redefine scaling_gov_path as const pointer array. * Since sysfs_read works on a simple absolute path anyway, make sure the scaling_gov_path paths *are* absolute. Otherwise the code only works if Power HAL has / as CWD, which is a bit fragile. Change-Id: I70c08f8137842569514bcb3f6e0617d46044e6ab Signed-off-by: Corinna Vinschen <xda@vinschen.de>
* power: msm8996: Remove dead codeMichael Bestas2019-10-231-27/+1
| | | | Change-Id: Ia26e5989a7063baad048e017715fe0f31332fb75
* power: add back check for ro.vendor.extension_libraryCorinna Vinschen2019-10-231-2/+11
| | | | | | | | | | | | | | This partially reverts I0ce40bbefb8c867dda8ee5eb1f948af2106e692d, "power: Using PerfHAL API". Especially older systems don't provide libqti-perfd-client.so but this is hardcoded since the aforementioned change. Use the former code checking for ro.vendor.extension_library and try to load that library if the property exists before falling back to loading libqti-perfd-client.so. Change-Id: If89e3b88062be10af7cfd43b6ba92a22fda32754 Signed-off-by: Corinna Vinschen <xda@vinschen.de>
* power: Use ARRAY_SIZE macro where possibleZhao Wei Liew2019-10-2315-37/+30
| | | | Change-Id: Ie47d0e6b91b7bba378b0fdf53a345a021b0c2d48
* power: Drop default POWER_HINT_INTERACTION routinedianlujitao2019-10-231-6/+0
| | | | | | | | | | | | | | | * These boost resources were introduced years ago and are no longer suitable for modern SoCs. Each SoC should implement its own boost resource in either platform specific power HAL source file or perf HAL. * Starting from LineageOS 15.1, recent SoCs no longer handle POWER_HINT_INTERACTION in the power HAL, so power_hint_override returns HINT_NONE and the default routine is always executed. E.g, on msm8996 little cluster is always boosted to max frequency on touch, which causes a huge battery drain. * As a bonus, the "Failed to apply optimization" errors are gone. Change-Id: I322f23f40fc5da7485f2c7a6cf8ee952d0fb94c6
* power: Cache SOC ID checks for future queriesZhao Wei Liew2019-10-235-30/+25
| | | | | | | | | | | | | | Currently, get_soc_id() is queried on every SOC ID check in the SDM660, MSM8916, MSM8952, MSM8953 and MSM8974-family HALs. This results in extraneous file operations on every SOC ID check. Cache the result of get_soc_id() during the first query to reduce the number of file operations being made. This also brings back the behaviour in LineageOS 15.1 when the HALs were still stored in device/qcom/common. Change-Id: Ic17dbf12e7f9ecdb47b73a580f467df9ad630aa0
* power: Add back display_boost checksZhao Wei Liew2019-10-233-17/+26
| | | | | | | | - Remove 8084 check as all 8084s make use of the display boost - Convert the display_boost check to an soc_id check for 8974pro - Add back display_boost (now soc_id) check to 8974's HAL Change-Id: I237b9108e666f4cb0051d1c1bb22453d55ffcdc7
* power: Simplify display_hint_sentZhao Wei Liew2019-10-2312-78/+33
| | | | | | | | | | | Check for whether the display hint has been sent at the start of the set_interactive() function in the common powerHAL. This gets rid of the need to replicate the same variable in every target-specific powerHAL that implements the set_interactive_override() function. Change-Id: If7dd11fcb578211f4f83847f9257232c4138ce53
* power: Simplify soc_id checksZhao Wei Liew2019-10-236-139/+134
| | | | | | | - Get soc_id in a common util function - Return boolean values for the target-specific soc_id checks Change-Id: I038c435d28855859f36566de7acf881037d070f2
* power: Remove unused list utilsMichael Bestas2019-10-232-28/+0
| | | | | | | * They were added in 6ec1206b246a164acfb0aa7b43af9b04c759063e but never used Change-Id: I0f0d0336cd91715eb8aa4dcb42ae1e449da8603b
* power: Avoid interaction build errorsMichael Bestas2019-10-234-8/+2
| | | | Change-Id: I77942f23a9c617abac1a8533cfc1fd7bfa7f66e8
* power: Use is_interactive_governor/is_schedutil_governorEthan Chen2019-10-238-68/+32
| | | | | | * Don't copy paste the same governor check code multiple times Change-Id: I2258553deb02a5ae149b0a96aca5fe5584f0ea14
* power: Introduce is_schedutil_governorMichael Bestas2019-10-232-0/+6
| | | | Change-Id: Ie3cfd0cb11b368cd9399a6dcea6b6cfa1f4d7916
* power: Remove leftover support for ondemand governorMichael Bestas2019-10-235-61/+0
| | | | Change-Id: Id4c2aa5efa7101535a7311e34529e0b90c7491f1
* power: Remove leftover support for msm-dcvs governorMichael Bestas2019-10-235-17/+0
| | | | | | | * This is not used by any recent qcom SoC and not used by any SoC using this HAL. Change-Id: If9b2997104bcd5e3ff27fc39c75590d07e813f85