Merge "powerstats: use display MRR state residency data provider" into main

This commit is contained in:
Treehugger Robot 2024-01-24 06:03:41 +00:00 committed by Android (Google) Code Review
commit 6af3815b8d
2 changed files with 2 additions and 46 deletions

View file

@ -33,29 +33,7 @@ using aidl::android::hardware::power::stats::PowerStatsEnergyConsumer;
void addDisplay(std::shared_ptr<PowerStats> p) {
// Add display residency stats
std::vector<std::string> states = {
"Off",
"LP: 960x2142@1",
"LP: 960x2142@30",
"On: 960x2142@1",
"On: 960x2142@30",
"On: 960x2142@60",
"On: 960x2142@120",
"HBM: 960x2142@60",
"HBM: 960x2142@120",
"LP: 1280x2856@1",
"LP: 1280x2856@30",
"On: 1280x2856@1",
"On: 1280x2856@30",
"On: 1280x2856@60",
"On: 1280x2856@120",
"HBM: 1280x2856@60",
"HBM: 1280x2856@120"};
p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>(
"Display",
"/sys/class/backlight/panel0-backlight/state",
states));
addDisplayMrr(p);
// Add display energy consumer
p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterConsumer(

View file

@ -33,29 +33,7 @@ using aidl::android::hardware::power::stats::PowerStatsEnergyConsumer;
void addDisplay(std::shared_ptr<PowerStats> p) {
// Add display residency stats
std::vector<std::string> states = {
"Off",
"LP: 1008x2244@1",
"LP: 1008x2244@30",
"On: 1008x2244@1",
"On: 1008x2244@30",
"On: 1008x2244@60",
"On: 1008x2244@120",
"HBM: 1008x2244@60",
"HBM: 1008x2244@120",
"LP: 1344x2992@1",
"LP: 1344x2992@30",
"On: 1344x2992@1",
"On: 1344x2992@30",
"On: 1344x2992@60",
"On: 1344x2992@120",
"HBM: 1344x2992@60",
"HBM: 1344x2992@120"};
p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>(
"Display",
"/sys/class/backlight/panel0-backlight/state",
states));
addDisplayMrr(p);
// Add display energy consumer
p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterConsumer(