Commit graph

35 commits

Author SHA1 Message Date
Ryan Prichard
c92b81622d gs201: 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.gs201
Flag: EXEMPT, refactor to fix build failure
Change-Id: Ic355f68c4ebb09e204ea3fb4822940aad07ccd7b
2024-09-12 13:18:03 -07:00
Darren Hsu
ff196ef65a powerstats: expose display MRR state residency data provider
Bug: 317767775
Test: vts-tradefed run vts -m VtsHalPowerStatsTargetTest
Change-Id: I72037cc9d5b35a47ae0173d52bbc57708a593936
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2024-01-29 05:59:52 +00:00
Darren Hsu
1c6c8a8c30 powerstats: change data source to fvp stats for CPU CLx
Bug: 281797115
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Iabe85a9ef43a80e7fa573b8cf2df411f71319d77
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2023-05-29 03:41:22 +00:00
Darren Hsu
2310929f20 powerstats: add energy consumer support for camera
Bug: 258321000
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Idd6fee259f28762134ba251a767e80eff5daa901
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-12-19 03:24:44 +00:00
Darren Hsu
f5147354b7 powerstats: expose data provider methods for specific configurations
Please see the bug description for more details.

Bug: 253951732
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: If22930a45c2f0db6437ff57ecc6bc2985f0895e8
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-10-17 07:46:01 +00:00
Darren Hsu
8112355636 powerstats: update GPU DVFS to fix GPU EnergyConsumer issue
Failed to create GPU EnergyConsumer due to invalid coefficient
size. The size of GPU coefficient list should be equal to the
size of available GPU DVFS list in uid_time_in_state.

Bug: 243455584
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I7938e3e89d8e1e9a43c49cff60249a723f76b969
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-10-12 18:44:50 +08:00
Darren Hsu
e4c0888a1e powerstats: change data source for CPU CLx-DVFS
CPU CLx-DVFS stats provided by fvp_stats are incorrect. Although
acpm stats are closer to final vote results, data accuracy is most
important. Change the data source of CPU CLx-DVFS from fvp_stats
to soc cpufreq.

Bug: 246501821
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I4018f9f561d87140adfba847f2f07c672810aad0
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-09-21 08:37:33 +00:00
Darren Hsu
4c5bbfc702 powerstats: update GPU EnergyConsumer channels
GPU EnergyConsumer should include both S8S_VDD_G3D_L2 and
S2S_VDD_G3D channels.

Bug: 243455584
Test: verified both channels are included
Change-Id: Ia63c89ff5ba24d026a4f0b1e368141521e47b611
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-08-26 07:39:57 +00:00
Darren Hsu
0f2d1bd801 powerstats: add specific combination of data providers
Bug: 242695004
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Ibf689ae6a05a8b9f8c634d354bbcce6731825c0c
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-08-17 16:12:30 +08:00
Darren Hsu
9411790fc5 powerstats: include Aurora state residency stats
Bug: 229410570
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I02a3d647575292ccbe64c41fede06261648cd1e2
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-08-16 20:18:41 +08:00
Darren Hsu
46a0ab6018 powerstats: include WLAN data provider in PowerStatsHAL
The specific device uses QC solution on wifi. Include WLAN state
residency data provider in PowerStatsHAL for the device.

Bug: 231397821
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I268dd007c9998c9453107a7ff9507203aee0f87c
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-07-29 03:34:51 +00:00
Darren Hsu
19b932eb41 powerstats: remove bluetooth data provider on the specific device
The specific device uses QC solution on Bluetooth. Remove support
of Bluetooth state residency data provider in PowerStatsHAL on the
specific device.

Bug: 231395549
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Ic94d9ca2ddefa5ac09bc83bf156a4972562506ea
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-07-27 07:56:02 +00:00
Darren Hsu
0d70982b57 powerstats: set AoC clock for timestamp calculations
Bug: 233923713
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I6476d2abb09003b376b9e32ffb4ee8a279bb3086
Merged-In: I6476d2abb09003b376b9e32ffb4ee8a279bb3086
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-06-21 03:40:05 +00:00
Darren Hsu
14034f63c2 powerstats: read MIF-DVFS stats from devfreq data provider
MIF-DVFS stats read from ACPM will not be accumulated in some
reasons. Reading MIF-DVFS stats from devfreq data provider is
a more accurate way to monitor the MIF status.

Bug: 232040455
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Icf84d9682685b730d4771aad0b2b21bc8d6c4868
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-05-12 07:41:57 +00:00
Darren Hsu
313fe7709c powerstats: re-enable AoC power stats reporting with timeout
Bug: 219630658
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Icb1433bed3438ed4525816e3d3be28b4e0261e89
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-05-03 10:26:08 +00:00
Kelly Rossmoyer
f2fa5042d8 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: I84f5173aada0539d8c91d18d36a841bc9f3e3c9a
2022-04-25 03:56:51 +00:00
Darren Hsu
78364766c5 powerstats: set time limit as timeout for AoC
Bug: 219630658
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I725c00745890350f4227fc9408d926abc783ea66
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-04-21 04:07:54 +00:00
Kelly Rossmoyer
b7c5a147cd 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: I6625c444a5f77ac5cfd2b152aa434461cfca7f7a
2022-04-01 22:16:22 +00:00
Kelly Rossmoyer
98ba4af1b4 Revert^2 "powerstats: disable AoC power stats reporting"
0500c761c9

Change-Id: I7d4226e91321cbc4fa14b2d7fdba6ed1129c5788
2022-04-01 22:16:22 +00:00
Darren Hsu
0500c761c9 Revert "powerstats: disable AoC power stats reporting"
This reverts commit 8c4f8807fd.

Bug: 220032540
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Reason for revert: the timeout mechanism is ready
Change-Id: Ied599054c4b3eda125c71b927dbab0e6bdb99ef9
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-03-30 08:05:25 +00:00
Darren Hsu
6f41cc87c8 powerstats: set time limit as timeout for AoC
Bug: 219630658
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Iaf5af43ebcda4edb0ff5f88e3ba82dda2d0c51a5
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-03-30 08:05:25 +00:00
Darren Hsu
6bfa5980f9 powerstats: add AoC restart count stats
Bug: 226173008
Test: dump power stats and verify restart count increased
Change-Id: I8fabb1ccf853ad26c4f455129f6d337e8eb37e2c
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-03-25 06:59:34 +00:00
Darren Hsu
3413a13921 powerstats: update TPU-DVFS frequencies
Bug: 225290987
Test: dump power stats and see frequencies updated
Change-Id: If516f115e1a3f3c06c04deadcea56b97f5a24ccd
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-03-21 15:23:24 +08:00
Darren Hsu
1d6fa6d79e 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: Ic2c7c29c9b6408018ba9c98578e5a32d4e082ef1
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-03-18 11:19:13 +00:00
Darren Hsu
8c4f8807fd powerstats: disable AoC power stats reporting
This is a workaround for the AoC long latency issue. Re-enable
AoC power stats reporting when the latency issue is fixed or
the timeout mechanism is merged.

Bug: 210045267
Test: Dump power stats while video streaming and see no timeout
Test: from dumpsys
Change-Id: I83545d45bb1bbb5bb18ca4bff4bd261f332a4570
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-02-17 10:26:50 +08:00
Darren Hsu
6dffe2029d 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: Ib4b2986adf6cdd0ab74daa086ef843caa250ac84
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-02-10 13:00:20 +08:00
Darren Hsu
77fc18937b powerstats: correct CPU DVFS state residency stats
Bug: 213642474
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I7f4cacc3e3c760c6c420c7e5c82e9fe3dbd9d258
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-01-11 12:19:26 +00:00
Darren Hsu
88f8c4b2b4 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: I81e7a957490fb563fdf25a6434aaf5e886456c5d
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2022-01-04 06:14:51 +00:00
Darren Hsu
7d9490247f powerstats: add mmWave rail into modem energy consumer
Bug: 211073344
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I9ecd3702605be287e76b8ed584eaba137a482b05
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2021-12-22 03:03:25 +00:00
Darren Hsu
729a55acdd powerstats: add DVFS state residency for INTCAM, CAM and TNR
Bug: 203063331
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: I4d765fb9813ead483cc1ba4f159dbb341693ee4c
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2021-12-03 02:26:56 +00:00
Darren Hsu
2dcb8a176f powerstats: add TPU MIF-REQ state residency
Bug: 206913765
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Ifec43d031ec15499547c325afdddd549b1d43179
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2021-11-30 03:17:33 +00:00
samou
21623c73d0 powerstats: correct TPU, GPU, several DVFS buckets and frequency unit
Bug: 197152245
Test: dumpsys android.hardware.power.stats.IPowerStats/default
Change-Id: Ie4f260c643e3d19f8080436b3a0197764196ccfc
2021-08-30 07:09:18 +00:00
Richard Hsu
64c714a88e [Bringup] Enable Darwinn Logging Service on Android T
Enables the EdgeTPU firmware logger on Android T, for both WCH and PRO.
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: I6d3c7fd31046296fb2e87613a97c85a151220217
2021-08-10 17:06:43 -07:00
Thierry Strudel
d045354a90 powerstats: fix ODPM device names
============= PowerStats HAL 2.0 energy consumers ==============
CPUCL0       :       24968.54 mWs
CPUCL1       :        8919.14 mWs
CPUCL2       :       11926.69 mWs
MODEM        :           0.00 mWs
GPS          :           0.00 mWs
Wifi         :           0.00 mWs
BT           :           0.00 mWs
display      :       71299.61 mWs
========== End of PowerStats HAL 2.0 energy consumers ==========

============= PowerStats HAL 2.0 energy meter ==============
                           Channel    Cumulative Energy
     [PPVAR_VSYS_PWR_DISP]:Display         71299.61 mWs
            [VSYS_PWR_MODEM]:Modem             0.00 mWs
          [VSYS_PWR_RFFE]:Cellular             0.00 mWs
                 [S1M_VDD_MIF]:MIF          6768.08 mWs
         [S2M_VDD_CPUCL2]:CPU(BIG)         11926.69 mWs
         [S3M_VDD_CPUCL1]:CPU(MID)          8919.14 mWs
      [S4M_VDD_CPUCL0]:CPU(LITTLE)         24968.54 mWs
                 [S5M_VDD_INT]:INT          6053.63 mWs
                   [S6M_LLDO1]:LDO          4850.91 mWs
                 [S7M_VDD_INT]:INT          3893.55 mWs
                [S10M_VDD_TPU]:TPU          1246.19 mWs
             [L1M_VDD_ALIVE]:Alive          2243.80 mWs
          [S1S_VDD_CAM]:Multimedia          5501.09 mWs
                 [S2S_VDD_G3D]:GPU          6432.73 mWs
                   [S3S_LLDO1]:LDO         15484.51 mWs
               [S4S_VDD2H_MEM]:DDR         11950.26 mWs
                [S5S_VDDQ_MEM]:DDR          5148.75 mWs
                   [S6S_LLDO4]:LDO         13688.50 mWs
                    [S7S_MLDO]:LDO         24895.53 mWs
              [S8S_VDD_G3D_L2]:GPU          6934.05 mWs
                 [S9S_VDD_AOC]:AOC          7403.07 mWs
                  [S10S_VDD2L]:DDR          9040.13 mWs
               [L9S_GNSS_CORE]:GPS             0.00 mWs
              [L21S_VDD2L_MEM]:MEM             0.00 mWs
========== End of PowerStats HAL 2.0 energy meter ==========


Signed-off-by: Thierry Strudel <tstrudel@google.com>
Change-Id: I83053e4e5b1414cf1410b38fe03d8bbadc70e5bd
2021-06-22 01:04:00 +00:00
Pat Tjin
89841bf57a s/gs101/gs201
do a global substitution

Bug: 186836335
Signed-off-by: Pat Tjin <pattjin@google.com>
Change-Id: Ic79e8983d04615be7da70ebb2b5092aae5178495
2021-05-20 17:54:35 +08:00
Renamed from powerstats/Gs101CommonDataProviders.cpp (Browse further)