From a4c83326a4c2dc9af6fe14b50199039fb457d43f Mon Sep 17 00:00:00 2001 From: Darren Hsu Date: Wed, 8 May 2024 10:08:59 +0800 Subject: [PATCH 1/2] powerstats: fix GPU and TPU energy consumer issue 1. S2S_VDD_G3D is only one monitored rail for GPU. 2. TPU rail has been renamed to S7M_VDD_TPU. 3. TPU frequencies have been changed. Bug: 339320507 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: I5e965e9d58a1ae08706fb46c6a4fc9549a889352 Signed-off-by: Darren Hsu --- powerstats/ZumaProCommonDataProviders.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/powerstats/ZumaProCommonDataProviders.cpp b/powerstats/ZumaProCommonDataProviders.cpp index d63b176..4bd3559 100644 --- a/powerstats/ZumaProCommonDataProviders.cpp +++ b/powerstats/ZumaProCommonDataProviders.cpp @@ -365,7 +365,7 @@ void addGPU(std::shared_ptr p) { {"890000", 4333}}; p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterAndAttrConsumer(p, - EnergyConsumerType::OTHER, "GPU", {"S2S_VDD_G3D", "S8S_VDD_G3D_L2"}, + EnergyConsumerType::OTHER, "GPU", {"S2S_VDD_G3D"}, {{UID_TIME_IN_STATE, path + "/uid_time_in_state"}}, stateCoeffs)); @@ -638,12 +638,15 @@ void addTPU(std::shared_ptr p) { stateCoeffs = { // TODO (b/197721618): Measuring the TPU power numbers {"226000", 10}, - {"627000", 20}, - {"845000", 30}, - {"1066000", 40}}; + {"455000", 20}, + {"627000", 30}, + {"712000", 40}, + {"845000", 50}, + {"967000", 60}, // Do not change to 1066000 + {"1119000", 70}}; p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterAndAttrConsumer(p, - EnergyConsumerType::OTHER, "TPU", {"S10M_VDD_TPU"}, + EnergyConsumerType::OTHER, "TPU", {"S7M_VDD_TPU"}, {{UID_TIME_IN_STATE, "/sys/class/edgetpu/edgetpu-soc/device/tpu_usage"}}, stateCoeffs)); } From 836afc9c1c62d60fc85e2e7716be4695e387ced5 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Thu, 25 Apr 2024 06:25:14 +0000 Subject: [PATCH 2/2] Update IDisplay to V11-V12 V12 is not frozen yet. We should still allow V11 for `next` build. Test: trigger test build Bug: 309897479 Bug: 303162192 Change-Id: I00e8cb20fc76bbe49df2015cab7d869d4cd45437 Signed-off-by: Leo Chen --- device_framework_matrix_product.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml index 25259b0..2aa37e9 100644 --- a/device_framework_matrix_product.xml +++ b/device_framework_matrix_product.xml @@ -114,7 +114,7 @@ com.google.hardware.pixel.display - 11 + 11-12 IDisplay default