Commit Graph

13 Commits

Author SHA1 Message Date
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
Michael Bestas
069801dcb7 power: Remove HBTP support
* Not used

Change-Id: Ib8e9f51fe92c0bce8cde3ee7c7960c1dac740d35
2023-10-29 22:13:01 +00:00
Michael Bestas
d526c7c49c power: Rename power-8952.c to power-8937.c
* Latest power-8952.c is used for msm8937 with mpctl V3.
  Rename the file to reflect msm8952 is no longer supported.

Change-Id: Iccd2a3c0abed2ef10d5f6c2182c0509a2fbe611d
2023-10-26 16:40:36 +03:00