Commit Graph

15 Commits

Author SHA1 Message Date
Zhao Wei Liew
d62a558e09 power: Use ARRAY_SIZE macro where possible
Change-Id: Ie47d0e6b91b7bba378b0fdf53a345a021b0c2d48
2023-10-29 22:13:01 +00:00
Zhao Wei Liew
ba1c2a36fc power: Simplify display_hint_sent
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
2023-10-29 22:13:01 +00:00
Zhao Wei Liew
f87f9daa0c power: Cache SOC ID checks for future queries
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
2023-10-29 22:13:01 +00:00
Zhao Wei Liew
7ff6620596 power: Simplify soc_id checks
- Get soc_id in a common util function
 - Return boolean values for the target-specific soc_id checks

Change-Id: I038c435d28855859f36566de7acf881037d070f2
2023-10-29 22:13:01 +00:00
Ethan Chen
3fac864721 power: Use is_interactive_governor/is_schedutil_governor
* Don't copy paste the same governor check code multiple times

Change-Id: I2258553deb02a5ae149b0a96aca5fe5584f0ea14
2023-10-29 22:13:01 +00:00
Ethan Chen
48bfafcf39 power: Use log/log.h instead of utils/Log.h
Change-Id: I827c7f5ab27548eec8d6e4ee27a72fa883025002
2023-10-29 22:13:01 +00:00
Michael Bestas
0b6459f08e power: clang-format
* Using AOSP interface .clang-format
* Clean Android.mk while we are at it

Change-Id: I630f72e3dffb676ca1930e72945e897f62103ada
Signed-off-by: Arian <arian.kulmer@web.de>
2023-10-29 22:13:01 +00:00
Michael Bestas
39e18570bf power: Compile with -Wall -Wextra -Werror
* And fix the build errors

Change-Id: I183203edfd92d4672893d74aa7428bc9f5e17772
2023-10-29 22:13:01 +00:00
Michael Bestas
1361eb5186 power: Remove leftover support for msm-dcvs governor
* This is not used by any recent qcom SoC
  and not used by any SoC using this HAL.

Change-Id: If9b2997104bcd5e3ff27fc39c75590d07e813f85
2023-10-29 22:13:01 +00:00
Michael Bestas
2b371015ef power: Remove unused camera_hint_ref_count
* 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
2023-10-29 22:13:01 +00:00
dianlujitao
1c368078d1 power: Remove mutex to hints
* No longer needed.

Change-Id: I09fc90b4e5399b3f3b8a409edf3f57361da90100
2023-10-29 22:13:01 +00:00
Rashed Abdel-Tawab
cd6e36030a power: Remove unused arg from power_hint_override/set_interactive_override
Change-Id: If45b59915022b563d4c5c9bf454b02b431a97833
2023-10-29 22:13:01 +00:00
Nikhil Kumar Kansal
6192115442 power: qcom: powerHal for sdm455
Power hal changes for sdm455

Change-Id: I14923ff92c27b442a5e2a87978b592d3cd766785
2018-10-16 14:28:43 +05:30
Vara Prasad A V S G
22f9da37bd VNDK: Added required libs
Change-Id: I445c8a096b91d79a629beeca12234ca0d3aaa200
2018-06-12 16:51:26 +05:30
David Ng
ee7c4c5831 Relocate power HAL from device/qcom/common
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
2018-05-24 00:32:16 -07:00