Commit Graph

162 Commits

Author SHA1 Message Date
luk1337
8a55af6b3c
touch: Make HIGH_TOUCH_POLLING_PATH configurable via Soong flag
Change-Id: I7649e084b2604c46f47c07c355913720935e1298
2022-05-13 18:02:35 +02:00
Ramii Ahmed
b1f26c0899
hidl: Implement vendor.lineage.touch@1.0 HAL for Xiaomi
* This can be used by any Xiaomi device that has a touch display that supports multiple sample rates and Xiaomi touch.
* Most newer Xiaomi phones with high screen refresh rates fit this category:
* e.g. Mi 10/Pro/Ultra/T/T Pro, Xiaomi SM8350 platform phones & Xiaomi SM6375 phones

Change-Id: Iaf956420157bbc978690fac9053d507ccaea847a
2022-05-13 18:02:35 +02:00
LuK1337
9291711cb7
powershare: Change fallback enable value to 0
Some variants don't support wireless charging, thus this file is
missing. Ideally we wouldn't run powershare at all on them, but this is
still an improvement.

Change-Id: Ie58aaac2a73055d8d2cfe7a73b9b479493eb2bcf
2022-05-13 18:02:35 +02:00
Bruno Martins
7168cbff7f
hidl: powershare: Use pragma once
Change-Id: I9cfeed5e79c35139f7532c522dad0ca25ed35fe1
2022-05-13 18:02:35 +02:00
LuK1337
8a05be348b
powershare: Treat non-zero value as enabled
On SM8350, we use trx_online to determine whether PowerShare is enabled.

Change-Id: I62d7448e6337696867a264cfd521379b53fe61f9
2022-05-13 18:02:35 +02:00
LuK1337
04053365b2
powershare: Make WIRELESS_TX_ENABLE_PATH configurable via Soong flag
Change-Id: I73a42f167c9d332f05e23bd00db19c0a1f9fe672
2022-05-13 18:02:35 +02:00
LuK1337
ac68cfefd7
hidl: Implement vendor.lineage.powershare@1.0 HAL for Xiaomi
* This feature is present in Xiaomi Mi 10/Pro/Ultra and for the Xiaomi
   family of SM8350, LAHAINA devices.

Change-Id: Icabcee87980611d97a837f86a52d94033de337ef
2022-05-13 18:02:35 +02:00
Arian
c6a4249c37 Revert "megvii: Initial stub libraries"
This reverts commit b7dadebefe.

Reason for revert: This does not work properly and causes duplicated targets for devices not using this shim.

Change-Id: Ia9b448e0b66c0a09965c21e2cb8d6b1071eff293
2022-05-11 10:23:06 +02:00
Sebastiano Barezzi
b7dadebefe
megvii: Initial stub libraries
* Our camera HALs just needs mg_facepp, which is a struct containing some functions

Change-Id: Id931f767e327cf69b5c7264a8ad0bd335488ec12
2022-05-09 23:23:32 +02:00
Bruno Martins
3b1a4a69d1 IFAAService: Move from FOD to UDFPS naming convention
Change-Id: I21aaa718fa33a948a093ac6bb75ac0d63caad213
2022-05-05 18:08:27 +01:00
Sebastiano Barezzi
aaa03ac503 interfaces: mtdservice: Initial dump
Change-Id: Ia5ffacba35c510baac18f59a47bd036e2e656c51
2022-05-05 10:27:08 +01:00
Sebastiano Barezzi
8d12cc29c6
IFAAService: Mark processCmd param as inout
Change-Id: I629b424e291abaa47207e057972aa41171f28327
2022-05-04 10:31:01 +02:00
Sebastiano Barezzi
5eb7d26c52
IFAAService: Initial implementation
Co-authored-by: Art_Chen <chenxy0201@qq.com>
Co-authored-by: dianlujitao <dianlujitao@lineageos.org>

Change-Id: Ia238f3e82e6366e72de4629b31864d0503dd1a03
2022-05-01 14:40:44 +02:00
Sebastiano Barezzi
3a96526fa5
interfaces: mlipay: Initial dump
Change-Id: Icee47bb40946f4d142f4e0edf2cdc50783e68fad
2022-04-14 20:27:56 +02:00
Sebastiano Barezzi
9838535a1f
interfaces: hw: touchfeature: 1.0: Add
Change-Id: I8cbf499ad72a2333bd7cc392474a30c8a2af5a67
Signed-off-by: Sebastiano Barezzi <barezzisebastiano@gmail.com>
2022-03-19 08:47:35 +01:00
Sebastiano Barezzi
8704be1ae1 interfaces: displayfeature: 1.0: Update
Change-Id: Iaa192a481702c876722864b6a4f1f54f495622c9
Signed-off-by: Sebastiano Barezzi <barezzisebastiano@gmail.com>
2022-03-04 16:22:04 +00:00
Sebastiano Barezzi
410e126e08 interfaces: Run updates-makefiles.sh
Change-Id: Id8ad5983bc7886cb24763a8fe8a7460a8609f927
2022-03-04 16:21:05 +00:00
Bruno Martins
1bb66f6898 interfaces: Split between vendors
This should make updates-makefiles.sh usable.

Change-Id: I118fcb1bcbed290eb894f92c058269189f2dde84
2022-03-04 16:19:57 +00:00
BeYkeRYkt
2d6bc53b95
aidl: light: Don't scale RGB brightness if alpha is 0
* Fixes custom LED colors

Change-Id: I14150292a0a3d8411a26e45f8a4fa4b40f3101b7
2022-02-07 15:47:57 +01:00
Sebastiano Barezzi
f162d20b5b
aidl: light: Wire up
* Merged Xiaomi SM8250, SM8150, SM6250, SDM710 and MSM8953 implementations

Change-Id: I16764ec8676de6c2a9f745876dddab75db6adf35
2022-02-07 15:47:57 +01:00
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