diff --git a/device-oriole.mk b/device-oriole.mk index e69b2f0..88e172c 100644 --- a/device-oriole.mk +++ b/device-oriole.mk @@ -128,8 +128,9 @@ PRODUCT_SOONG_NAMESPACES += \ # Keyboard bottom padding in dp for portrait mode PRODUCT_PRODUCT_PROPERTIES += ro.com.google.ime.kb_pad_port_b=10 -# Display LBE +# Display PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.lbe.supported=1 +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_idle_timer_ms=1500 # userdebug specific ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) diff --git a/device-raven.mk b/device-raven.mk index de5d22a..c1afd28 100644 --- a/device-raven.mk +++ b/device-raven.mk @@ -90,7 +90,7 @@ PRODUCT_COPY_FILES += \ device/google/raviole/raven/display_colordata_dev_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_colordata_dev_cal0.pb #config of display brightness dimming -PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.brightness.dimming.usage=1 +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.brightness.dimming.usage=2 # NFC PRODUCT_COPY_FILES += \ diff --git a/powerstats/oriole/service.cpp b/powerstats/oriole/service.cpp index ee9d57e..8331997 100644 --- a/powerstats/oriole/service.cpp +++ b/powerstats/oriole/service.cpp @@ -31,6 +31,13 @@ using aidl::android::hardware::power::stats::DisplayStateResidencyDataProvider; using aidl::android::hardware::power::stats::EnergyConsumerType; using aidl::android::hardware::power::stats::PowerStatsEnergyConsumer; +const char kBootRevision[] = "ro.boot.revision"; +std::map displayChannelNames = { + {"PROTO1.0", "PPVAR_VSYS_PWR_DISP"}, + {"EVT1.0", "PPVAR_VSYS_PWR_DISP"}, + {"EVT1.1", "VSYS_PWR_DISPLAY"}, +}; + void addDisplay(std::shared_ptr p) { // Add display residency stats std::vector states = { @@ -45,13 +52,22 @@ void addDisplay(std::shared_ptr p) { "/sys/class/backlight/panel0-backlight/state", states)); + std::string rev = android::base::GetProperty(kBootRevision, ""); + + std::string channelName; + if (displayChannelNames.find(rev) == displayChannelNames.end()) { + channelName = displayChannelNames["EVT1.1"]; + } else { + channelName = displayChannelNames[rev]; + } + // Add display energy consumer /* * TODO(b/167216667): Add correct display power model here. Must read from display rail * and include proper coefficients for display states. */ p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterAndEntityConsumer(p, - EnergyConsumerType::DISPLAY, "display", {"PPVAR_VSYS_PWR_DISP"}, "Display", + EnergyConsumerType::DISPLAY, "display", {channelName}, "Display", {{"LP: 1080x2400@30", 1}, {"On: 1080x2400@60", 2}, {"On: 1080x2400@90", 3}, diff --git a/powerstats/raven/service.cpp b/powerstats/raven/service.cpp index 6ee27d8..579efa1 100644 --- a/powerstats/raven/service.cpp +++ b/powerstats/raven/service.cpp @@ -33,6 +33,13 @@ using aidl::android::hardware::power::stats::EnergyConsumerType; using aidl::android::hardware::power::stats::GenericStateResidencyDataProvider; using aidl::android::hardware::power::stats::PowerStatsEnergyConsumer; +const char kBootRevision[] = "ro.boot.revision"; +std::map displayChannelNames = { + {"PROTO1.0", "PPVAR_VSYS_PWR_DISP"}, + {"EVT1.0", "PPVAR_VSYS_PWR_DISP"}, + {"EVT1.1", "VSYS_PWR_DISPLAY"}, +}; + void addDisplay(std::shared_ptr p) { // Add display residency stats std::vector states = { @@ -51,13 +58,22 @@ void addDisplay(std::shared_ptr p) { "/sys/class/backlight/panel0-backlight/state", states)); + std::string rev = android::base::GetProperty(kBootRevision, ""); + + std::string channelName; + if (displayChannelNames.find(rev) == displayChannelNames.end()) { + channelName = displayChannelNames["EVT1.1"]; + } else { + channelName = displayChannelNames[rev]; + } + // Add display energy consumer /* * TODO(b/167216667): Add correct display power model here. Must read from display rail * and include proper coefficients for display states. */ p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterAndEntityConsumer(p, - EnergyConsumerType::DISPLAY, "display", {"PPVAR_VSYS_PWR_DISP"}, "Display", + EnergyConsumerType::DISPLAY, "display", {channelName}, "Display", {{"LP: 1440x3120@10", 1}, {"LP: 1440x3120@30", 2}, {"On: 1440x3120@10", 3}, diff --git a/thermal_info_config_oriole.json b/thermal_info_config_oriole.json index 97d0b1c..03b34f5 100644 --- a/thermal_info_config_oriole.json +++ b/thermal_info_config_oriole.json @@ -330,17 +330,17 @@ "K_Pu":["NAN", "NAN", 1500, 1500, "NAN", "NAN", "NAN"], "K_I":["NAN", "NAN", 20, 20, "NAN", "NAN", "NAN"], "K_D":["NAN", "NAN", 10, 10, "NAN", "NAN", "NAN"], - "I_Max":["NAN", "NAN", 4000, 4000, "NAN", "NAN", "NAN"], - "S_Power":["NAN", "NAN", 5000, 3500, "NAN", "NAN", "NAN"], - "MinAllocPower":["NAN", "NAN", 2000, 2000, "NAN", "NAN", "NAN"], - "MaxAllocPower":["NAN", "NAN", 9500, 6500, "NAN", "NAN", "NAN"], + "I_Max":["NAN", "NAN", 4000, 1000, "NAN", "NAN", "NAN"], + "S_Power":["NAN", "NAN", 3500, 1500, "NAN", "NAN", "NAN"], + "MinAllocPower":["NAN", "NAN", 2500, 1500, "NAN", "NAN", "NAN"], + "MaxAllocPower":["NAN", "NAN", 9500, 3000, "NAN", "NAN", "NAN"], "I_Cutoff":["NAN", "NAN", 2, 2, "NAN", "NAN", "NAN"] }, "BindedCdevInfo": [ { "CdevRequest": "thermal-cpufreq-0", - "CdevWeightForPID": [0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9], - "CdevCeiling": [6, 6, 6, 7, 8, 10, 10], + "CdevWeightForPID": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], + "CdevCeiling": [3, 3, 6, 7, 8, 10, 10], "LimitInfo": [0, 0, 0, 0, 8, 10, 10], "BindedPowerRail": "S4M_VDD_CPUCL0", "PowerThreshold": [200, 200, 200, 200, 50, 0, 0], @@ -348,8 +348,8 @@ }, { "CdevRequest": "thermal-cpufreq-1", - "CdevWeightForPID": [1.1, 1.1, 1.1, 1.1, 1.1, 1.1, 1.1], - "CdevCeiling": [9, 9, 9, 10, 11, 13, 13], + "CdevWeightForPID": [0.075, 0.075, 0.075, 0.075, 0.075, 0.075, 0.075], + "CdevCeiling": [7, 7, 8, 9, 11, 13, 13], "LimitInfo": [0, 0, 0, 0, 11, 13, 13], "BindedPowerRail": "S3M_VDD_CPUCL1", "PowerThreshold": [200, 200, 200, 200, 50, 0, 0], @@ -357,8 +357,8 @@ }, { "CdevRequest": "thermal-cpufreq-2", - "CdevWeightForPID": [2.9, 2.9, 2.9, 2.9, 2.9, 2.9, 2.9], - "CdevCeiling": [12, 12, 12, 13, 14, 16, 16], + "CdevWeightForPID": [0.37, 0.37, 0.37, 0.37, 0.37, 0.37, 0.37], + "CdevCeiling": [11, 11, 14, 14, 14, 16, 16], "LimitInfo": [0, 0, 0, 0, 14, 16, 16], "BindedPowerRail": "S2M_VDD_CPUCL2", "PowerThreshold": [200, 200, 200, 200, 50, 0, 0], @@ -366,8 +366,8 @@ }, { "CdevRequest": "thermal-gpufreq-0", - "CdevWeightForPID": [3.3, 3.3, 3.3, 3.3, 3.3, 3.3, 3.3], - "CdevCeiling": [7, 7, 7, 8, 10, 11, 11], + "CdevWeightForPID": [0.455, 0.455, 0.455, 0.455, 0.455, 0.455, 0.455], + "CdevCeiling": [7, 7, 8, 9, 10, 11, 11], "LimitInfo": [0, 0, 0, 0, 10, 11, 11], "BindedPowerRail": "S2S_VDD_G3D", "PowerThreshold": [200, 200, 200, 200, 50, 0, 0], @@ -901,7 +901,7 @@ "BindedCdevInfo": [ { "CdevRequest": "tpu_cooling", - "LimitInfo": [0, 0, 0, 0, 3, 3, 3] + "LimitInfo": [0, 0, 0, 0, 2, 2, 2] } ] }, @@ -1003,13 +1003,7 @@ ], "VrThreshold":"NAN", "Multiplier":1, - "Monitor":true, - "BindedCdevInfo": [ - { - "CdevRequest": "tpu_cooling", - "LimitInfo": [0, 0, 0, 0, 3, 3, 3] - } - ] + "Monitor":true }, { "Name":"soft_ocp_gpu", diff --git a/thermal_info_config_oriole_WHI_A.json b/thermal_info_config_oriole_WHI_A.json index 6094307..c60da21 100644 --- a/thermal_info_config_oriole_WHI_A.json +++ b/thermal_info_config_oriole_WHI_A.json @@ -574,7 +574,7 @@ "BindedCdevInfo": [ { "CdevRequest": "tpu_cooling", - "LimitInfo": [0, 0, 0, 0, 3, 3, 3] + "LimitInfo": [0, 0, 0, 0, 2, 2, 2] } ] }, @@ -676,13 +676,7 @@ ], "VrThreshold":"NAN", "Multiplier":1, - "Monitor":true, - "BindedCdevInfo": [ - { - "CdevRequest": "tpu_cooling", - "LimitInfo": [0, 0, 0, 0, 3, 3, 3] - } - ] + "Monitor":true }, { "Name":"soft_ocp_gpu", diff --git a/thermal_info_config_raven.json b/thermal_info_config_raven.json index cb769fb..2025978 100644 --- a/thermal_info_config_raven.json +++ b/thermal_info_config_raven.json @@ -330,17 +330,17 @@ "K_Pu":["NAN", "NAN", 1500, 1500, "NAN", "NAN", "NAN"], "K_I":["NAN", "NAN", 20, 20, "NAN", "NAN", "NAN"], "K_D":["NAN", "NAN", 10, 10, "NAN", "NAN", "NAN"], - "I_Max":["NAN", "NAN", 4000, 4000, "NAN", "NAN", "NAN"], - "S_Power":["NAN", "NAN", 5000, 3500, "NAN", "NAN", "NAN"], - "MinAllocPower":["NAN", "NAN", 2000, 2000, "NAN", "NAN", "NAN"], - "MaxAllocPower":["NAN", "NAN", 9500, 6500, "NAN", "NAN", "NAN"], + "I_Max":["NAN", "NAN", 4000, 1000, "NAN", "NAN", "NAN"], + "S_Power":["NAN", "NAN", 3500, 1500, "NAN", "NAN", "NAN"], + "MinAllocPower":["NAN", "NAN", 2500, 1500, "NAN", "NAN", "NAN"], + "MaxAllocPower":["NAN", "NAN", 9500, 3000, "NAN", "NAN", "NAN"], "I_Cutoff":["NAN", "NAN", 2, 2, "NAN", "NAN", "NAN"] }, "BindedCdevInfo": [ { "CdevRequest": "thermal-cpufreq-0", - "CdevWeightForPID": [0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9], - "CdevCeiling": [6, 6, 6, 7, 8, 10, 10], + "CdevWeightForPID": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], + "CdevCeiling": [3, 3, 6, 7, 8, 10, 10], "LimitInfo": [0, 0, 0, 0, 8, 10, 10], "BindedPowerRail": "S4M_VDD_CPUCL0", "PowerThreshold": [200, 200, 200, 200, 50, 0, 0], @@ -348,8 +348,8 @@ }, { "CdevRequest": "thermal-cpufreq-1", - "CdevWeightForPID": [1.1, 1.1, 1.1, 1.1, 1.1, 1.1, 1.1], - "CdevCeiling": [9, 9, 9, 10, 11, 13, 13], + "CdevWeightForPID": [0.075, 0.075, 0.075, 0.075, 0.075, 0.075, 0.075], + "CdevCeiling": [7, 7, 8, 9, 11, 13, 13], "LimitInfo": [0, 0, 0, 0, 11, 13, 13], "BindedPowerRail": "S3M_VDD_CPUCL1", "PowerThreshold": [200, 200, 200, 200, 50, 0, 0], @@ -357,8 +357,8 @@ }, { "CdevRequest": "thermal-cpufreq-2", - "CdevWeightForPID": [2.9, 2.9, 2.9, 2.9, 2.9, 2.9, 2.9], - "CdevCeiling": [12, 12, 12, 13, 14, 16, 16], + "CdevWeightForPID": [0.37, 0.37, 0.37, 0.37, 0.37, 0.37, 0.37], + "CdevCeiling": [11, 11, 14, 14, 14, 16, 16], "LimitInfo": [0, 0, 0, 0, 14, 16, 16], "BindedPowerRail": "S2M_VDD_CPUCL2", "PowerThreshold": [200, 200, 200, 200, 50, 0, 0], @@ -366,8 +366,8 @@ }, { "CdevRequest": "thermal-gpufreq-0", - "CdevWeightForPID": [3.3, 3.3, 3.3, 3.3, 3.3, 3.3, 3.3], - "CdevCeiling": [7, 7, 7, 8, 10, 11, 11], + "CdevWeightForPID": [0.455, 0.455, 0.455, 0.455, 0.455, 0.455, 0.455], + "CdevCeiling": [7, 7, 8, 9, 10, 11, 11], "LimitInfo": [0, 0, 0, 0, 10, 11, 11], "BindedPowerRail": "S2S_VDD_G3D", "PowerThreshold": [200, 200, 200, 200, 50, 0, 0], @@ -901,7 +901,7 @@ "BindedCdevInfo": [ { "CdevRequest": "tpu_cooling", - "LimitInfo": [0, 0, 0, 0, 3, 3, 3] + "LimitInfo": [0, 0, 0, 0, 2, 2, 2] } ] }, @@ -1003,13 +1003,7 @@ ], "VrThreshold":"NAN", "Multiplier":1, - "Monitor":true, - "BindedCdevInfo": [ - { - "CdevRequest": "tpu_cooling", - "LimitInfo": [0, 0, 0, 0, 3, 3, 3] - } - ] + "Monitor":true }, { "Name":"soft_ocp_gpu",