Commit graph

300 commits

Author SHA1 Message Date
jimmyshiu
2c3b63f04f VTSHalPowerTarget: Add condition check for FMQAidl teardown
While FMQAidl Setup() was skipped, some uninitialized objects would be
used in FMQAidl Teardown() which caused the test failed.
Add some condition check to prevent from using uninitialized objects.

Test: atest VTSHalPowerTarget
Bug: 328330332
Change-Id: I83081cbef66da1d74d87e191f266cb16fb559b85
(cherry picked from commit d3753ec91d)
2024-05-31 18:04:21 +00:00
Devin Moore
9eec1433fa Merge "Vendor API level 202404 is now frozen" into main 2024-02-29 17:14:40 +00:00
Matt Buckley
f7c36d4a3b Add Vts tests for FMQ
Ensure FMQ is supported through VTS, actually running, and can process
a variety of inputs.

Bug: 327047057
Test: atest VtsHalPowerTargetTest
Change-Id: I70edaf41fca544bfd48e1ce2a99f48e4a6a835b8
2024-02-27 21:43:28 +00:00
Devin Moore
a8efdb127e Vendor API level 202404 is now frozen
Ignore-AOSP-First: VINTF 202404 Finalization
Bug: 279809333
Test: build
Change-Id: Ie6d38d27a287e258c30516e0030ad8c931d06432
2024-02-20 21:05:23 +00:00
Darren Hsu
310de813fa VTS: powerstats: skip GPS power stats
Lassen GNSS power stats will be present after running GPS session
once. Otherwise, VTS will fail due to missing GPS power stats.

Bug: 325545917
Test: run vts -m VtsHalPowerStatsTargetTest
Change-Id: I9d31017a86417fc18f4eab98ee25abfadfa396f9
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2024-02-19 14:39:56 +08:00
Matt Buckley
1c1fc91e54 Add timestamps to FMQ ChannelMessage
Figuring out relative message ordering is harder with FMQ because
messages on different channels without timestamps do not have a
guaranteed ordering. This CL adds timestamps to all channel messages
to ensure relative ordering is always known precisely, and to make
timing more accurate.

Bug: 321810554
Test: atest VtsHalPowerTargetTest
Change-Id: Iac341dec2526ac46ae9db57aadbd267224a77989
2024-01-23 00:34:25 +00:00
Treehugger Robot
b7a9eaefdd Merge "Remove unused global const variable" into main am: a471e4baa3 am: ac95f895da am: 3d9f91edf9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2902182

Change-Id: I175ea577d33721d6f5b1e8aac33d85499ced48f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-10 02:50:12 +00:00
Tomasz Wasilczyk
d29abc9f3e Remove unused global const variable
Bug: 175635923
Test: MODULES-IN-hardware-interfaces-power
Change-Id: Ie73f48df62a17b309c774b2f446db3ee53b3863b
2024-01-09 14:42:22 -08:00
Treehugger Robot
6f5ec586e7 Merge "Add GPU_LOAD_RESET hint" into main 2024-01-09 02:06:50 +00:00
Xiang Wang
143fce5c50 Add GPU_LOAD_RESET hint
Bug: 284324521
Test: n/a
Change-Id: I4ef7cf5b6368f7aacf7cf83058b1afa219e6822a
2024-01-08 16:46:05 -08:00
Peiyong Lin
5189925e1d Add APP SessionTag
Add a SessionTag enum APP to distinguish hint sessions created by apps.

Bug: b/274929700
Test: atest VtsHalPowerTargetTest
Change-Id: I85263dc6b1b89f73f79f1a7696d37bf7fa2556ad
2024-01-09 00:30:32 +00:00
Matt Buckley
caac147d01 Add AIDL API for PowerHAL to send session updates with FMQ
This patch adds a set of APIs to PowerHAL to enable hint session
communication via FMQ, to reduce both binder overhead and call latency
moving forward.

Bug: 315894228
Test: atest VtsHalPowerTargetTest
Change-Id: I56f89322c7706ab68e640542caf5b70eef36c451
2023-12-14 23:00:22 +00:00
Xiang Wang
c1589c6f91 Add GPU_LOAD_UP GPU_LOAD_DOWN session hints
Bug: 284324521
Test: n/a

Change-Id: Iedf0a037939096cae1719a4fbbbc1eece53d2564
2023-12-11 16:03:46 -08:00
Wei Wang
1e25636e27 Merge "Power: add AUTOMOTIVE_PROJECTION power mode" into main 2023-12-01 18:13:52 +00:00
David Kimmel
3fb5b81816 Power: add AUTOMOTIVE_PROJECTION power mode
Test: Boot
Bug: 300362894
Change-Id: I83ffd47becbd5bde0a64950f26a321e6a48001c4
Signed-off-by: David Kimmel <davidkimmel@google.com>
2023-12-01 07:47:03 -08:00
Peiyong Lin
f39c60f14b [Reland] Add GPU enabled ADPF to V5 of power hal.
Adds the ability for V5 ADPF clients to clue the power hal in as to how
much of the work duration is attributable to the CPU vs how much of the
work duration is attributable to the GPU.

Bug: b/284324521
Test: atest VtsHalPowerTargetTest
Change-Id: I81360fdaa21a87c2f2c7fc28702e625185a9a2d3
2023-11-27 17:21:48 +00:00
Jorim Jaggi
ea37fc1880 Revert "Add GPU enabled ADPF to V5 of power hal."
Revert submission 24997733-adpf-gpu-plumbing

Reason for revert: b/311102554

Reverted changes: /q/submissionid:24997733-adpf-gpu-plumbing

Change-Id: Ifd5a0bedbbffb827d81584f418a2e7fd1d5b787f
2023-11-20 12:47:17 +00:00
Kevin DuBois
1890f2d9fb Add GPU enabled ADPF to V5 of power hal.
Adds the ability for V5 ADPF clients to clue the power hal in as to how
much of the work duration is attributable to the CPU vs how much of the
work duration is attributable to the GPU.

Bug: b/284324521
Test: atest VtsHalPowerTargetTest
Change-Id: Ie64ba146c9a416ced6336971b6136561a525042c
2023-11-10 21:13:00 +00:00
Jooyung Han
6a5d7dcac3 Cleanup: move VINTF fragments into VAPEX am: cadd26dbe7 am: 02de97ef48 am: bfd81c90d6 am: 9f3776cece am: f286928491
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2780408

Change-Id: I52cd9301f097f5f0aa944a0defcd66e7e03a25af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 10:23:46 +00:00
Jooyung Han
f77c765d9b Cleanup: use shared apex_key am: a0b0a624ff am: ac02f99676 am: b2050caeb7 am: b203fc16d1 am: 26300e25a4
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2780407

Change-Id: I5e04059916434c397b4f6e1bb62bdecd72d9b44f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 10:23:41 +00:00
Jooyung Han
cadd26dbe7 Cleanup: move VINTF fragments into VAPEX
VINTF fragments for Power VAPEX were installed in /vendor/etc as a
workaround when VINTF fragments in VAPEX were not supported.

Bug: n/a
Test: m && launch_cvd
      # power/power-stat services are running
Change-Id: I0243a0bd2f2dd597260f73a3994cf81db213daf7
2023-10-10 12:46:33 +09:00
Jooyung Han
a0b0a624ff Cleanup: use shared apex_key
Bug: 296524155
Test: m
Change-Id: I2b722872d1a93952186a38a385a3e0cd1869b7f5
2023-10-10 10:47:36 +09:00
jimmyshiu
4206d28b88 Power: add a DISPLAY_CHANGE mode
Bug: 298150450
Test: build pass
Change-Id: Ibdfb5bc071c17809bc35e892e8450406b2acdb70
2023-09-14 20:19:21 +08:00
Matt Buckley
1fde90c153 Add plumbing for ADPF Power Efficiency hint
These patches introduce a new power efficiency mode for hint sessions
to the public API, and internally expose a new setMode API for hint
sessions that resembles the setMode API for iPower, to control
different session operating modes.

This set of patches:
 - Updates the PowerHAL AIDL to version 5, and updates relevant bp files
 - Exposes new setPreferPowerEfficiency(bool enabled) method from the
 SDK and NDK
 - Exposes new setMode(int mode, bool enabled) method from PowerHAL AIDL
 and HintManagerService
 - Adds support for new setMode call in PowerHAL

Bug: b/288117936
Test: manual
Change-Id: Id006341b5ab0ae6fadd975d740d2fcf89f0636e4
2023-08-08 22:09:14 +00:00
Matt Buckley
42027e0ee7 Refactor Power VTS in terms of AIDL version
Rewrite Power VTS check support using AIDL versions instead of
API versions, and change hint session tests to use a common test
fixture.

Bug: 294917526
Test: atest VtsHalPowerTargetTest
Change-Id: I3cef31fa8dc6341a47d173a13d07521bafe4a1e5
2023-08-08 22:07:03 +00:00
Peiyong Lin
9fb755319b Avoid skipping test if it's supported.
Previously the test will be skipped regardless whether setThreads is
supported, this patch moves the check below and check the returned
status code to determine whether the test should be skipped.

Bug: b/287282833
Test: atest VtsHalPowerTargetTest
Change-Id: I9ce6b4ead5e245478247903a75922ece74f38ee7
2023-06-14 18:12:39 +00:00
Alex Buynytskyy
ec1198d941 UpsideDownCake is now 34
Ignore-AOSP-First: UpsideDownCake Finalization
Bug: 275409981
Test: build
Change-Id: I832ab7a8b5445ba85e27bbcf5be64906bfa0e5be
2023-04-07 23:41:20 +00:00
Xiang Wang
dd0edc6337 Fix the hidden main function in VTS tests
Otherwise gtest will inherit the one from libgtest_main which
will not start thread pool to handle binder call for callbacks

Bug: b/205762943
Test: atest VtsHalThermalTargetTest VtsHalPowerTargetTest VtsHalTetheroffloadTargetTest
Change-Id: Ib9e5d265b8f5081dd20568a98d01e9190177440a
2023-02-08 16:48:57 -08:00
Treehugger Robot
5ffee106df Merge "powerstats: bump version of PowerStats HAL to V2" am: 8c91779b64 am: 057a217409 am: 2397611890
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2390573

Change-Id: I4cbc5bc7352711364e3cca5028ac1cb635bc2798
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-02 02:03:47 +00:00
Darren Hsu
c4fad13c9b powerstats: bump version of PowerStats HAL to V2
Bug: 264669398
Bug: 258321000
Bug: 266943256
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I009c09e4cd7e27250266cc7b2c1596df6fee95fe
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2023-01-31 14:16:23 +08:00
Darren Hsu
58650353e4 Merge "powerstats: add new EnergyConsumerType for camera" am: 72a3964894 am: c92826db99 am: 669cec9444
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2335183

Change-Id: I4999e7b864255ba16ecbede91c146925ee8b7015
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-13 02:43:02 +00:00
Darren Hsu
c72f756692 powerstats: add new EnergyConsumerType for camera
Bug: 258321000
Bug: 261549337
Test: build
Change-Id: I0c6664a01acac41c0b0c71ee83b2e3b2b794c7be
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-12-08 16:30:12 +08:00
Treehugger Robot
a4dbfb7d12 Merge "power/stats: update OWNERS" am: 79fdb98586 am: a7e7e07864 am: 5771260214
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2287873

Change-Id: I8a1c56a57577e177e64ca7b28366500b6c70fe2c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-08 22:17:00 +00:00
Kelly Rossmoyer
6b489885e5 power/stats: update OWNERS
Add people who should be listed (including the primary owner) and
remove folks who are no longer involved.

BUG: 218899982
Change-Id: I0a479e528bd436668b8782ebc123e4fdb8b4e50b
2022-11-08 00:18:48 +00:00
Peiyong Lin
c7854594a2 Add thread management API to PowerHintSession.
Previously the list of threads of a PowerHintSession was only determined
when the PowerHintSession was created. This means newly forked threads
from existing threads of the PowerHintSession will not get the benefit
and the clients have to create new PowerHintSession for that.

This patch adds a new method to allow clients to update the threads of
the PowerHintSession.

Additionally, this patch also removes the oneway annotation at the
interface level of IPowerHintSession, all existing methods are converted
to oneway methods and setThreads is a bidirectional method. This also
allows to do meaningful VTS validation.

Bug: b/244216750
Test: atest VtsHalPowerTargetTest
Change-Id: If499d6dad20c9d7f6fbda1b5dc9d528396f1f6c1
2022-11-01 23:25:56 +00:00
Peiyong Lin
b1691e85d6 Merge "Align default implementation with latest VSR." 2022-10-20 18:37:10 +00:00
Peiyong Lin
8139d0be3e Add TEST_MAPPING
Add VtsHalPowerTargetTest into presubmit tests.

Bug: b/253516147
Test: atest VtsHalPowerTargetTest
Change-Id: Ie1fa80a5bdf9baa084dbfa4603414eb97afb15a6
Merged-In: Ie1fa80a5bdf9baa084dbfa4603414eb97afb15a6
2022-10-20 00:17:54 +00:00
Peiyong Lin
3c76f8cb2b Align default implementation with latest VSR.
VSR requires to support power HAL V2 and beyond, this patch changes the
default implementation to reflect that.

Bug: b/253516147
Test: atest VtsHalPowerTargetTest
Change-Id: I56f6f847f4c47775db6350b8a3fcd7ee9c9cdf17
Merged-In: I56f6f847f4c47775db6350b8a3fcd7ee9c9cdf17
2022-10-19 16:54:44 +00:00
Wei Wang
ea9233bb4b Merge "Align default implementation with latest VSR." 2022-10-19 16:40:16 +00:00
Wei Wang
0a2d8f5b99 Merge "Add TEST_MAPPING" 2022-10-19 16:40:16 +00:00
Peiyong Lin
5851c3aa25 Align default implementation with latest VSR.
VSR requires to support power HAL V2 and beyond, this patch changes the
default implementation to reflect that.

Bug: b/253516147
Test: atest VtsHalPowerTargetTest
Change-Id: I56f6f847f4c47775db6350b8a3fcd7ee9c9cdf17
2022-10-18 22:37:22 +00:00
Peiyong Lin
f29134c9c9 Add TEST_MAPPING
Add VtsHalPowerTargetTest into presubmit tests.

Bug: b/253516147
Test: atest VtsHalPowerTargetTest
Change-Id: Ie1fa80a5bdf9baa084dbfa4603414eb97afb15a6
2022-10-18 21:57:59 +00:00
Peiyong Lin
a55c51a8e1 Merge "Revert "Add TEST_MAPPING"" am: 10015aff66 am: 6584fb40fc am: 6a37a5c5e5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2258166

Change-Id: Id79a8777861fed78a94f4ab19f0517aaa7b45069
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-18 01:36:13 +00:00
Peiyong Lin
9b3c393362 Merge "Align power AIDL VTS with VSR." am: ad41e9d095 am: 552c5af91a am: 3ed3c93807
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2258581

Change-Id: Ib7339c0884a6a5f543db2b2387d1a02cd0b561eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-18 00:11:18 +00:00
Peiyong Lin
2604cb85ac Add TEST_MAPPING am: 9d6e818c6a am: 1d87380bd4 am: 32074f685a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2258582

Change-Id: If8f08c42e330878f2126a4b4e23883f7abde4199
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-18 00:10:03 +00:00
Peiyong Lin
10015aff66 Merge "Revert "Add TEST_MAPPING"" 2022-10-18 00:03:14 +00:00
Peiyong Lin
549e535936 Revert "Add TEST_MAPPING"
This reverts commit 9d6e818c6a.

Reason for revert: The previous patch broke TestMappingsValidation.testTestSuiteSetting.

Bug: b/254131591
Change-Id: Ie92e423a3706f6898d4a940e3e3ecef08e208fe9
Test: atest TestMappingsValidation
2022-10-18 00:00:55 +00:00
Peiyong Lin
ad41e9d095 Merge "Align power AIDL VTS with VSR." 2022-10-17 22:36:45 +00:00
Peiyong Lin
9d6e818c6a Add TEST_MAPPING
Add VtsHalPowerTargetTest into presubmit tests.

Bug: b/253516147
Test: atest VtsHalPowerTargetTest
Change-Id: Ic477621367d1b3846247aadf495827792473d639
2022-10-17 20:36:43 +00:00
Peiyong Lin
3e0eb72345 Align power AIDL VTS with VSR.
Per [VSR-3.2-013] DEVICEs launching with Android 13 MUST meet the
requirements for the target-level=7 compatibility_matrix file. Update
the VTS to reflect that.

Bug: b/253516147
Test: atest VtsHalPowerTargetTest
Change-Id: Ie6178ed2caea6a70b728dfcded9fa900ee099f2f
2022-10-17 20:32:24 +00:00