Snap for 11373247 from a17bd159c4
to 24Q2-release
Change-Id: I46a98d8174ecc4711042e67690cc723f3feb17c6
This commit is contained in:
commit
50c0756cd3
2 changed files with 41 additions and 27 deletions
|
@ -220,7 +220,7 @@ PRODUCT_SOONG_NAMESPACES += \
|
|||
|
||||
# Increment the SVN for any official public releases
|
||||
PRODUCT_VENDOR_PROPERTIES += \
|
||||
ro.vendor.build.svn=39
|
||||
ro.vendor.build.svn=41
|
||||
|
||||
# Vibrator HAL
|
||||
PRODUCT_VENDOR_PROPERTIES +=\
|
||||
|
|
|
@ -38,36 +38,50 @@ using aidl::android::hardware::power::stats::PowerStatsEnergyConsumer;
|
|||
|
||||
void addDisplay(std::shared_ptr<PowerStats> p) {
|
||||
// Add display residency stats for inner display
|
||||
std::vector<std::string> inner_states = {
|
||||
"Off",
|
||||
"LP: 1840x2208@1",
|
||||
"LP: 1840x2208@30",
|
||||
"On: 1840x2208@1",
|
||||
"On: 1840x2208@10",
|
||||
"On: 1840x2208@60",
|
||||
"On: 1840x2208@120",
|
||||
"HBM: 1840x2208@60",
|
||||
"HBM: 1840x2208@120"};
|
||||
struct stat primaryBuffer;
|
||||
if (!stat("/sys/class/drm/card0/device/primary-panel/time_in_state", &primaryBuffer)) {
|
||||
// time_in_state exists
|
||||
addDisplayMrrByEntity(p, "Inner Display", "/sys/class/drm/card0/device/primary-panel/");
|
||||
} else {
|
||||
// time_in_state doesn't exist
|
||||
std::vector<std::string> inner_states = {
|
||||
"Off",
|
||||
"LP: 1840x2208@1",
|
||||
"LP: 1840x2208@30",
|
||||
"On: 1840x2208@1",
|
||||
"On: 1840x2208@10",
|
||||
"On: 1840x2208@60",
|
||||
"On: 1840x2208@120",
|
||||
"HBM: 1840x2208@60",
|
||||
"HBM: 1840x2208@120"};
|
||||
|
||||
p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>(
|
||||
"Inner Display",
|
||||
"/sys/class/backlight/panel0-backlight/state",
|
||||
inner_states));
|
||||
p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>(
|
||||
"Inner Display",
|
||||
"/sys/class/backlight/panel0-backlight/state",
|
||||
inner_states));
|
||||
}
|
||||
|
||||
// Add display residency stats for outer display
|
||||
std::vector<std::string> outer_states = {
|
||||
"Off",
|
||||
"LP: 1080x2092@30",
|
||||
"On: 1080x2092@10",
|
||||
"On: 1080x2092@60",
|
||||
"On: 1080x2092@120",
|
||||
"HBM: 1080x2092@60",
|
||||
"HBM: 1080x2092@120"};
|
||||
struct stat secondaryBuffer;
|
||||
if (!stat("/sys/class/drm/card0/device/secondary-panel/time_in_state", &secondaryBuffer)) {
|
||||
// time_in_state exists
|
||||
addDisplayMrrByEntity(p, "Outer Display", "/sys/class/drm/card0/device/secondary-panel/");
|
||||
} else {
|
||||
// time_in_state doesn't exist
|
||||
std::vector<std::string> outer_states = {
|
||||
"Off",
|
||||
"LP: 1080x2092@30",
|
||||
"On: 1080x2092@10",
|
||||
"On: 1080x2092@60",
|
||||
"On: 1080x2092@120",
|
||||
"HBM: 1080x2092@60",
|
||||
"HBM: 1080x2092@120"};
|
||||
|
||||
p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>(
|
||||
"Outer Display",
|
||||
"/sys/class/backlight/panel1-backlight/state",
|
||||
outer_states));
|
||||
p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>(
|
||||
"Outer Display",
|
||||
"/sys/class/backlight/panel1-backlight/state",
|
||||
outer_states));
|
||||
}
|
||||
|
||||
// Add display energy consumer
|
||||
p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterConsumer(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue