Commit graph

106 commits

Author SHA1 Message Date
Qais Yousef
8e61044a40 powerhint: Set response_time_ms for clusters
By default slow it down as auto margins can lead to faster ramping up in
low activity use cases.

Set it back to default in GAME mode to retain previous behavior. Set it
explicitly for DISPLAY_IDLE as a potential area for more tuning in the
future.

Bug: 315748906
Flag: EXEMPT powerhints are not compatible with flagging
Signed-off-by: Qais Yousef <qyousef@google.com>
Change-Id: I275545cc98714afd3efefb9f57e6bac55fcb6ea3
2024-12-04 15:52:29 +00:00
Qais Yousef
279cd17355 powerhint: Enable auto migration margins/dvfs headroom by default
And reduce DownRateLimitUs to 500us as the system should be more
reactive now when something needs to rampup quickly.

Enable pertask iowait boost too as with auto dvfs headroom enabled all
tasks will start form 0 util_avg and this could impact iowait tasks
without this being enabled to help them migrate up to bigger cores.

Camera use cases should still use their own default DownRateLimitUs and
disable this feature to keep their dvfs_headroom tuning intact.

Bug: 315748906
Flag: EXEMPT powerhints are not compatible with flagging
Signed-off-by: Qais Yousef <qyousef@google.com>
Change-Id: Ifaee3631458e144270f41b66595c5e853546171c
2024-12-04 15:46:44 +00:00
Ali K. Zadeh
e382abfda2 Merge "[comet] Define multiple levels of PA kill to be used in Mendel experiments" into main 2024-11-19 00:03:13 +00:00
Ali K. Zadeh
4ffe47393a [comet] Define multiple levels of PA kill to be used in Mendel experiments
Level 1: 100MB
Level 2: 300MB
Level 3: 500MB

Bug: 375039716
Test: logcat
Flag: EXEMPT resource only file change
Change-Id: Ie7f09f797e33d94ffa01f38762b69a8976a866b2
2024-11-18 19:44:23 +00:00
Chungkai Mei
ef979d3c2d Enable TAPreferHighCap for first frame
we already saw some janks caused by longer runnable time.
so Enable TAPreferHighCap for first frame

Bug: 372168866
Flag: NONE powerhint do not support flag
Change-Id: I01f699abd1eaed5760789d6c0788cbe4791e2b13
Signed-off-by: Chungkai Mei <chungkai@google.com>
2024-10-31 07:28:16 +00:00
Richard Chang
61589cef5b powerhint: Add WriteOnly flag for PA_KILL to avoid SELinux error
The node "/sys/kernel/vendor_mm/pa_kill/reclaim_kb" is write-only. So we need to add WriteOnly flag to prevent powerhal to read the node.

SELinux errors:
avc:  denied  { dac_read_search } for  comm="android.hardwar" capability=2  scontext=u:r:hal_power_default:s0 tcontext=u:r:hal_power_default:s0 tclass=capability permissive=0
avc:  denied  { dac_override } for  comm="android.hardwar" capability=1  scontext=u:r:hal_power_default:s0 tcontext=u:r:hal_power_default:s0 tclass=capability permissive=0

Bug: 350830411
Change-Id: I649e263a5371782184ce712fef3e8d42941806d7
Test: adb shell dumpsys android.hardware.power.IPower/default, check if any avc denied messages
Flag: EXEMPT config json change
2024-10-29 08:29:08 +00:00
Ali K. Zadeh
251a1fb25a Merge "[comet] Define CAMERA_MULTICAM_BOOST" into main 2024-10-15 23:10:57 +00:00
Rick Yiu
f1815b79fb Enable TA and FG prefer idle for some camera streams
These streams do not disable TA or FG prefer idle, so restore it.

Bug: 236868627
Flag: NONE powerhint change does not support flags
Test: build pass
Change-Id: Ia98132e94c6572165687cb4437492ab0669f9427
2024-10-10 12:53:44 +00:00
Yvonne Yip
dcc77598de powerhint: enable auto_prefer_idle in games
Bug: 353987938
Test: manual testing
Flag: NONE powerhint
Change-Id: I70bf789a476553f05ee016daec24592076daf283
2024-10-09 12:53:03 -07:00
Treehugger Robot
a7d9620657 Merge "Use auto prefer fit for launch" into main 2024-10-07 16:17:20 +00:00
Chungkai Mei
bb48ea5f64 powerhint: port dvfs_headroom settings from p24
Flag: NONE align device tuning from P24.
Bug: 371094656
Test: boot
Change-Id: I858208921e64aefeee6f6abf60387fd80f5f5e34
Signed-off-by: Chungkai Mei <chungkai@google.com>
2024-10-04 02:57:27 +00:00
Chungkai Mei
12af273b17 powerhint.json: enable gpu capacity signalling.
Enables a signal indicating that the app has janked as
detected by the ADPF API.

Flag: NONE align device tuning from P24.
Test: perf / power tests
Bug: 371094656
Change-Id: I19279e0f5a5fea59ffd0728128d6170f61e8a3e2
Signed-off-by: Chungkai Mei <chungkai@google.com>
2024-10-04 02:38:00 +00:00
Treehugger Robot
48d4cd082a Merge "Boosting kswapd uclamp min value when the panel is on" into main 2024-09-26 09:57:17 +00:00
Chungkai Mei
c617d1d942 Boosting kswapd uclamp min value when the panel is on
Boosting kswapd's uclamp minimum value in the scheduler
allows kswapd more opportunities to remain in middle cores.
This change enhances kswapd's memory reclamation efficiency.

Bug: 351708752
Test: check kbnob value when the panel is on/off
Flag: EXEMPT device policy tuning
Change-Id: I4b75016aa3f2de22b0b9e46d8e594d4042124a04
2024-09-26 07:10:58 +00:00
Sam Ou
b6dbbf5e11 Merge "thermal: Remove bcl related tzones" into main 2024-09-24 05:51:13 +00:00
Rick Yiu
6832fe9387 Use auto prefer fit for launch
Enable auto prefer fit for high prio tasks when app launch, and tune
uclmap min settings for different task prio.

Bug: 353885521
Flag: NONE powerhint change does not support flags
Test: build pass
Change-Id: I28d8023d3bc8852d6bcb771c0b2338a15f97ca37
2024-09-16 08:20:20 +00:00
Rick Yiu
293b436df4 Enable auto prefer idle
Also disable prefer idle for TA and FG by default.

Bug: 236868627
Flag: NONE powerhint change does not support flags
Test: build pass
Change-Id: I43f57177a7bd8dafc902063fd63d3bbb58ffff71
2024-09-06 09:08:33 +00:00
Rick Yiu
0e0b8676dc Set big core to group_cfs_skip_mask for sys group by default
Let sys group tasks will run less in big core by default.

Bug: 328210236
Test: build pass
Flag: NONE powerhint change does not support flags
Change-Id: I9f71dc336792ad0b1add06a83d6261273313f9ef
2024-09-06 09:07:25 +00:00
Pointer Kung
8e17fdbdf8 Set max load balance to 4, reduce Downrate Limit for lit and mid cores
Refer to ag/28864349

Bug: 354763942
Test: Build pass, Boot to home
Flag: EXEMPT resource file change only
Change-Id: I85c033e0fd309ff9b6fe8fb24f6c9e687e31f1c6
2024-08-20 04:56:39 +00:00
Paulsu Su
6c974f0980 powerhint: CPULittleClusterMinFreq default 820MHz
Change-Id: I69881adafffff8a5e265e862fc711fac490fe885
Test: boot to home
Bug: 348088963
Flag: NONE powerhint do not support flag
2024-08-08 07:27:50 +00:00
samou
b319347637 thermal: Remove bcl related tzones
Flag: EXEMPT tuning changes
Bug: 349935208
Test: Confirm boot
Change-Id: I4dd7581ac8a5ef5756f00b91b54160fe27dfe939
Signed-off-by: samou <samou@google.com>
2024-08-06 07:45:53 +00:00
Ali K. Zadeh
3b7c659644 [comet] Define CAMERA_MULTICAM_BOOST
Port from ag/28607900

This CL defines CAMERA_MULTICAM_BOOST (with the same settings as the
existing CAMERA_ZOOMING_BOOST). Having both definitions is necessary to
be able to transition from zooming boost to multicam boost. Once the
multicam boost flag is fully rolled out, we can remove the
CAMERA_ZOOMING_BOOST.

Bug: 347829135
Test: adb logcat
Flag: EXEMPT resource file only change
Change-Id: I0a240e1b6c82b6b0e4577005c16b589f1865c154
2024-08-02 20:18:38 +00:00
Treehugger Robot
0466de1eac Merge "Enable PA_KILL during PA_KILL_BOOST" into main 2024-07-31 03:52:49 +00:00
c
c779206925 Enable PA_KILL during PA_KILL_BOOST
sync with 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
Test: 1. adb logcat
      2. gca_smoke.py test pass
Flag: EXEMPT resource only update
Change-Id: I5320d90072b92ebfb791ad50905667d764f7e3e8
2024-07-31 00:35:53 +00:00
guibing
9653d99a48 Adpf☄️ switch to multitier heuristic boost.
Bug: 344685639
Test: Checked the trace file running on the device.
Flag: NONE powerhal doesn't have a flag yet
Change-Id: If4e4bc917252244c7460908f40d328a2e23182e1
2024-07-26 23:19:37 +00:00
Yvonne Yip
4d8c8dfade powerhint: Enable auto migration margins/dvfs headroom for game mode
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: 315748906
Test: build
Flag: NONE powerhint change does not support flags
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:61cf08366eb4e916beb1ad910754c8bc6c18bf14)
Merged-In: I03a83cbf7b0c6fdf1abd3c63ccb96a38350d17da
Change-Id: I03a83cbf7b0c6fdf1abd3c63ccb96a38350d17da
2024-07-17 23:00:31 +00:00
Yvonne Yip
51140ac43c powerhint: Add nodes to control per-task iowait boost
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: 340534339
Test: build
Flag: NONE powerhint change does not support flags
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:dad48beaeb9f9fce8acb67c06bfd022e86ce0e0d)
Merged-In: Ie9d20fe5ad6b423e8c26a36b7f01592040292ead
Change-Id: Ie9d20fe5ad6b423e8c26a36b7f01592040292ead
2024-07-17 22:59:56 +00:00
Yvonne Yip
b804969d8f powerhint: Add nodes required to enable auto migration margins/dvfs headroom
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: 315748906
Test: build
Flag: NONE powerhint change does not support flags
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:bb4df08c9ea617625d25cf12bc60c41c173d996b)
Merged-In: Ibd08cec303010e87057463f5aff737a5105e04b6
Change-Id: Ibd08cec303010e87057463f5aff737a5105e04b6
2024-07-17 22:59:25 +00:00
Yvonne Yip
62542ec650 powerhint: Explicitly set DownRateLimitUs for camera
So that we can change the default values without impacting it.

Bug: 315748906powerhint: Explicitly set DownRateLimitUs for camera

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

Bug: 315748906
Test: build
Flag: NONE powerhint change does not support flags
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9084165d0d0f699f7cc3968dded4f71d4ec20a92)
Merged-In: Ic14d51f0b5b512f5557d904d682e9f934bbab87f
Change-Id: Ic14d51f0b5b512f5557d904d682e9f934bbab87f
2024-07-17 22:58:00 +00:00
Pointer Kung
4080c0deea 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
Test: Build pass, Boot to home
Flag: NONE powerhint change does not support flags
Change-Id: I7d6d0c5c23aaf7888a64ecbafde2275129fd22a1
2024-07-15 04:14:05 +00:00
Pointer Kung
4d6418dc70 Increase SPC thresholds based on the field data
Refer to ag/28174403

Bug: 350111391
Test: Build pass, Boot to home
Test: 30fps/120fps ~+20mW, 60fps ~+26mW without frame drop impact
https://docs.google.com/spreadsheets/d/1z_s2z_MjSYOcEKZbKdC6Pu0quoSDZDzn3bawaulInzo/edit?usp=sharing
Flag: EXEMPT bugfix
Change-Id: I686e5d45ac0595c93b766ea311cd390f4d3d7bd7
2024-07-10 17:29:27 +00:00
Richard Chang
c87c5cf3a7 Reapply "powerhint: add proactive kill hint for camera launch"
This reverts commit beed8e1a34.

Bug: 322916612
Test: local test
Flag: EXEMPT resource only update
Change-Id: Ia4d17cecb66551b7cc850f82a165a03d265f7507
2024-06-21 07:02:41 +00:00
Lynn Yeh
8d58a44a51 Merge changes from topic "pmu_fix" into 24D1-dev am: 654892efc1
Original change: https://googleplex-android-review.googlesource.com/c/device/google/comet/+/27778356

Change-Id: Ifed654a7d45b2c4c7a3e4181882448e654d8f762
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-13 03:06:46 +00:00
Pointer Kung
950e4ca719 Update PMU thresholds with PMU ignorance logic disabled am: 6b22f33b50
Original change: https://googleplex-android-review.googlesource.com/c/device/google/comet/+/27726436

Change-Id: I2006be98429b3b48710d0e994337b229d62e08ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-13 03:06:41 +00:00
Vince Chiu
796c46dc00 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

Bug: 341495529
Test: GCA
Change-Id: I8692df07c2a52115a497b7e71ccbe9638add1cc8
2024-06-12 23:43:46 +00:00
Pointer Kung
6b22f33b50 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

Bug: 341495529
Test: Build pass, Boot to home
Test: With pa/2830448 and 30fps(ag/27631025)/60fps(ag/27725456) RT changes, it will increase ~40mW without frame drop impact to improve performace issue.
30fps/120fps test results (https://docs.google.com/spreadsheets/d/1yhYV8LUaraO8mt1cYNFhXj-QzNBkTTtc3xXh-ryH2Eo/edit?usp=sharing&resourcekey=0-xs3Qtufdju8eYOZDTAC7oQ)
60fps/240fps test results (https://docs.google.com/spreadsheets/d/1uiG4jCR9rsLuD7WseiaptpktbUAt5BLRnyN3Teg8JII/edit?usp=sharing&resourcekey=0-lBJxBct6NT_rtkp1brC4Vg)
Change-Id: Id7bd8704039d8a7f35bee93c491327fed3101211
2024-06-11 09:39:37 +08:00
Sam Paradis
3cbcddeca3 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: Ifcb27e61752ef5ddb8484888adc77b894f5a5cf8
2024-06-04 19:13:37 +00:00
Treehugger Robot
3797f412b1 Merge "Revert "powerhint: add proactive kill hint for camera launch"" into main 2024-05-30 03:39:47 +00:00
Minchan Kim
beed8e1a34 Revert "powerhint: add proactive kill hint for camera launch"
Revert submission 27473137-P24_PA_KILL_HINT_24Q4

Reason for revert: will merge after mid of June

Reverted changes: /q/submissionid:27473137-P24_PA_KILL_HINT_24Q4

Change-Id: Ic7a87141616ea44c30cf88493d2d46dbee8da014
Bug: 322916612
2024-05-30 00:59:16 +00:00
Minchan Kim
a4f776fff3 Merge "powerhint: add proactive kill hint for camera launch" into main 2024-05-28 17:01:59 +00:00
Pointer Kung
37033c37c6 [Camera] Update CPU DVFSHeadroom for CAMERA_STREAMING_STANDARD/PROJECT11 and CDPreferHighCap for Video Call
sync from ag/27120048 and ag/26555645

Bug: 343101802
Test: Build pass
Test: Save photo preview ~38mW and 30fps/120fps recording ~12mW without frame drop impact. (https://docs.google.com/spreadsheets/d/1ibQabthI6kUL6mOxGpxDKS__1tcbRBoUUDgi2Urf6H8/edit?usp=sharing)
Test: Save Meet front video call ~7mW (https://docs.google.com/spreadsheets/d/1rfDGESnMuT2KfGjtYrE7rLAJ5qt-F4DYWUYAB8anKbY/edit?usp=sharing)
Change-Id: I5c5e255a035ab0c42fa8d3441051a4856fa12a7f
2024-05-28 04:39:11 +00:00
pashalee
1d2b4db33f [Project11] CPU scheduling update.
Bug: 341968564
Test: power and performance test are updated to
      b/341968564#comment38.

- Use newly tuned STREAMING_STANDARD setting.

Change-Id: Ida2e73b7d295bed53cff04cca0004fcaa78a696c
2024-05-24 09:00:00 +00:00
Richard Chang
6eafa43ef1 powerhint: add proactive kill hint for camera launch
Bug: 322916612
Test: local test
Change-Id: I14a0aa55aeb0be55521b95f857906bbd26928e75
2024-05-23 03:46:22 +00:00
Vince Chiu
b86a89192b [Camera] Change PMU max frequency for CL2 to 1164MHz
sync from ag/27327800

Bug: 340289125
Test: GCA
Test: no frame drop impact (https://docs.google.com/spreadsheets/d/1PMMLPQf50DM3ptGm6qoDW2XMYmU5hR-aplWN24A1JI4/edit?usp=sharing&resourcekey=0-YhomAEhqUSWRMtlh70uc_g)
Test: Avg. save SoC 11mW (go/ct3-cam-pwr)
Change-Id: I85fd4862d1320d207eea491a02d0cb3ba68ae7c1
2024-05-20 10:36:42 +00:00
Treehugger Robot
87dd1122a6 Merge "Enable PMU during photo capture" into 24D1-dev 2024-05-14 01:30:57 +00:00
Pointer Kung
8cc3c2bf16 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

Bug: 340130143
Test: GCA photo capture
Change-Id: Ic1f4d5752a943a6898d92b0e44c78a85325be0a9
2024-05-13 02:20:07 +00:00
Taeju Park
a14bba34b9 Merge "powerhint: add PMU_FORCE_LIMIT control knob" into 24D1-dev 2024-05-10 19:07:40 +00:00
Rick Yiu
da6202ec64 Set big core to group_cfs_skip_mask for sys group
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: 328210236
Test: suspend/resume test
Change-Id: I2f517cb891b4c0ead0f61f7102c3d602eb383471
2024-05-09 16:27:35 +00:00
Treehugger Robot
dd19486311 Merge "powerhint: port dvfs_headroom and migration_tuning settings from caimito" into 24D1-dev 2024-05-09 06:15:37 +00:00
Rick Yiu
c519f90dfa Merge "Revert^2 "Set big core to cpu skip mask by default"" into 24D1-dev 2024-05-08 09:34:56 +00:00