Snap for 11373247 from 76d156d5cb
to 24Q2-release
Change-Id: Ifd2d0eb433dab6d31df95e93bf21dfd087071258
This commit is contained in:
commit
2e8eab1e7f
2 changed files with 18 additions and 11 deletions
|
@ -232,7 +232,7 @@ PRODUCT_VENDOR_PROPERTIES += \
|
|||
|
||||
# Increment the SVN for any official public releases
|
||||
PRODUCT_VENDOR_PROPERTIES += \
|
||||
ro.vendor.build.svn=31
|
||||
ro.vendor.build.svn=33
|
||||
|
||||
# Set support hide display cutout feature
|
||||
PRODUCT_PRODUCT_PROPERTIES += \
|
||||
|
|
|
@ -36,17 +36,24 @@ 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: 1080x2400@30",
|
||||
"On: 1080x2400@60",
|
||||
"On: 1080x2400@90",
|
||||
"HBM: 1080x2400@60",
|
||||
"HBM: 1080x2400@90"};
|
||||
struct stat buffer;
|
||||
if (!stat("/sys/class/drm/card0/device/primary-panel/time_in_state", &buffer)) {
|
||||
// time_in_state exists
|
||||
addDisplayMrr(p);
|
||||
} else {
|
||||
// time_in_state doesn't exist
|
||||
std::vector<std::string> states = {
|
||||
"Off",
|
||||
"LP: 1080x2400@30",
|
||||
"On: 1080x2400@60",
|
||||
"On: 1080x2400@90",
|
||||
"HBM: 1080x2400@60",
|
||||
"HBM: 1080x2400@90"};
|
||||
|
||||
p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>("Display",
|
||||
"/sys/class/backlight/panel0-backlight/state",
|
||||
states));
|
||||
p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>("Display",
|
||||
"/sys/class/backlight/panel0-backlight/state",
|
||||
states));
|
||||
}
|
||||
|
||||
// Add display energy consumer
|
||||
p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterAndEntityConsumer(p,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue