diff --git a/powerstats/comet/service.cpp b/powerstats/comet/service.cpp index 2cbcca3..21565e2 100644 --- a/powerstats/comet/service.cpp +++ b/powerstats/comet/service.cpp @@ -32,26 +32,43 @@ using aidl::android::hardware::power::stats::EnergyConsumerType; using aidl::android::hardware::power::stats::PowerStatsEnergyConsumer; void addDisplay(std::shared_ptr p) { - // Add display residency stats - std::vector states = { + // Add display residency stats for inner display + std::vector inner_states = { "Off", - "LP: 1440x3120@30", - "On: 1440x3120@60", - "On: 1440x3120@90", - "HBM: 1440x3120@60", - "HBM: 1440x3120@90"}; + "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( - "Display", + "Inner Display", "/sys/class/backlight/panel0-backlight/state", - states)); + inner_states)); + + // Add display residency stats for outer display + std::vector outer_states = { + "Off", + "LP: 1080x2424@30", + "On: 1080x2424@60", + "On: 1080x2424@120", + "HBM: 1080x2424@60", + "HBM: 1080x2424@120"}; + + p->addStateResidencyDataProvider(std::make_unique( + "Outer Display", + "/sys/class/backlight/panel1-backlight/state", + outer_states)); // Add display energy consumer p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterConsumer( p, EnergyConsumerType::DISPLAY, "Display", - {"VSYS_PWR_DISPLAY"})); + {"VSYS_PWR_DISPLAY"}));// VSYS_PWR_DISPLAY = inner + outer } int main() {