Commit Graph

42 Commits

Author SHA1 Message Date
Sebastiano Barezzi
fecaf7f077
aidl: light: Rebrand to Xiaomi
Change-Id: I68a6ea1ab63a5581fa05e5490ef1cc86cc38741e
2022-02-07 15:47:57 +01:00
Sebastiano Barezzi
5b0631944d
aidl: light: Initial stub service
* Made with aidl-gen

Change-Id: I517ddd2222cb937c02298d0972b8abf0ffc24fd6
2022-02-07 15:47:57 +01:00
Jimmy Shiu
8fb3a9d722
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
2021-10-18 23:40:43 +02:00
Jimmy Shiu
0f740ec5ef
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
2021-10-18 23:40:43 +02:00
Jimmy Shiu
fe6cde1c96
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
2021-10-18 23:40:43 +02:00
Jimmy Shiu
a9e7626ffb
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
2021-10-18 23:40:43 +02:00
Wei Wang
3f7fdd8623
Add PID tunables for sample window
Bug: 191480755
Test: Build
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: Id559796ee4a423410148b8c2df0524909658af82
2021-10-18 23:40:43 +02:00
Jimmy Shiu
d3bc3b8b6f
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
2021-10-18 23:40:43 +02:00
Wei Wang
63fca5e797
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
2021-10-18 23:40:43 +02:00
Wei Wang
7c42612574
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
2021-10-18 23:40:43 +02:00
Wei Wang
b3ea64c377
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>
2021-10-18 23:40:43 +02:00
Jimmy Shiu
8a20bda9e4
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
2021-10-18 23:40:43 +02:00
Wei Wang
9fd3926d5f
power: 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
2021-10-18 23:40:43 +02:00
Jimmy Shiu
3a50977117
power: 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>
2021-10-18 23:40:43 +02:00
Jeongik Cha
9cdb8059e5
Specify version for aidl_interface explicitly
Bug: 150578172
Test: m
Change-Id: I4a9bf218b92252403e9ebbe8f89b10ee1899283f
2021-10-18 23:40:43 +02:00
Wei Wang
8960cfb7b5
power: add a property for config file
Test: build
Bug: 173222103
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I14e7e0aa349e446f6889cbfc9a914f5314438e6b
2021-10-18 23:40:43 +02:00
Wei Wang
6dd09e9ded
Power: advertise power headers are deprecated
Test: Build
Bug: 169065024
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I3cef3aff4bb2394571a3de13e535283722c308ed
2021-10-18 23:40:43 +02:00
Wei Wang
b51c3e681f
Power: 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
2021-10-18 23:40:43 +02:00
Arian
4ae5975c9a
Revert "power-libperfmgr: simply wait if idle state node is not present"
This reverts commit 297888275a.

Change-Id: Iefee44a1f407729e76cb693832bad4998141c42b
2021-10-18 23:40:31 +02:00
Stefanie Kondik
d865b86327 power-libperfmgr: Add support for tap-to-wake feature control
[wight554] Enable DOUBLE_TAP_TO_WAKE mode explicitly and move dt2w mode on top of setMode switch: when LAUNCH hint is received, if mSustainedPerfModeOn is not true, it will not break, leading to the case switch going through all the next labels without interrupting until the end, also hitting DT2W one, leading to DT2W always toggling when you launch an app
[SebaUbuntu] Don't break devices using hint manager for DT2W toggle

Change-Id: Ib6e1e010834b1b16668d52db79b26804fe0e1671
2021-06-23 16:36:32 +02:00
LuK1337
f05aff1088 power-libperfmgr: Guard it
This is needed so that other devices not using the power AIDL HAL
(read: not importing relevant Pixel namespaces) can still be buildable.

Change-Id: I089df179c882450281e73c4ce0f8cabb7018ab0d
2021-04-20 09:41:50 +01:00
LuK1337
2182dd8add power-libperfmgr: Allow device specific hooks for setMode, isModeSupported
* Some devices may want to implement custom hooks

Change-Id: Icb2d66471ec649a69b1e69849fd86282775052cb
2021-04-18 22:39:12 +01:00
Jesse Chan
0cc25a1b4f power-libperfmgr: remove Google-specific VR and camera hints
Change-Id: Iac0e65a16f660583d3400a35622113d35d8d1d27
2021-04-18 22:39:12 +01:00
Jesse Chan
297888275a power-libperfmgr: simply wait if idle state node is not present
Change-Id: I93dd97e5437761d2d969f93a5af0cae864fd0a65
Signed-off-by: Jesse Chan <jc@lineageos.org>
2021-04-18 22:39:12 +01:00
Kyle Lin
317828378a 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
2021-04-18 22:39:12 +01:00
Kyle Lin
b0464fceaf 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
2021-04-18 22:39:12 +01:00
Wei Wang
8e41597e83 power-libperfmgr: rename namespace for Pixel power HAL
Bug: 152811907
Test: Build
Change-Id: I6848e929d8a26b540fcee9145376b896c3cd9799
2021-04-18 22:38:42 +01:00
Wei Wang
9e3e1e7bc8 power-libperfmgr: allow powerhint calls as soon as service starts
Bug: 147840817
Test: boot
Change-Id: Ic1d6e04109683b999bb99484930e95dc9813fc59
2021-04-18 22:38:42 +01:00
Wei Wang
18e667e58c power-libperfmgr: add aidl extension server
Bug: 151896829
Test: boot flame
Change-Id: Ie951008cabe2a5680fbc546a21bdc9a428864ef9
2021-04-18 22:38:42 +01:00
Wei Wang
3762d10196 power-libperfmgr: Hook with display handler
Bug: 147840817
Test: boot and check power hint
Change-Id: I9c0c98e76ef4b5f4756f63ed5122efc366737869
2021-04-18 22:38:42 +01:00
Bruno Martins
289283e2f8 power-libperfmgr: Import power HAL AIDL implementation
Based on implementation from hardware/google/pixel as of commit 0338a0e.

Change-Id: I3df57bd3e8298141272add55c911fb5eece9aebe
2021-04-18 22:38:40 +01:00
Bruno Martins
8790ded9b7 consumerir: Include VINTF fragment
Change-Id: I7a06e48b157d94862a6a3485c2dc41e6f17750dd
2020-12-18 09:52:40 +00:00
Mohammad Hasan Keramat J
ede4d68f03 consumerir: Remove libhwbinder and libhidltransport deps
These have been combined into libhidlbase.

Signed-off-by: Mohammad Hasan Keramat J <ikeramat80@gmail.com>
Change-Id: I17e94d1524747315d6ae64fc650e9e7d815628bb
2020-09-21 15:07:36 +02:00
Demon
7ef308ad4a hidl: Convert IR HAL into a native binderized HAL
Change-Id: I8ddae1ba36d5a9cc16f0937189ff250eff3e7935
2020-04-08 13:44:55 +01:00
Luca Stefani
9fc994f184 consumerir: Remove kernel headers dep
Change-Id: Ia374c7ab485c0446bb990528e94c7f5a59a7d827
2020-04-08 13:42:13 +01:00
Michael Zimmermann
c17f468977 common: Add OSS consumerir HAL
Change-Id: I9a48eb9c48a8b726f48ca6ce8c41d4e1b02036f5
2020-04-08 13:42:02 +01:00
Bruno Martins
6521d34433 interfaces: Update blueprints to reflect renamed repo
Repo android_device_xiaomi_common is now android_hardware_xiaomi

Change-Id: I2ad964dad3a20784cebdd5fb1f4db353efaa531d
2020-04-07 22:04:04 +01:00
XiNGRZ
b78b8dc49d
common: Import goodix HAL definitions
Change-Id: I989ed3920057728192536eeddde94e964692a4b6
2020-02-15 08:34:57 -05:00
TheScarastic
feecb1ae36
common: Import Xiaomi TouchFeature HAL definitions
Change-Id: I257a9e3b8187a9bb003a6e62b0e894e484230321
2020-02-15 08:34:57 -05:00
Pierre-Hugues Husson
e8d045dd0a
common: Import Xiaomi HAL definitions
Change-Id: I8ba524bc678101af129a3d2845737f7b18f27514
2020-02-15 08:34:42 -05:00
dianlujitao
913a3de1ef
common: Define soong namespace
* Avoid conflicts with PRODUCT_COPY_FILES rules in case maintainers
   want to use the prebuilt one.

Change-Id: Ied4815af38ab50fd2798e83195c71540b48aa29f
2020-01-31 19:54:58 -05:00
Kevin F. Haggerty
7665d100b8
Initial Commit 2019-12-31 08:22:21 -07:00