Commit graph

38 commits

Author SHA1 Message Date
Ryan Prichard
cbb28eab67 gs101: avoid vector<const T>
std::vector<const T> uses std::allocator<const T>, which is an
undocumented libc++ extension to the C++ standard library. The extension
was removed in llvm.org/PR96319. Use an ordinary non-const T instead.

Bug: http://b/349681543
Test: m android.hardware.power.stats-impl.gs101
Flag: EXEMPT, refactor to fix build failure
Change-Id: Ia66a69a9375971223b712d695f5ea5f2c1e26c19
2024-09-12 13:15:56 -07:00
Darren Hsu
9f8d681088 powerstats: expose display MRR state residency data provider
Bug: 321848496
Test: vts-tradefed run vts -m VtsHalPowerStatsTargetTest
Change-Id: I967210bef1d33d8bc344ea80e6c31f70a3414604
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2024-01-29 06:23:49 +00:00
Darren Hsu
3698b06acc powerstats: set AoC clock for timestamp calculations
Bug: 233923713
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I40c155c78331255ec5a7d9300798cec0a3d219f5
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-06-20 04:57:53 +00:00
Kelly Rossmoyer
9247e99d14 Revert "powerstats: set time limit as timeout for AoC"
Revert "powerstats: set time limit as timeout for AoC"

Revert "powerstats: timeout mechanism for AoC data provider"

Revert submission 17800080-power-stats-aoc-timeout

Reason for revert: Causing crashes due to improper thread sync
Reverted Changes:
I71a9e6817:powerstats: timeout mechanism for AoC data provide...
I725c00745:powerstats: set time limit as timeout for AoC
I5b290a53d:powerstats: set time limit as timeout for AoC

Change-Id: Iac058ba7f0984bb86c505738c1eb20b7b6ddff83
2022-04-25 03:56:51 +00:00
Darren Hsu
334bd6d2ec powerstats: set time limit as timeout for AoC
Bug: 219630658
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I5b290a53dcd5325aa55fd95a42c1af95066f550c
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-04-21 04:07:54 +00:00
Kelly Rossmoyer
7eb5f7e1db Revert "powerstats: set time limit as timeout for AoC"
Revert "powerstats: set time limit as timeout for AoC"

Revert "powerstats: timeout mechanism for AoC data provider"

Revert submission 17442015-powerstats-aoc-timeout

Reason for revert: Causes PowerStatsHAL crashes (b/227578192)
Reverted Changes:
I9a9eb27fa:powerstats: set time limit as timeout for AoC
Ib70000580:powerstats: timeout mechanism for AoC data provide...
Ied599054c:Revert "powerstats: disable AoC power stats report...
Iaf5af43eb:powerstats: set time limit as timeout for AoC

Change-Id: I7b7a42d3f94769bf937a4d9693444a5f4550dc3f
2022-04-01 22:16:22 +00:00
Darren Hsu
0be3bbd083 powerstats: set time limit as timeout for AoC
Bug: 219630658
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I9a9eb27fab549f4351bcfae6e335e050c48fc753
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-03-30 08:05:25 +00:00
Darren Hsu
cce5e9f8b0 powerstats: add AoC restart count stats
Bug: 226173008
Test: dump power stats and verify restart count increased
Change-Id: Ia0cfcd9f9dae68dc21c33074147e8b6db547ebc9
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-03-25 07:04:11 +00:00
Darren Hsu
916a8281fb powerstats: add devfreq state residency for BO
Bug: 216600952
Test: dump power stats and see the state residencies appear
Test: verified that the string buffer is enough
Change-Id: I3dacc12f307c8d2ddbe92380e751c4e285dd9b8d
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-03-17 05:21:24 +00:00
Darren Hsu
29832dc73a powerstats: add devfreq state residency for MFC and DISP
Bug: 218772968
Bug: 216600952
Test: dump power stats and see the state residencies appear
Test: verified that the string buffer is enough
Change-Id: Id57cefa7c35145edfc617c97ac8ff80b4827214a
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-02-10 12:06:09 +00:00
Darren Hsu
1c13f40625 powerstats: remove common data providers in specific directory
The common data providers will be moved to gs common directory. So
I removed them in this directory and used gs common library to get
the APIs.

Bug: 206576142
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Ic4c1379af912fecb2e74c6c8303bf57f27e49246
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-01-05 07:32:47 +00:00
Richard Hsu
82a677c786 [Bringup] Enable Darwinn Logging Service on Android T
Enables the EdgeTPU firmware logger on Android T, for WCH.
Also makes the tpu_usage paths up-to-date with the new path: edgetpu-soc

Bug: 196105736

Test: Manually triggered firmware logs to confirm.

Change-Id: I72040f0775f24b128130e4e5d1aba1998b29d723
2021-08-13 01:27:20 +00:00
samou
ed31b7318f powerstats: correct TPU DVFS
Bug: 196161144
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I8ec871afa4ca2050b5ddd59d0ea33b237b2b8a63
2021-08-11 20:50:08 +00:00
samou
aeae45a3ea powerstats: add GPU-DVFS
Bug: 193542516
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I7490a172932338e90d8886b1e26a5c05d4544647
2021-07-19 19:23:33 +00:00
samou
b14db4c9a6 powerstats: correct frequency unit
Bug: 192579762
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I8f7703c30116622483faa55f9dc16a5558d43c08
2021-07-19 19:05:12 +00:00
samou
c1cf9f84b5 powerstats: Fill in P21 TPU power profile number
Bug: 189249509
Change-Id: I134f3c005ec0eb17e97b829627ba22d552b7bfdb
2021-06-15 11:23:02 +00:00
Benjamin Schwartz
a05a8c3854 powerstats: Remove Wifi and BT placeholder consumers
Bug: 185392117
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I4ee4837f882c2666e99c02836dd3c850871b420b
2021-06-01 17:17:03 -07:00
Benjamin Schwartz
630f471fcf powerstats: Add CAM, INTCAM, and TNR devfreq stats
Bug: 186581089
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I1c01971518769a2ea0e5d360ef99e07df735e0fb
2021-05-27 17:51:05 +00:00
samou
513c4afaa1 powerstats: Add TPU EnergyConsumer power attribution
Bug: 185564760
Change-Id: I6550ed839599c979ee09492fb8eaabd50f04ebe2
2021-04-29 15:51:11 +00:00
Benjamin Schwartz
e171ad07f5 powerstats: Move NFC stats to device specific
Bug: 184722506
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I99b82c52d0dee1cf3b7eda7e4985d9b40db162d0
2021-04-22 15:28:23 -07:00
Benjamin Schwartz
6899dcc219 powerstats: Add INT state residency stats
Bug: 168833648
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Iecfb2ec05566a0d432a39904adddd442751c44e6
2021-04-16 00:21:30 +00:00
Benjamin Schwartz
3cc937165b powerstats: Add GPS state residency
Bug: 181577366
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I0fa4356542a838618e712e9b0abbf02b99db7f3a
2021-04-15 05:08:16 +00:00
Benjamin Schwartz
2219a99232 powerstats: Add PD on stats
Bug: 176452458
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I871e93c5e46d0c88bd8a07eec8a38c8d1cf81d9a
2021-04-14 18:57:35 +00:00
Benjamin Schwartz
d9e7656d60 powerstats: Correct DVFS operating points
Bug: 180261952
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I472a74218934ee6f9fae82fe36ddb924bfcd70ee
2021-04-14 18:57:32 +00:00
samou
9db455e69d powerstats: Fill in P21 GPU power profile number
Bug: 184042446
Change-Id: Ifbc00ed0a9de98f65e7f0c4b1981e45f0b1887ba
2021-04-09 10:13:01 +00:00
Benjamin Schwartz
3ddb599459 powerstats: Add device specific display states
Bug: 167216667
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I977621b0a1502b1482eaac0922ded781ece007e0
2021-04-07 03:22:26 +00:00
Benjamin Schwartz
3c712491cf Move power stats service to device specific folders
Bug: 183052760
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I4d4881e227982aa17b88af8844c82dc448ef5b6f
Merged-In: I4d4881e227982aa17b88af8844c82dc448ef5b6f
2021-04-06 04:08:17 +00:00
Benjamin Schwartz
a0519357f3 powerstats: Add placeholder energy consumer for bt and wifi
Bug: 184092278
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I00e277c6ddad81f970e7345870b0bf904ca433e9
2021-03-31 20:12:33 +00:00
Benjamin Schwartz
6b4c8b4887 powerstats: Use unique_ptr
Bug: 183051413
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Test: atest VtsHalPowerStatsTargetTest
Change-Id: Ia15505b219e6a8fe61949f7d75cc6379de837153
2021-03-18 20:20:04 +00:00
Benjamin Schwartz
10e6ca883f powerstats: Add Ufs stats
Bug: 140217385
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Ie60a8bbb5ac9290d9b707a1529bcc384c5e61626
2021-03-16 13:40:48 -07:00
Benjamin Schwartz
da983cb5c2 powerstats: Add core stats
Bug: 182273949
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I4151f57ebd68102a58fd7035356279e68805a0f9
2021-03-09 16:05:58 -08:00
Benjamin Schwartz
82a0c52a12 powerstats: acpm_stats driver has moved
Bug: 182255966
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I667fb71f6f2c7aade2d56dc8ec8d4462dcc97594
2021-03-09 11:20:04 -08:00
Benjamin Schwartz
0d6392efa6 Remove power stats HAL 1.0 service
Bug: 179527556
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Test: device boot and examined logs to make sure no errors related to
missing power stats 1.0

Change-Id: Ib8cc394f9968edaf948a2d9700e9f7fcaa5b9dc0
2021-03-09 10:27:55 -08:00
Benjamin Schwartz
194edaf7db powerstats: Add NFC, PCIE, WIFI stats
Bug: 179277258
Test: adb shell dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I64d84f82eafe34c12caeaa73f24ed79a60db3604
2021-03-09 01:40:43 +00:00
Benjamin Schwartz
5b34563d88 Revert^2 "powerstats: Add PixelStateResidencyDataProvider"
05a79631f7

Change-Id: If088251400b80a8f47b09d6f2806a3f386ea3161
2021-03-09 01:24:49 +00:00
Benjamin Schwartz
05a79631f7 Revert "powerstats: Add PixelStateResidencyDataProvider"
Revert "powerstats: Create vendor state residency provider"

Revert submission 13807923-pixel provider

Reason for revert: caused build breakage

Reverted Changes:
I6b0c1d350:bthal/1.1: Use PixelStateResidencyProvider
Ia028e589b:powerstats: Create vendor state residency provider...
Id99e6d2a9:powerstats: Add PixelStateResidencyDataProvider

Change-Id: Ib1b18b5984af6b665c4ad0c9e9217a314a64e6ed
2021-03-09 00:54:23 +00:00
Benjamin Schwartz
9c9f563bd6 powerstats: Add PixelStateResidencyDataProvider
This data provider will be used to produce state residency data from
other native services that have registered callbacks.

Bug: 179277258
Test: adb shell dumpsys android.hardware.power.stats.IPowerStats/default
Test: killed power.stats and bluetooth services and verified that
providers are re-registered.

Change-Id: Id99e6d2a9300f7c7483e3fb7a6a9604a46fbbc6f
2021-03-08 11:54:56 -08:00
Robin Peng
c2b5ca99e3 Move slider into gs101 and <device>
from: 026342771c6642980cb4653b1ec4d857a5d8be54

Bug: 167996145
Change-Id: I2ebf7f019afed1cbe9b60dcd82581bd3a52fe109
2021-03-06 16:31:12 +08:00