Jimmy Shiu
53f1fc4eee
sm6375-common: power-libperfmgr: Make HintManager a singleton class
...
HintManager is unique and widely used in many different components.
This is for making it easiler to be reloaded for debugging.
Bug: 172285365
Test: adb push \
out/target/product/raven/data/nativetest64/libperfmgr_test/libperfmgr_test \
/data/nativetest64/libperfmgr_test/libperfmgr_test && \
adb shell /data/nativetest64/libperfmgr_test/libperfmgr_test
Change-Id: I3affdfe780073ebbc50fac7bfbdd1530ee9dc8c2
2024-07-18 20:16:00 +05:30
Wei Wang
4bdcfc21e1
sm6375-common: power-libperfmgr: Add global debug property for override config path properly
...
An init trigger would restart powerhal as early as the property was
loaded and it is hopefully early than any clients would try to connect.
Also remove the obsolete restart hook with audio.
Bug: 218872105
Test: boot
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: Ib55897f65709a963016b729f213718aae5af8e8c
2024-07-18 20:16:00 +05:30
Jimmy Shiu
412dc73d54
sm6375-common: power-libperfmgr: Add a debug property for switching powerhint.json path
...
Add a bool property `vendor.powerhal.config.debug`.
Power HAL would use `/data/vendor/etc/powerhint.json` when vendor.powerhal.config.debug = true.
Bug: 218872105
Bug: 206061061
Test: adb wait-for-device root; adb shell mkdir -p /data/vendor/etc/;
adb push powerhint_mod.json /data/vendor/etc/powerhint.json
Test: adb shell setprop vendor.powerhal.config.debug true && \
adb shell getprop vendor.powerhal.config.debug && \
adb shell stop vendor.power-hal-aidl && \
adb shell start vendor.power-hal-aidl && adb shell stop && adb shell start
Test: adb pull /data/local.prop ; vim local.prop
+ vendor.powerhal.config.debug=true
Test: adb wait-for-device root && adb shell perfetto -o \
/data/misc/perfetto-traces/trace_file.perfetto-trace -t 20s sched freq \
idle am wm gfx view power hal && \
adb pull /data/misc/perfetto-traces/trace_file.perfetto-trace trace_profile_debug.pftrace
Change-Id: Ibaf5df280b989a8268efce1e3ab9a3f1e5510800
2024-07-18 20:16:00 +05:30
Wei Wang
7bfee27a4b
sm6375-common: power-libperfmgr: Fix objects that are derived from refbase
...
Fixes: ag/14313466
Bug: 177493042
Bug: 191163855
Test: Build
Change-Id: I94812997a8214b77a2e1d0bcf90ef62205c5adf6
Signed-off-by: Wei Wang <wvw@google.com>
2024-07-18 20:16:00 +05:30
Jimmy Shiu
d01fb0826f
sm6375-common: power-libperfmgr: ADPF: use PID algorithm to control cpu resource
...
The patch includes:
1. Move from folder adpf to aidl.
2. Add PowerSessionManager class to maintain hint status.
And PowerHintMointor looper thread for monitoring or updating
PowerHintSession status.
3. Use PID algorithm to replace the step-wise alogrithm for cpu resource
control.
Test: build, boot to home, trace analysis
Bug: 177493042
Change-Id: Ib7d3f414225b18954350341ca22b7be87a6202e7
2024-07-18 20:16:00 +05:30
Jimmy Shiu
8ac355cf49
sm6375-common: power-libperfmgr: add PowerHintSession for ADPF implementation
...
Adapted from PoC from ag/13100800
Added more ATRACE for further tuning and debug
Test: APPPID=$(adb shell pidof com.prefabulated.touchlatency); watch -n
1 adb shell grep uclamp /proc/${APPPID}/sched
Test: atest VtsHalPowerTargetTest
Bug: 177492680
Change-Id: I6bfd61b21dc1cde04f6ba9ae8d3533cd263ad814
Signed-off-by: Wei Wang <wvw@google.com>
2024-07-18 20:16:00 +05:30
Wei Wang
79dc67e98c
sm6375-common: power-libperfmgr: add a property for config file
...
Test: build
Bug: 173222103
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I14e7e0aa349e446f6889cbfc9a914f5314438e6b
2024-07-18 20:16:00 +05:30
Wei Wang
adf7076162
sm6375-common: power-libperfmgr: rename namespace for Pixel power HAL
...
Bug: 152811907
Test: Build
Change-Id: I6848e929d8a26b540fcee9145376b896c3cd9799
2024-07-18 20:16:00 +05:30
Wei Wang
3a0fabd235
sm6375-common: power-libperfmgr: allow powerhint calls as soon as service starts
...
Bug: 147840817
Test: boot
Change-Id: Ic1d6e04109683b999bb99484930e95dc9813fc59
2024-07-18 20:16:00 +05:30
Wei Wang
a1435fd888
sm6375-common: power-libperfmgr: add aidl extension server
...
Bug: 151896829
Test: boot flame
Change-Id: Ie951008cabe2a5680fbc546a21bdc9a428864ef9
2024-07-18 20:16:00 +05:30
Anand S
544a50cef7
sm6375-common: power-libperfmgr: Adapt and rebrand to moto_sm6375
...
Change-Id: I6732e0076564ada7078c9334b62fb865d473accd
2024-07-18 20:16:00 +05:30
Anand S
c40ef4df34
sm6375-common: Import Pixel libperfmgr AIDL Power HAL
...
Change-Id: Ibec82206ac2b070bdcb88213d98f6cc35109ea4f
2024-07-18 20:16:00 +05:30