Commit graph

45 commits

Author SHA1 Message Date
Pointer Kung
3ab80ee3ad powerhint.json: Reset max_load_balance_interval for camera
Temporary workaround to avoid potential power problems.

Bug: 353147579
Test: Build pass, Boot to home, Power improvement measurement
Flag: EXEMPT bugfix
Change-Id: I882599c19abe8a818669c5ae320ab77f833c7b31
2024-07-31 08:32:15 +00:00
Paulsu Su
35144d5384 powerhint: Enable PA_KILL during PA_KILL_BOOST
Port from ag/27949358 and ag/28274083

Currently, we enable PA_KILL always on camera launch. This CL puts this
feature behind a power boost profile which can only be triggered from
camera hal and is controlled by a mendel flag.

Bug: 356005553
Change-Id: I09ca12244c031524b8b99f8f8dc888ef7781cd08
Test: boot to home
Flag: EXEMPT resource only update
2024-07-31 02:48:20 +00:00
Paulsu Su
aa58050f50 thermal: remove PMU_POLL control for game mode and disable LIGHT tier throttling when gaming
Port from ag/26822605, ag/26653806

We already have the CPU scheduler optimization for game mode to sustain
the power and perf, so remove the CPU thermal policy at lower
temperature to avoid the interfence on CPU scheduler.

Port from ag/26822605

We already have the CPU scheduler optimization for game mode to sustain
the power and perf, so keep PMU_POLL being disabled to avoid the interference on CPU scheduler.

Bug: 342968374
Change-Id: Icafaa731abe0541fbd40c6e4501c13ee09803175
Flag: No flag needed for config file
Test: boot to home
2024-07-29 03:50:53 +00:00
Paulsu Su
3397733574 Set big core to group_cfs_skip_mask for sys group by default
port from ag/27511024

Let sys group tasks will run less in big core by default.

Bug: 342968374
Change-Id: I3ba6f469caa4d0ddfdf2963182ebde53eba9d009
Test: build pass
2024-07-18 03:36:04 +00:00
Paulsu Su
8f17091791 powerhint: Enable auto migration margins/dvfs headroom for game mode
Port from ag/27002783

Since the system is more reactive now when tasks are getting busier, set
DownRateLimitUs to 500us to avoid increasing power.

Also enable pertask iowait boost as util_avg will always start from
0 for forked tasks and this could impact io tasks that need additional
help to ensure to migrate to bigger core if they need more perf.

Bug: 353256081
Test: Local Genshin test
Flag: NONE powerhint change does not support flags

Change-Id: If08486732e8213a9d82982f305c42748cf002543
2024-07-17 09:20:33 +00:00
Paulsu Su
ed7eb0272a powerhint: Add nodes to control per-task iowait boost
Port from 27901981

It's disabled by default.

Ensure camera and game mode explicitly disable it too as it is only
required when auto margins are enabled for now.

Ensure it is disabled when screen is off too as We don't want io
activities to cause wake up on bigger cores while screen is off.

Bug: 353256081
Test: Local Genshin test
Flag: NONE powerhint change does not support flags

Change-Id: Ic4ec943181885be2a788c2b8754e814826abdd24
2024-07-17 09:20:33 +00:00
Paulsu Su
9f7a17064a powerhint: Add nodes required to enable auto migration margins/dvfs headroom
Port from ag/26990115

Everything should be disabled by default.

Make sure camera and game explicitly disable them by default too.

Ensure the feature is disable when screen is idle.

Bug: 353256081
Test: Local Genshin test
Flag: NONE powerhint change does not support flags

Change-Id: I1425653c56a11b43219771961a5dc24b47b40421
2024-07-17 09:20:33 +00:00
Paulsu Su
4bc2decfb0 powerhint: Explicitly set DownRateLimitUs for camera
Port from ag/26990116

So that we can change the default values without impacting it.

Bug: 353256081
Test: Local Genshin test
Flag: NONE powerhint change does not support flags

Change-Id: I7ab645d85563bb6ebc418b8d424c3a4b4504b926
2024-07-17 09:19:57 +00:00
Pointer Kung
02f1389157 Powerhint tuning for photo capture
UClamp.min of all threads in top app is set to mid core max capacity during photo capture, which will dispatch them to big core.
Critical threads of photo capture will be interrupted due to their lower priority, while other cores idle.

To deal with this situation,
prefer_idle mask to big/mid cores can reduce the idle in mid cores.
UClamp.min on nice can set UClamp.min of photo capture critical threads to mid core max capacity, while others as zero,
this can make critical threads run on big core without frequently interrupted.
By applying this, photo capture latency can be reduced with slight change of power consumption.

Refer to ag/28118299

Bug: 345601796
Bug: 342502377
Test: Build pass, Boot to home
Flag: NONE powerhint change does not support flags
Change-Id: I86e36c64de4fe02e9c04171edbbc642cac1d0c3c
2024-07-15 04:17:34 +00:00
Treehugger Robot
04857dae80 Merge "Increase SPC thresholds based on the field data" into main 2024-07-11 03:54:18 +00:00
Kyle Lin
67e07b87ad powerhint: Raise minimum MIF frequency to 546 MHz during screen on
Test: Build and power measurement
Bug: 336872050
Flag: NONE powerhint change does not support flags
Change-Id: Ibb49621729f966a83bcbb77d611e0c0e78545805
2024-07-10 09:06:26 +00:00
Pointer Kung
889e8e588c Increase SPC thresholds based on the field data
Refer to ag/28174403 and ag/28179628

Bug: 350111391
Bug: 342502377
Test: Build pass, Boot to home
Flag: NONE powerhint change does not support flags
Change-Id: Ie5fc7c0e7c10b070bebbdca9af212fb0c1b310d7
2024-07-10 08:47:27 +00:00
Pointer Kung
d55b1dadcc Reduce CPUDVFSHeadroom for mid and big core (for 60fps and 240fps)
Reducing CPUDVFSHeadroom can help save power in 60fps and 240fps
use-cases once RT threads are enabled. Even without the RT patch
(ag/27725456), we can see savings without any impact to framedrop rate.

sync from ag/27765730 and ag/27778356

Bug: 342502377
Test: Build pass, Boot to home
Flag: NONE sync solution
Change-Id: Ib3ea575c8507c8e3ab331910176cb2245c1708fb
2024-06-18 08:11:11 +00:00
Pointer Kung
5df2fa3e01 Update PMU thresholds with PMU ignorance logic disabled
pa/2830448 removes the core ignorance logic in PMU and causes the
behavior of PMU to change. With the new PMU logic, we need to re-tune
all the SPC thresholds for camera use-cases. This CL adjusts SPC
thresholds accordingly, so that we do not have power regression once the
PMU change in the kernel is merged.

Refer to ag/27702721 and ag/27726436

Bug: 342502377
Test: Build pass, Boot to home
Change-Id: Ic8fd4eb4192774ba42e2cfbe5b567136c15a6357
2024-06-18 07:00:42 +00:00
Michael Williams
55c33641a6 Merge "Switch Faceauth FACE_UNLOCK_BOOST Power Hint to Mid Cluster" into main 2024-06-06 15:19:29 +00:00
Sam Paradis
5b406f3ebe Switch Faceauth FACE_UNLOCK_BOOST Power Hint to Mid Cluster
Faceauth is pinning to the mid-core for this device. Adjust the power hint to boost the appropriate cluster.

Bug: 329893113
Change-Id: I7b0f228a1ecac523fee5b5dd607f27f99a608411
2024-06-04 19:13:09 +00:00
Paulsu Su
c9a2bf6db9 powerhint: Set big core to group_cfs_skip_mask for sys group
sync from ag/27280353

Set big core to group_cfs_skip_mask for sys group when screen is off,
so that sys group tasks will run less in big core.

Bug: 342968374
Test: boot to home

Change-Id: I4456641e8e99c83573887c4a3b56ba484b490773
2024-06-04 01:54:23 +00:00
Paulsu Su
4951bdeabd Merge "powerhint: Set big core to cpu skip mask by default" into main 2024-06-04 01:24:02 +00:00
Paulsu Su
e3e0bcb6c9 powerhint: Disable auto prefer idle explictly for some conditions
sync from ag/26728408

Bug: 343134499
Test: boot to home

Change-Id: Ic4940816966ab342c46ade27b3f381f9ad47f5ba
2024-06-04 00:41:06 +00:00
Paulsu Su
3eba1a8f63 powerhint: Set big core to cpu skip mask by default
sync from ag/27232593

Bug: 343134499
Test: boot to home

Change-Id: I4255b5e05697ee4181f8b5c68b82ea6080fb733e
2024-06-04 00:39:21 +00:00
Pointer Kung
27af9addc4 Update camera related powerhint settings
sync from
- ag/26741141 [Project11] Update Project11 powerhint
- ag/27477178 [Project11] CPU scheduling update.
- ag/27120048 Reduce DVFSHeadroom to 1100 for CAMERA_STREAMING_STANDARD
- ag/26555645 Change CPU UtilThreshold, DVFSHeadroom, CDPreferHighCap for Video Call

Bug: 342502377
Test: Build pass, Boot to home, GCA
Change-Id: I7411d6703f6e3e5b602a48413a7be101d0da2941
2024-05-28 10:27:25 +00:00
Pointer Kung
79263305ab [Camera] Change PMU max frequency for CL2 to 1164MHz
sync from ag/27327800 and ag/27350615

Bug: 342502377
Test: GCA
Change-Id: I21162cd593db199a25fa527d4a1879b3f4ea694b
2024-05-24 04:11:03 +00:00
Pointer Kung
1f3c427641 Enable PMU during photo capture
This CL enables PMU feature during photo capture. With the new settings, we can achieve up to 120ms saving in capture latency, while paying a penalty of 60mW. However, even with the added power, we are still below the F10 numbers (go/f10-camera-power-gtw).

Refer to ag/27238472 and ag/27255676

Bug: 342502377
Test: GCA photo capture
Change-Id: Iefe755e64e2e5bd6858f13adb4be7533c6b3e611
2024-05-24 04:00:08 +00:00
Pointer Kung
0efca5ac37 Disable CDPreferIdle, set DSUMin to 610MHz for 60fps
With MulticamRoutingNode on RT, the performance is no longer impacted by
having CDPreferIdle disabled. Additionally, this CL reduces DSUMin to
610MHz, saving overall up to 50mW in CPU power.

Refer to ag/27091363 and ag/27105186

Bug: 342502377
Test: Build pass
Change-Id: I49c8a5aad237c76582388545ff83d44d440d84a0
2024-05-24 03:52:17 +00:00
Pointer Kung
efae9635e1 Increase SPC thresholds for 60fps
This CL increase SPC threshold for little core to 55, and for mid core
to 32. Tests show that in a loaded scenario, framedrop rate can reduce
to almost zero, while not impacting the power in the unloaded (baseline)
scenario.

Refer to ag/27032799 and ag/27078536

Bug: 342502377
Test: Build pass
Change-Id: I9c50b58483cb5262c3550cb45907cbe522eb4e5a
2024-05-24 03:46:57 +00:00
Pointer Kung
f5e293b0e4 Increase SPC threshold for little and mid cores for CAMERA_STREAMING_STANDARD
SPC threshold is too low for both Little and Mid cores. This CL increases this
threshold to 55 for Little Core and to 30 for Mid core.
Test results show lower framedrop rate in presence of background load,
without having a negative impact on the power.

Refer to ag/26943567 and ag/27018139

Bug: 342502377
Test: Build pass
Change-Id: I593b9ca4f85e844ebacdb8606147d51c9d8926da
2024-05-24 03:42:13 +00:00
Pointer Kung
0b68622936 Increase TAUClampBoost during capture to reduce latency
Refer to ag/26943660 and ag/27007128

Bug: 342502377
Test: Build pass
Change-Id: I16bfd29cad1829ed74b6946e02b2bbb573037b51
2024-05-24 03:35:24 +00:00
Pointer Kung
cc8c9de464 Thermal Boost for severe thermal state
Refer to ag/26566748 and ag/26898080

Bug: 342502377
Test: Build pass
Change-Id: Icc5c6eb7963e7e9a26140738e068d556ca008bb9
2024-05-24 03:31:05 +00:00
Pointer Kung
7b1c1b2326 Powerhint: Enable big core reduction feature and CDPreferIdle, limit CPUset to 0-6, optimize MIF clock frequency
CAMERA_STREAMING_HIGH:
CPUSkipMask to 0x80
MemFreq to 1539000
Enable CDPreferIdle
CDCpuset to 0-6

CAMERA_STREAMING_STANDARD:
CPUSkipMask to 0x80
TAPreferIdle to 0
Enable CDPreferIdle
CDCpuset to 0-6

Refer to ag/26718992, ag/26787527 and ag/26710529

Bug: 342502377
Test: Build pass
Change-Id: Id1ba596588bf51c3847c0c5a9f9d72adc8888f19
2024-05-24 03:22:23 +00:00
Taeju Park
ea642c51c7 powerhint: add PMU_FORCE_LIMIT control knob am: 6d0a2a2851
Original change: https://googleplex-android-review.googlesource.com/c/device/google/tegu/+/27240564

Change-Id: I22ce6f7431a6243c1309e56ac66d7d5ee6ed27f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-10 19:21:08 +00:00
Taeju Park
6d0a2a2851 powerhint: add PMU_FORCE_LIMIT control knob
Bug: 335331630
Change-Id: I779d912c34d44b0afdc5e0ab9107dd6acfc268eb
Signed-off-by: Taeju Park <taeju@google.com>
2024-05-07 00:52:18 +00:00
Matt Buckley
05ea3376fc Add POWER_EFFICIENCY uclamp max to adpf config am: a91c6786f9
Original change: https://googleplex-android-review.googlesource.com/c/device/google/tegu/+/27163301

Change-Id: I2d469158db02bd00d95f7339760ebc71cd19859c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-30 21:59:20 +00:00
Matt Buckley
a91c6786f9 Add POWER_EFFICIENCY uclamp max to adpf config
Add the "UclampMax_EfficientBase" value to the ADPF config in the
powerhint.json to specify efficient core scheduling in the static
case, and "UclampMax_EfficientOffset" for the dynamic case, for this
device.

Bug: 277285195
Test: manual
Change-Id: I858da8b21739d946f21c9cdda2277f34723836f3
2024-04-30 18:29:24 +00:00
Taeju Park
b5a82d7a8c powerhint: remove lcpi paramter for PMU limit am: 3b9cfb2867
Original change: https://googleplex-android-review.googlesource.com/c/device/google/tegu/+/27120490

Change-Id: I5eaa4391de3b532860e6845b78dbf1cfe328915a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-26 21:27:43 +00:00
Taeju Park
3b9cfb2867 powerhint: remove lcpi paramter for PMU limit
PMU-based soft freq limit no longer use lcpi paramter

Bug: 295054083
Change-Id: I64d78680b42c8d757c023856af4ca31c13c120e9
Signed-off-by: Taeju Park <taeju@google.com>
2024-04-26 18:50:24 +00:00
Jimmy Shiu
1b726d318f powerhint: set ADPF CPU_LOAD_UP CPU_LOAD_RESET values am: ba7ecf114f
Original change: https://googleplex-android-review.googlesource.com/c/device/google/tegu/+/26900074

Change-Id: I63e273d82a784e4edc83b7e1511e28d4904b0a62
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-10 16:37:22 +00:00
Jimmy Shiu
ba7ecf114f powerhint: set ADPF CPU_LOAD_UP CPU_LOAD_RESET values
Bug: 329483662
Test: Manual Test
Change-Id: I01520f076b525af90317c43814084736a9cd4169
2024-04-10 11:45:12 +00:00
Jimmy Shiu
fbcd837321 powerhint: set uclampmin_init value for applying CPU Load boost am: f650b70797
Original change: https://googleplex-android-review.googlesource.com/c/device/google/tegu/+/26808828

Change-Id: I0b4b1a3045c121b0071344f0cc4a418534a16d81
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-03 04:19:42 +00:00
Jimmy Shiu
f650b70797 powerhint: set uclampmin_init value for applying CPU Load boost
Bug: 329483662
Change-Id: I833f25cec9776b5523f58b49b3cf88172a8ea399
Test: Manual Test
2024-04-03 01:04:41 +00:00
Paulsu Su
2911f28144 tegu: powerhint: align migration margin, dvfs headroom and other updates
powerhint: port changes from p23

- Add DISPLAY_CHANGE powerhint
- Add more boosts to LAUNCH_EXTEND
- Remove unused idle target residency settings

powerhint: port migration margin settings from p23

Bug: 316035859
powerhint: port dvfs_headroom settings from p23

Bug: 322000346

powerhint: revert dvfs_headroom settings for camera

Bug: 329905546

Change set preferred idle mask to top-app

Set default value to 0x7f to exclude big core for all priorities, but
restore high and mid to 0xff when app launch.
Bug: 248621289

Test: Boot to home
Bug: 330085013
Change-Id: Iab5c9534c0f59bc2cf6dff6e90b0b97fcfa8ebc1
2024-03-20 01:57:33 +00:00
Sam Paradis
610457c23f Change FACE_UNLOCK_BOOST to Maximize CPU Frequency
This is part of an optimization that limits the length and prevelance of
this power hint. Strict, ultra-agression minimizes power and latency
versus always-on mid aggression.

Bug: 297964952
Change-Id: I57a0d63d1846619e32cb6c9b8ff924aa6722a964
2024-03-13 17:12:19 +00:00
Sam Paradis
1d46192ab5 Change FACE_UNLOCK_BOOST to Maximize CPU Frequency
This is part of an optimization that limits the length and prevelance of
this power hint. Strict, ultra-agression minimizes power and latency
versus always-on mid aggression.

Bug: 297964952
Change-Id: I57a0d63d1846619e32cb6c9b8ff924aa6722a964
2024-03-09 01:56:34 +00:00
paulsu
4dfb58cbe7 Sync powerhint to latest project
powerhint: set cpd target residency to 10ms
Correct the powerhint and thermal config
thermal: optimize thermal policy for camera mode
powerhint: port powerhints from zuma and update with latest hardware

Bug: 318455627
Test: boot to home
Change-Id: I3da635fb9015a5f35a4238e0e38da385570c11c8
2024-01-03 06:50:17 +00:00
guibing
43472a8cd7 tegu: powerhint: update vendor_sched procfs paths
Vendor sched procfs path hierarchy gets updated in kernel.
Update the paths in powerhint json file to match the change.

Bug: 289151587
Test: Manual
Change-Id: I347d736284b61a272e275f5145d89499873545bd
2023-11-14 20:49:44 +00:00
Wilson Sung
a5146d127e Initialize Tegu
Copy tegu from caimito c3019ae

Bug: 298309659
Change-Id: I7d168ff0c60b7c3696239c12534ea3cfac239c1a
2023-09-15 09:48:00 +00:00