Merge "powerstats: use display MRR state residency data provider" into main
This commit is contained in:
commit
25b6ff1f65
1 changed files with 2 additions and 27 deletions
|
@ -33,35 +33,10 @@ using aidl::android::hardware::power::stats::PowerStatsEnergyConsumer;
|
||||||
|
|
||||||
void addDisplay(std::shared_ptr<PowerStats> p) {
|
void addDisplay(std::shared_ptr<PowerStats> p) {
|
||||||
// Add display residency stats for inner display
|
// Add display residency stats for inner display
|
||||||
std::vector<std::string> inner_states = {
|
addDisplayMrrByEntity(p, "Inner Display", "/sys/class/drm/card0/device/primary-panel/");
|
||||||
"Off",
|
|
||||||
"LP: 2152x2076@1",
|
|
||||||
"LP: 2152x2076@30",
|
|
||||||
"On: 2152x2076@1",
|
|
||||||
"On: 2152x2076@10",
|
|
||||||
"On: 2152x2076@60",
|
|
||||||
"On: 2152x2076@120",
|
|
||||||
"HBM: 2152x2076@60",
|
|
||||||
"HBM: 2152x2076@120"};
|
|
||||||
|
|
||||||
p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>(
|
|
||||||
"Inner Display",
|
|
||||||
"/sys/class/backlight/panel0-backlight/state",
|
|
||||||
inner_states));
|
|
||||||
|
|
||||||
// Add display residency stats for outer display
|
// Add display residency stats for outer display
|
||||||
std::vector<std::string> outer_states = {
|
addDisplayMrrByEntity(p, "Outer Display", "/sys/class/drm/card0/device/secondary-panel/");
|
||||||
"Off",
|
|
||||||
"LP: 1080x2424@30",
|
|
||||||
"On: 1080x2424@60",
|
|
||||||
"On: 1080x2424@120",
|
|
||||||
"HBM: 1080x2424@60",
|
|
||||||
"HBM: 1080x2424@120"};
|
|
||||||
|
|
||||||
p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>(
|
|
||||||
"Outer Display",
|
|
||||||
"/sys/class/backlight/panel1-backlight/state",
|
|
||||||
outer_states));
|
|
||||||
|
|
||||||
// Add display energy consumer
|
// Add display energy consumer
|
||||||
p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterConsumer(
|
p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterConsumer(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue