From b7c5a147cddf57c5318d27ca9a11bd8e646a5bf2 Mon Sep 17 00:00:00 2001 From: Kelly Rossmoyer Date: Fri, 1 Apr 2022 20:28:24 +0000 Subject: [PATCH] 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 --- powerstats/Gs201CommonDataProviders.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/powerstats/Gs201CommonDataProviders.cpp b/powerstats/Gs201CommonDataProviders.cpp index 599874d1..6232a6e0 100644 --- a/powerstats/Gs201CommonDataProviders.cpp +++ b/powerstats/Gs201CommonDataProviders.cpp @@ -102,7 +102,6 @@ void addPlaceholderEnergyConsumers(std::shared_ptr p) { } void addAoC(std::shared_ptr p) { - static const uint64_t TIMEOUT_MILLIS = 120; std::string prefix = "/sys/devices/platform/19000000.aoc/control/"; // Add AoC cores (a32, ff1, hf0, and hf1) @@ -115,7 +114,7 @@ void addAoC(std::shared_ptr p) { std::vector> coreStates = { {"DWN", "off"}, {"RET", "retention"}, {"WFI", "wfi"}}; p->addStateResidencyDataProvider(std::make_unique(coreIds, - coreStates, TIMEOUT_MILLIS)); + coreStates)); // Add AoC voltage stats std::vector> voltageIds = { @@ -126,8 +125,7 @@ void addAoC(std::shared_ptr p) { {"UUD", "ultra_underdrive"}, {"UD", "underdrive"}}; p->addStateResidencyDataProvider( - std::make_unique(voltageIds, voltageStates, - TIMEOUT_MILLIS)); + std::make_unique(voltageIds, voltageStates)); // Add AoC monitor mode std::vector> monitorIds = { @@ -137,8 +135,7 @@ void addAoC(std::shared_ptr p) { {"MON", "mode"}, }; p->addStateResidencyDataProvider( - std::make_unique(monitorIds, monitorStates, - TIMEOUT_MILLIS)); + std::make_unique(monitorIds, monitorStates)); // Add AoC restart count const GenericStateResidencyDataProvider::StateResidencyConfig restartCountConfig = {