From 7225af33493789ffe5f493d3623f9e0d5d21a52f Mon Sep 17 00:00:00 2001 From: Darren Hsu Date: Wed, 14 Dec 2022 17:11:13 +0800 Subject: [PATCH] powerstats: update state residency and energy consumer for Display Bug: 262488433 Bug: 262491621 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: I77ff227d3c50b135c3085f19f088f57a3b274cce Signed-off-by: Darren Hsu --- powerstats/husky/service.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/powerstats/husky/service.cpp b/powerstats/husky/service.cpp index 342d6ca..cfe7934 100644 --- a/powerstats/husky/service.cpp +++ b/powerstats/husky/service.cpp @@ -35,11 +35,12 @@ void addDisplay(std::shared_ptr p) { // Add display residency stats std::vector states = { "Off", - "LP: 1080x2340@30", - "On: 1080x2340@60", - "On: 1080x2340@90", - "HBM: 1080x2340@60", - "HBM: 1080x2340@90"}; + "LP: 1344x2992@30", + "On: 1344x2992@10", + "On: 1344x2992@60", + "On: 1344x2992@120", + "HBM: 1344x2992@60", + "HBM: 1344x2992@120"}; p->addStateResidencyDataProvider(std::make_unique( "Display", @@ -47,13 +48,11 @@ void addDisplay(std::shared_ptr p) { states)); // Add display energy consumer - p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterAndEntityConsumer( - p, EnergyConsumerType::DISPLAY, "display", {"PPVAR_VSYS_PWR_DISP"}, "Display", - {{"LP: 1080x2340@30", 1}, - {"On: 1080x2340@60", 2}, - {"On: 1080x2340@90", 3}, - {"HBM: 1080x2340@60", 4}, - {"HBM: 1080x2340@90", 5}})); + p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterConsumer( + p, + EnergyConsumerType::DISPLAY, + "DISPLAY", + {"VSYS_PWR_DISPLAY"})); } int main() {