Merge "powerstats: update state residency and energy consumer for Display"

This commit is contained in:
TreeHugger Robot 2022-12-19 03:23:57 +00:00 committed by Android (Google) Code Review
commit d37ec46ab6

View file

@ -35,11 +35,12 @@ void addDisplay(std::shared_ptr<PowerStats> p) {
// Add display residency stats
std::vector<std::string> 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<DisplayStateResidencyDataProvider>(
"Display",
@ -47,13 +48,11 @@ void addDisplay(std::shared_ptr<PowerStats> 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() {