-
Notifications
You must be signed in to change notification settings - Fork 1
power stuff #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AtlanPrime
wants to merge
49
commits into
aex-tmp:11.x
Choose a base branch
from
OGHyperion:11.x
base: 11.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
power stuff #1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* The usage of this code was removed in commit 0c226b7921b421dd24363f15aefef1236aa25287 * powerhint.xml is now read by libqti-perfd Change-Id: I498ad19d0bb43124e4518c5a4f20191a2c122997
* And unify styling a little bit Change-Id: I7f9bb43a534e352fdd7693ff975749864f8addb3
Change-Id: I827c7f5ab27548eec8d6e4ee27a72fa883025002
* Some devices may want to implement custom hooks Change-Id: I9be8023c8134b3c262f27b43a28bec0e14c0fd7f
Using this hook, any device should be able to reuse the majority of the powerhal and fork only power-<platform>.c if they feel that they need the ability to provide more specific tuning of the hints/etc. for their device. Change-Id: I013a3ec3ddccbe6f74f3dacf456cc6e8b3ab3430
Default encode hint was setting hispeed_freq to 1.1GHZ This is not needed for 8909 hence overrode that. Change-Id: I4c3695dbe82d43ebb34732559043b59815f7d49d
Changes to set Hi-Speed freq for 8909 target as below:
-Camcorder ON : set to 800Mhz
-Camcorder OFF : set to 998.4Mhz.
Change-Id: I8e4ca512c137a137fabe7762695e336a3ed37fdd
1. Changes to set CPU0 min freq for 8939 target as below:
Display off case : set to 400Mhz
Display on case : set to 960Mhz.
Change-Id: Ie8cf31484e70f83594778c899485910b9ff2578e
Finds which CPU cores is online and does following below
1.Gets scaling governor
2.Sets scaling min freq
Change-Id: I209a6228294c945e943ff285ac8f38b7f97337d6
This change bypasses execution of deprecated code path in the power.c for dispaly off hint. Change-Id: I3e6f5d2f5a9f1d55015149a0f7abc3c3f1f445e1
Creates framework for handling special cases like display off, video encode differently for 8992. Change-Id: I195a96f0787c0d2dc2696c75a6f281774e2345cb
This change enables 4+0 core config for display off sceanrios and in display off scenario system should go back to default core config. Change-Id: I57795988e7e0f1b2c1e160e2e454549a14bbde50
…rride Change-Id: If45b59915022b563d4c5c9bf454b02b431a97833
* No longer needed. Change-Id: I09fc90b4e5399b3f3b8a409edf3f57361da90100
* Prevent conflict with other HALs Change-Id: Icf1216410db26c3bb811d7aedde03e6d2f87e3cc
* Using AOSP interface .clang-format * Clean Android.mk while we are at it Change-Id: I630f72e3dffb676ca1930e72945e897f62103ada Signed-off-by: Arian <[email protected]>
* This is not used by any recent qcom SoC and not used by any SoC using this HAL. Change-Id: If9b2997104bcd5e3ff27fc39c75590d07e813f85
Change-Id: Id4c2aa5efa7101535a7311e34529e0b90c7491f1
Change-Id: Ie3cfd0cb11b368cd9399a6dcea6b6cfa1f4d7916
* Don't copy paste the same governor check code multiple times Change-Id: I2258553deb02a5ae149b0a96aca5fe5584f0ea14
Change-Id: I77942f23a9c617abac1a8533cfc1fd7bfa7f66e8
* They were added in 6ec1206b246a164acfb0aa7b43af9b04c759063e but never used Change-Id: I0f0d0336cd91715eb8aa4dcb42ae1e449da8603b
- Get soc_id in a common util function - Return boolean values for the target-specific soc_id checks Change-Id: I038c435d28855859f36566de7acf881037d070f2
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
- 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
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
* 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
Change-Id: Ie47d0e6b91b7bba378b0fdf53a345a021b0c2d48
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 <[email protected]>
Change-Id: Ia26e5989a7063baad048e017715fe0f31332fb75
* 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 <[email protected]>
* Minor cleanup * Remove unused varibles and checks Change-Id: I128953c2aa6a822d3950a872e50489b864e7a99c
* And fix the build errors Change-Id: I183203edfd92d4672893d74aa7428bc9f5e17772
Bug: 30432975 Test: compile power hal for walleye without warnings Change-Id: I0d90c26462c662690f8a179250000b9a449a109f Signed-off-by: Arian <[email protected]>
* 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
* 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
* Not used Change-Id: I208275139b95911c88ccf930bf65e0c6089cc94a
Change-Id: I90aed1aaee8d3819d1de921674da924efd0a6c4f
* Unify code style for non legacy SoCs * Restore legacy SoC handling which used to live in power-common.c but was removed in commit 561cffc Change-Id: Ieb84e6d6c8d762614e21267e81e6057aa64b36dd
* 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 561cffc * Check if set_interactive_override handled hints and print info message if it didn't Change-Id: Iff9f7327ba71c282e34ff3143c45a3f40f72fc92
Change-Id: I2eabcf48eac01d2f06050dea2392a8b853fc3129
Author: Zhao Wei Liew <[email protected]> Date: Tue Jun 21 10:44:49 2016 +0800 power: msm8996: Support boost and perf profile hints Change-Id: I010d4d1d3fb495e523b065c11ca95c4305530f9f Author: Zhao Wei Liew <[email protected]> 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 <[email protected]> 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 <[email protected]> Date: Wed Sep 20 16:40:57 2017 +0800 power: sdm660: Use declared enums Change-Id: I21691f9595f3730b9046012d1cae3951eb9da6a7 Author: dianlujitao <[email protected]> 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 <[email protected]> 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
Change-Id: I079490f8ff61bf278dd69eb89b9dae5ce42e6052
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 <[email protected]>
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)
Author: BeYkeRYkt <[email protected]> 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 <[email protected]> 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 Author: tomascus <[email protected]> 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 Author: dianlujitao <[email protected]> Date: Fri Jun 26 11:19:30 2020 +0800 power: Ignore interaction boost sequence in a short period * When slowly, but continuously scrolling, a sequence of zero duration boosts are fired by the framework. They quickly fill up the internal limitation of MPCTL, as a result all incoming boosts get ignored. * Fixing the following logspam: ANDR-PERF-MPCTL: Active req limit reached, No optimizations performed * This restores cm-14.1 behavior. Change-Id: I977e844935539a4598a749c77f4c0934ca93a2b7 Change-Id: I8ef6a890bc191f9504980707107750a720b50da3
Author: Michael Bestas <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> Date: Mon Mar 26 03:24:26 2018 +0300 power: msm8974: POWER_HINT_INTERACTION improvements Change-Id: I9bde2a1d62fcb9e987741b5932f8f50a019cdfd2 Author: Craig Tatlor <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> Author: Corinna Vinschen <[email protected]> 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 <[email protected]> Author: Corinna Vinschen <[email protected]> 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 <[email protected]> Author: Corinna Vinschen <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 Author: dianlujitao <[email protected]> Date: Fri Jun 26 11:19:30 2020 +0800 power: Ignore interaction boost sequence in a short period * When slowly, but continuously scrolling, a sequence of zero duration boosts are fired by the framework. They quickly fill up the internal limitation of MPCTL, as a result all incoming boosts get ignored. * Fixing the following logspam: ANDR-PERF-MPCTL: Active req limit reached, No optimizations performed * This restores cm-14.1 behavior. Change-Id: I977e844935539a4598a749c77f4c0934ca93a2b7 Change-Id: I8a1d8101bc40d3fc169a0f1f2982a5cac76e6a13
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
* Some devices may want to implement custom hooks Change-Id: Icb2d66471ec649a69b1e69849fd86282775052cb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Couldn't find 11.x on Gerrit so...