Commit graph

578 commits

Author SHA1 Message Date
Jimmy Shiu
fe3d88452b
sm6375-common: power-libperfmgr: ADPF: fix no boost due to the big negative ILowLimit
Tuning the PID control loop as the below:
ILowLimit: -512 -> -120
kPOver: 2->5
kPunder: 2->3
kDOver: 1->5
kDUnder: 0->0

Bug: 193165816
Test: cuj/youtuble, cuj/facebook, PtsUiBench
Change-Id: Icc1a9a8d04004f60e47cabb7c4131ea67585be53
2024-07-18 20:16:00 +05:30
Jimmy Shiu
20db3354f7
sm6375-common: power-libperfmgr: ADPF: avoid to call close() twice
To get rid of error logs, avoid to call close() twice.

07-29 17:20:35.341 E powerhal-libperfmgr: Unexpected Error! Failed to
look up tid:2585 in TidRefCountMap
07-29 17:20:35.341 E powerhal-libperfmgr: Unexpected Error! Failed to
look up tid:2586 in TidRefCountMap
07-29 17:20:35.341 E powerhal-libperfmgr: Unexpected Error! Failed to
look up tid:2031 in TidRefCountMap
07-29 17:20:35.341 E powerhal-libperfmgr: Unexpected Error! Failed to
look up tid:2585 in TidRefCountMap

Bug: 194775170
Test: build and check log.
Change-Id: I91adf907b837382f68935b9054e19465a499049c
2024-07-18 20:16:00 +05:30
Jimmy Shiu
0515fc6f25
sm6375-common: power-libperfmgr: ADPF: fix abnormal high uclamp
"GPU completion" task inherits a high uclamp value from RenderThread.
But it's not in the ADPF thread list, so it remains a high uclamp value.
Use SetTaskProfiles("ResetUclampGrp") and
SetTaskProfiles("NoResetUclampGrp") to manage the uclamp_fork_reset for
tasks.

Bug: 191973176
Bug: 192149875
Test: vendor/google_testing/pts/tests/common/utils/perf/run_pts/jank_test.sh
Test: adb shell cat /proc/vendor_sched/dump_task
Change-Id: I6aed171e88c0a6db5f762e7c791344bb3f4b7a90
2024-07-18 20:16:00 +05:30
Jimmy Shiu
17a4a4abb8
sm6375-common: power-libperfmgr: Adpf: set uclamp when session is created
When seesion is created, set uclamp to boost CPU for top-app.

Bug: 192143316
Test: Build and run UiBenchSlowNestedRecyclerViewInitialFlingMicrobenchmark test
Change-Id: I748037019fae439ab1863a5ed21aa98b9d26e0dc
2024-07-18 20:16:00 +05:30
Wei Wang
c3ec3fccba
sm6375-common: power-libperfmgr: Add PID tunables for sample window
Bug: 191480755
Test: Build
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: Id559796ee4a423410148b8c2df0524909658af82
2024-07-18 20:16:00 +05:30
Jimmy Shiu
c64f218687
sm6375-common: power-libperfmgr: adpf: clean up ADPF trace points
clean up ADPF trace points and use vendor.powerhal.adpf.uclamp.boost_cap
instead of vendor.powerhal.adpf.uclamp.cap_ratio.

Bug: 191551452
Test: build
Change-Id: I457710b1bd9a7adbb55749d7bb915c736dde2751
2024-07-18 20:16:00 +05:30
Wei Wang
d955e9499b
sm6375-common: power-libperfmgr: Adpf: honor window setting for P,D caculation
Also change default window setting to 0

Bug: 191409203
Test: Build
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: Ieadf50a64e795d9942373c411189adf9daaee779
2024-07-18 20:16:00 +05:30
Wei Wang
e5e88cf477
sm6375-common: power-libperfmgr: improve adpf logic
Cache active state and reduce log spam
Add value tracing into libperfmgr
Use adaptive stale timeout based on rate limit

Bug: 191331719
Bug: 191296994
Bug: 177493042
Test: boot
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I1c1484c9277209bf68bd287ceae83e2b37684c62
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
Wei Wang
de42f91c95
sm6375-common: power-libperfmgr: reduce log spam and refine trace title
Add bunch of TODO for team as well.

Test: build
Bug: 177492680
Bug: 185368789
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: Ic1d5ecea10a60b23343866cd62519fda37bd6ec5
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
Jeongik Cha
582d354820
sm6375-common: power-libperfmgr: Specify version for aidl_interface explicitly
Bug: 150578172
Test: m
Change-Id: I4a9bf218b92252403e9ebbe8f89b10ee1899283f
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
6544285109
sm6375-common: power-libperfmgr: advertise power headers are deprecated
Test: Build
Bug: 169065024
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I3cef3aff4bb2394571a3de13e535283722c308ed
2024-07-18 20:16:00 +05:30
Wei Wang
c3dad50ec4
sm6375-common: power-libperfmgr: add support for devices without display idle signals
To workaround b/141025174, adding support for devices without display
idle signals. Also added a property to override idle display function.

Besides the idle signal support, this CL also makes touch boost duration
tunable through several new vendor properties. It also named display
idle monitor thread and cleans out the obsolete HIDL Power HAL
implementation.

Bug: 168080943
Bug: 169065024
Bug: 171494137
Test: Boot and trace
Change-Id: I76067d10958654d539624ec4cac8f346103e67bc
2024-07-18 20:16:00 +05:30
Stefanie Kondik
3223436585
sm6375-common: power-libperfmgr: Add support for tap-to-wake feature control
Change-Id: Ib6e1e010834b1b16668d52db79b26804fe0e1671
2024-07-18 20:16:00 +05:30
Jesse Chan
250e9ff625
sm6375-common: power-libperfmgr: remove Google-specific VR and camera hints
Change-Id: Iac0e65a16f660583d3400a35622113d35d8d1d27
2024-07-18 20:16:00 +05:30
Kyle Lin
2ae9846959
sm6375-common: libperfmgr.rc: let power hal start early
Bug: 162791243
Bug: 72471476
Test: build and using emul temp/running burn8 to verify it
Change-Id: I5ca475be8b73b940e4858634595a7918ae92f6ef
2024-07-18 20:16:00 +05:30
Kyle Lin
1790dd61dd
sm6375-common: libperfmgr.rc: let perfmgr can change dex2oat priorities
Because perfmgr is a vendor process, it cannot adjust system priority
directly.

Bug: 162791243

Test: build and using emul temp/running burn8 to verify it
Change-Id: I55e49cb7d0b2d4c0e42dff8398b5d42c6546cafa
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
Wei Wang
07e98fde3f
sm6375-common: power-libperfmgr: Hook with display handler
Bug: 147840817
Test: boot and check power hint
Change-Id: I9c0c98e76ef4b5f4756f63ed5122efc366737869
2024-07-18 20:16:00 +05:30
Anand S
1c6d7e3c10
sm6375-common: Build power-libperfmgr
Change-Id: Icada887bc2f414c6e41d81361762a86332df1aee
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
LuK1337
e136267d24
sm6375-common: init: Drop I/O prefetcher
This depends on the already removed QTI perf stack.

Change-Id: I10e0f26481cfa13994dab2370d9f9fb8a073cdc8
2024-07-18 20:16:00 +05:30
Wei Wang
d8ec9a75c6
sm6375-common: Remove QTI perfd
Bug: 69270928
Test: Build and boot device and test camera
Change-Id: I87b283206f462fb5c8ec9cdd303ae2934fe9bfc4
2024-07-18 20:16:00 +05:30
Miguel de Dios
e7be3c83e4
sm6375-common: Change readahead to 128KiB on post-boot
Reduce readahead from 512KiB to 128KiB to reduce thrashing when we
have a lot of apps running.

Bug: 110908295
Bug: 80426378
Test: manual - device boots
Test: manual - check app launch does not take long
Test: cts-tradefed.sh run cts -m CtsCameraTestCases
Change-Id: I59c1f2f8a6fbb5e0d956ba07a40a2bfac3b61481
2024-07-17 19:38:04 +05:30
Lokesh Gidra
3586166e3f
sm6375-common: Use 4GB dalvik-heap config
Change-Id: I086d4a5c09634c3c7bd51ec5d08dcaa1551511b4
2024-07-17 12:56:42 +05:30
Anand S
33518c1389
sm6375-common: Drop prebuilt libqsap_sdk
* Already being built from source.

Change-Id: I231d1eb694ae609cb6cc8ba45166edec29c52eb1
2024-07-17 12:56:42 +05:30
Anand S
6cc0c8c16c
sm6375-common: overlay: Drop 6GHz band support
* We don't have support for this in our devices.

Change-Id: I181aa3d55e1f155bc3c27c59df29f6f6d0f20b1d
2024-07-16 12:56:42 +05:30
Anand S
db32b03c66
sm6375-common: Disable HDR related props
* We don't use HDR supporting displays on bangkk or fogos.

Change-Id: Ib4890bcf2fe4001876fc84a352b9eab6a199830e
2024-07-16 12:56:42 +05:30
Anand S
3addce0935
sm6375-common: sepolicy: Allow hal_health_default to access sysfs
Change-Id: I5d09337f045ee6f523d6b534113f4b563f7f1e23
2024-07-16 12:56:42 +05:30
Anand S
bfce9c1935
sm6375-common: sepolicy: Label goodix fingerprint init service
Change-Id: I4d8ac2418fcd44473a6ff0077208b3792d774520
2024-07-16 12:56:42 +05:30
UtsavBalar1231
397da7dd83
sm6375-common: sepolicy: Allow setting read_ahead_kb on /data partition
Change-Id: I2ac458dfcad8bb51b3c25da9dc03bdea91540ca3
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
2024-07-16 12:56:42 +05:30
Sevenrock
3969c8d426
sm6375-common: sepolicy: Allow system_server to read vendor_sysfs_battery_supply
Change-Id: Iac8be40b8cc928a378d415f5c36e0cef249c3aab
2024-07-16 12:56:42 +05:30
Jack Pham
e61118e7a9
sm6375-common: sepolicy: Allow init (recovery) to access USB sysfs
Add genfs contexts for USB sysfs entry that control the operational
mode and assign them as vendor_sysfs_usb_device type.

Change-Id: Ic1f0c5e9237848ac47cebca6e2cbbe9bd25270ad
2024-07-16 12:56:42 +05:30
Julian Veit
2753c420ea
sm6375-common: sepolicy: Allow bootanim and surfaceflinger call vendor_hal_qspmhal_default
Original patch:
df6b106517

Change-Id: I70e2fb64d94ce551b751028ff04af6ed95f68f09
2024-07-16 12:56:42 +05:30
Julian Veit
1c172dc934
sm6375-common: sepolicy: Allow Don't audit system_server access sysfs
Original patch:
119dca5600

Change-Id: Ib87c05d9e2bf7c5d90a43e6e67376add49ec4898
2024-07-16 12:56:42 +05:30
Julian Veit
69b10c73af
sm6375-common: sepolicy: Allow system_server to read sysfs
Original patch:
7c6511ebe5

Change-Id: I1f4283c9bdfea286a268ccb027229b05ff45333b
2024-07-16 12:56:42 +05:30
Julian Veit
782f2994b9
sm6375-common: sepolicy: Allow vendor_hal_perf_default ro access to sysfs
Original patch:
3e30e78ca0

Change-Id: I29004d6c688aafb107e2c50037740a347e5e7694
2024-07-16 12:56:42 +05:30
Anand S
baebac18de
sm6375-common: vintf: Add missing manifest entries
* Rearrange some uprevs while we're at it.

Change-Id: Idc178dba3ec3e47dcdd698215a15a30fcd9bfb5b
2024-07-16 12:56:42 +05:30
Anand S
a775932992
sm6375-common: FCM: Add missing radio entries
* I servicemanager: Could not find android.hardware.radio.data.IRadioData/slot1 in the VINTF manifest. No alternative instances declared in VINTF.
* I servicemanager: Could not find android.hardware.radio.messaging.IRadioMessaging/slot1 in the VINTF manifest. No alternative instances declared in VINTF.
* I servicemanager: Could not find android.hardware.radio.modem.IRadioModem/slot1 in the VINTF manifest. No alternative instances declared in VINTF.
* I servicemanager: Could not find android.hardware.radio.network.IRadioNetwork/slot1 in the VINTF manifest. No alternative instances declared in VINTF.
* I servicemanager: Could not find android.hardware.radio.sim.IRadioSim/slot1 in the VINTF manifest. No alternative instances declared in VINTF.
* I servicemanager: Could not find android.hardware.radio.voice.IRadioVoice/slot1 in the VINTF manifest. No alternative instances declared in VINTF.
* I servicemanager: Could not find android.hardware.radio.ims.IRadioIms/slot1 in the VINTF manifest. No alternative instances declared in VINTF.

Change-Id: I909045ff3cf54c36b577c8e41807508af39d367b
2024-07-16 12:56:42 +05:30
Anand S
f2321d6463
sm6375-common: Add missing AIDL/HIDL FCM entries
* Also rearrange and uprev entries while we're at it.

Change-Id: I4de4ea112831448e58d73634605b9bcb950a60af
2024-07-16 12:56:42 +05:30
Anand S
df31270d2f
sm6375-common: Drop unused packages and permissions
Change-Id: I6a5e807dc1f2ff8730274dd5715534513cf36d81
2024-07-16 12:56:42 +05:30
Anand S
23ad6edd96
sm6375-common: Adjust kernel cmdline for moto_sm6375
* Values taken from unpacked boot.img.

Change-Id: Idd8acda89f39ed3f4581d69a4f57459c9266d1c3
2024-07-16 12:56:42 +05:30
Michael Bestas
263f49d80e
sm6375-common: Build fastboot custom HAL
* This adds getprop functionality in fastbootd.

Change-Id: I4906f6e9dcc00d37a7fa97e0139ba536f00755fa
2024-07-14 20:41:27 +05:30
Anand S
abf9c1dc4b
sm6375-common: Build missing hidl/hals
Change-Id: I472f836e4966c8d75b6901f735d451594400ffe2
2024-07-05 12:56:42 +05:30