diff --git a/conf/init.tokay.rc b/conf/init.tokay.rc index 2dff8862..d1172b87 100644 --- a/conf/init.tokay.rc +++ b/conf/init.tokay.rc @@ -73,3 +73,7 @@ on fs # Permission for SSC mode enable chown system system /sys/class/backlight/panel0-backlight/ssc_en chmod 664 /sys/class/backlight/panel0-backlight/ssc_en + +# Disable Async DVFS +on property:sys.boot_completed=1 + write /sys/devices/platform/26040000.cal_if/async_dvfs_enabled 0 diff --git a/device-caimito-common.mk b/device-caimito-common.mk index 18b82721..3bbc4c73 100644 --- a/device-caimito-common.mk +++ b/device-caimito-common.mk @@ -27,7 +27,8 @@ PRODUCT_COPY_FILES += \ ifneq (,$(filter $(TARGET_DEVICE),komodo caiman tokay)) PRODUCT_COPY_FILES += \ $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/thermal_info_config_$(TARGET_DEVICE)_proto.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_proto.json \ - $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/vt_estimation_model_$(TARGET_DEVICE).tflite:$(TARGET_COPY_OUT_VENDOR)/etc/vt_estimation_model.tflite + $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/vt_estimation_model_$(TARGET_DEVICE).tflite:$(TARGET_COPY_OUT_VENDOR)/etc/vt_estimation_model.tflite \ + $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/vt_prediction_lstm_model_$(TARGET_DEVICE).tflite:$(TARGET_COPY_OUT_VENDOR)/etc/vt_prediction_lstm_model.tflite ifneq (,$(filter $(TARGET_BUILD_VARIANT), userdebug eng)) PRODUCT_COPY_FILES += \ $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/thermal_info_config_$(TARGET_DEVICE)_wingboard.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_wingboard.json diff --git a/perf/powerhint-caiman.json b/perf/powerhint-caiman.json index 91496adb..53087e27 100644 --- a/perf/powerhint-caiman.json +++ b/perf/powerhint-caiman.json @@ -3140,6 +3140,7 @@ "Value": "20 80" } ], + "GpuSysfsPath" : "/sys/devices/platform/1f000000.mali", "AdpfConfig": [ { "Name": "REFRESH_120FPS", @@ -3172,7 +3173,9 @@ "HBoostUclampMin": 722, "JunkCheckTimeFactor": 1.2, "LowFrameRateThreshold": 25, - "MaxRecordsNum": 300 + "MaxRecordsNum": 300, + "GpuBoost": true, + "GpuCapacityBoostMax": 40000 }, { "Name": "REFRESH_90FPS", @@ -3205,7 +3208,9 @@ "HBoostUclampMin": 722, "JunkCheckTimeFactor": 1.2, "LowFrameRateThreshold": 25, - "MaxRecordsNum": 300 + "MaxRecordsNum": 300, + "GpuBoost": true, + "GpuCapacityBoostMax": 32500 }, { "Name": "REFRESH_60FPS", @@ -3238,7 +3243,9 @@ "HBoostUclampMin": 722, "JunkCheckTimeFactor": 1.2, "LowFrameRateThreshold": 25, - "MaxRecordsNum": 300 + "MaxRecordsNum": 300, + "GpuBoost": true, + "GpuCapacityBoostMax": 25000 }, { "Name": "UiHighBoostWithoutPid", @@ -3260,7 +3267,8 @@ "UclampMin_Low": 196, "ReportingRateLimitNs": 1, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 5.0 + "StaleTimeFactor": 5.0, + "GpuBoost": false }, { "Name": "UiLowBoostWithoutPid", @@ -3282,7 +3290,8 @@ "UclampMin_Low": 52, "ReportingRateLimitNs": 1, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 5.0 + "StaleTimeFactor": 5.0, + "GpuBoost": false }, { "Name": "UiLowNoneBoost", @@ -3304,7 +3313,8 @@ "UclampMin_Low": 0, "ReportingRateLimitNs": 1, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 5.0 + "StaleTimeFactor": 5.0, + "GpuBoost": false } ] } diff --git a/perf/powerhint-komodo.json b/perf/powerhint-komodo.json index dbe57195..89da0af6 100644 --- a/perf/powerhint-komodo.json +++ b/perf/powerhint-komodo.json @@ -3140,6 +3140,7 @@ "Value": "20 80" } ], + "GpuSysfsPath" : "/sys/devices/platform/1f000000.mali", "AdpfConfig": [ { "Name": "REFRESH_120FPS", @@ -3172,7 +3173,9 @@ "HBoostUclampMin": 722, "JunkCheckTimeFactor": 1.2, "LowFrameRateThreshold": 25, - "MaxRecordsNum": 300 + "MaxRecordsNum": 300, + "GpuBoost": true, + "GpuCapacityBoostMax": 40000 }, { "Name": "REFRESH_90FPS", @@ -3205,7 +3208,9 @@ "HBoostUclampMin": 722, "JunkCheckTimeFactor": 1.2, "LowFrameRateThreshold": 25, - "MaxRecordsNum": 300 + "MaxRecordsNum": 300, + "GpuBoost": true, + "GpuCapacityBoostMax": 32500 }, { "Name": "REFRESH_60FPS", @@ -3238,7 +3243,9 @@ "HBoostUclampMin": 722, "JunkCheckTimeFactor": 1.2, "LowFrameRateThreshold": 25, - "MaxRecordsNum": 300 + "MaxRecordsNum": 300, + "GpuBoost": true, + "GpuCapacityBoostMax": 25000 }, { "Name": "UiHighBoostWithoutPid", @@ -3260,7 +3267,8 @@ "UclampMin_Low": 196, "ReportingRateLimitNs": 1, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 15.0 + "StaleTimeFactor": 15.0, + "GpuBoost": false }, { "Name": "UiLowBoostWithoutPid", @@ -3282,7 +3290,8 @@ "UclampMin_Low": 52, "ReportingRateLimitNs": 1, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 15.0 + "StaleTimeFactor": 15.0, + "GpuBoost": false }, { "Name": "UiLowNoneBoost", @@ -3304,7 +3313,8 @@ "UclampMin_Low": 0, "ReportingRateLimitNs": 1, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 15.0 + "StaleTimeFactor": 15.0, + "GpuBoost": false } ] } diff --git a/perf/powerhint-tokay.json b/perf/powerhint-tokay.json index 91496adb..53087e27 100644 --- a/perf/powerhint-tokay.json +++ b/perf/powerhint-tokay.json @@ -3140,6 +3140,7 @@ "Value": "20 80" } ], + "GpuSysfsPath" : "/sys/devices/platform/1f000000.mali", "AdpfConfig": [ { "Name": "REFRESH_120FPS", @@ -3172,7 +3173,9 @@ "HBoostUclampMin": 722, "JunkCheckTimeFactor": 1.2, "LowFrameRateThreshold": 25, - "MaxRecordsNum": 300 + "MaxRecordsNum": 300, + "GpuBoost": true, + "GpuCapacityBoostMax": 40000 }, { "Name": "REFRESH_90FPS", @@ -3205,7 +3208,9 @@ "HBoostUclampMin": 722, "JunkCheckTimeFactor": 1.2, "LowFrameRateThreshold": 25, - "MaxRecordsNum": 300 + "MaxRecordsNum": 300, + "GpuBoost": true, + "GpuCapacityBoostMax": 32500 }, { "Name": "REFRESH_60FPS", @@ -3238,7 +3243,9 @@ "HBoostUclampMin": 722, "JunkCheckTimeFactor": 1.2, "LowFrameRateThreshold": 25, - "MaxRecordsNum": 300 + "MaxRecordsNum": 300, + "GpuBoost": true, + "GpuCapacityBoostMax": 25000 }, { "Name": "UiHighBoostWithoutPid", @@ -3260,7 +3267,8 @@ "UclampMin_Low": 196, "ReportingRateLimitNs": 1, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 5.0 + "StaleTimeFactor": 5.0, + "GpuBoost": false }, { "Name": "UiLowBoostWithoutPid", @@ -3282,7 +3290,8 @@ "UclampMin_Low": 52, "ReportingRateLimitNs": 1, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 5.0 + "StaleTimeFactor": 5.0, + "GpuBoost": false }, { "Name": "UiLowNoneBoost", @@ -3304,7 +3313,8 @@ "UclampMin_Low": 0, "ReportingRateLimitNs": 1, "TargetTimeFactor": 1.0, - "StaleTimeFactor": 5.0 + "StaleTimeFactor": 5.0, + "GpuBoost": false } ] } diff --git a/powerstats/caiman/service.cpp b/powerstats/caiman/service.cpp index acf90cd3..563a9f5c 100644 --- a/powerstats/caiman/service.cpp +++ b/powerstats/caiman/service.cpp @@ -49,7 +49,7 @@ int main() { std::shared_ptr p = ndk::SharedRefBase::make(); - addDisplayVrr(p, "Display"); + addPixelStateResidencyDataProvider(p, "Display"); addZumaProCommonDataProviders(p); addDisplay(p); diff --git a/powerstats/komodo/service.cpp b/powerstats/komodo/service.cpp index acf90cd3..563a9f5c 100644 --- a/powerstats/komodo/service.cpp +++ b/powerstats/komodo/service.cpp @@ -49,7 +49,7 @@ int main() { std::shared_ptr p = ndk::SharedRefBase::make(); - addDisplayVrr(p, "Display"); + addPixelStateResidencyDataProvider(p, "Display"); addZumaProCommonDataProviders(p); addDisplay(p); diff --git a/powerstats/tokay/service.cpp b/powerstats/tokay/service.cpp index fa2d1a99..6b1d41bf 100644 --- a/powerstats/tokay/service.cpp +++ b/powerstats/tokay/service.cpp @@ -62,6 +62,7 @@ int main() { std::shared_ptr p = ndk::SharedRefBase::make(); + addPixelStateResidencyDataProvider(p, ""); addZumaProCommonDataProviders(p); addDisplay(p); diff --git a/thermal/thermal_info_config_caiman.json b/thermal/thermal_info_config_caiman.json index cdb40daf..86ff8862 100644 --- a/thermal/thermal_info_config_caiman.json +++ b/thermal/thermal_info_config_caiman.json @@ -188,6 +188,19 @@ "Coefficient": [1.0, -1.0], "Multiplier": 1 }, + { + "Name": "VIRTUAL-SKIN-LSTM-MODEL", + "Type": "UNKNOWN", + "VirtualSensor": true, + "ModelPath": "vt_prediction_lstm_model.tflite", + "Formula": "USE_ML_MODEL", + "Combination": ["north_therm", "soc_therm", "charging_therm", "disp_therm", "battery", "quiet_therm", "usb_pwr_therm", "rfpa_therm", "btmspkr_therm"], + "PreviousSampleCount": 11, + "OutputLabelCount": 6, + "Multiplier": 0.001, + "SupportUnderStampling": true, + "ValidateInput": true + }, { "Name": "STATS-UPDATOR", "Type": "UNKNOWN", @@ -195,8 +208,8 @@ "Hidden": true, "TriggerSensor": ["north_therm", "soc_therm", "charging_therm", "disp_therm", "quiet_therm", "usb_pwr_therm", "rfpa_therm", "btmspkr_therm"], "Formula": "WEIGHTED_AVG", - "Combination": ["VIRTUAL-SKIN-MODEL", "VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-LEGACY-DIFF"], - "Coefficient": [0.0, 0.0, 0.0], + "Combination": ["VIRTUAL-SKIN-MODEL", "VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-LEGACY-DIFF", "VIRTUAL-SKIN-LSTM-MODEL"], + "Coefficient": [0.0, 0.0, 0.0, 0.0], "Multiplier": 1, "SendPowerHint": true, "PollingDelay": 300000, @@ -218,6 +231,9 @@ "SendCallback": true, "PollingDelay": 300000, "PassiveDelay": 7000, + "PredictorInfo": { + "Sensor": "VIRTUAL-SKIN-LSTM-MODEL" + }, "BindedCdevInfo": [ { "CdevRequest": "tpu_cooling", diff --git a/thermal/thermal_info_config_komodo.json b/thermal/thermal_info_config_komodo.json index f9b810cf..bbad2f48 100644 --- a/thermal/thermal_info_config_komodo.json +++ b/thermal/thermal_info_config_komodo.json @@ -211,6 +211,19 @@ "Coefficient": [1.0, -1.0], "Multiplier": 1 }, + { + "Name": "VIRTUAL-SKIN-LSTM-MODEL", + "Type": "UNKNOWN", + "VirtualSensor": true, + "ModelPath": "vt_prediction_lstm_model.tflite", + "Formula": "USE_ML_MODEL", + "Combination": ["north_therm", "soc_therm", "charging_therm", "disp_therm", "battery", "quiet_therm", "usb_pwr_therm", "rfpa_therm", "btmspkr_therm"], + "PreviousSampleCount": 11, + "OutputLabelCount": 6, + "Multiplier": 0.001, + "SupportUnderSampling": true, + "ValidateInput": true + }, { "Name": "STATS-UPDATOR", "Type": "UNKNOWN", @@ -218,14 +231,14 @@ "Hidden": true, "TriggerSensor": ["north_therm", "soc_therm", "charging_therm", "disp_therm", "quiet_therm", "usb_pwr_therm", "rfpa_therm", "btmspkr_therm"], "Formula": "WEIGHTED_AVG", - "Combination": ["VIRTUAL-SKIN-MODEL", "VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-LEGACY-DIFF"], - "Coefficient": [0.0, 0.0, 0.0], + "Combination": ["VIRTUAL-SKIN-MODEL", "VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-LEGACY-DIFF", "VIRTUAL-SKIN-LSTM-MODEL"], + "Coefficient": [0.0, 0.0, 0.0, 0.0], "Multiplier": 1, "SendPowerHint": true, "PollingDelay": 300000, "PassiveDelay": 7000 }, - { + { "Name": "VIRTUAL-SKIN", "Type": "SKIN", "Version": "6.1", @@ -241,6 +254,9 @@ "SendCallback": true, "PollingDelay": 300000, "PassiveDelay": 7000, + "PredictorInfo": { + "Sensor": "VIRTUAL-SKIN-LSTM-MODEL" + }, "BindedCdevInfo": [ { "CdevRequest": "tpu_cooling", diff --git a/thermal/thermal_info_config_tokay.json b/thermal/thermal_info_config_tokay.json index bfd68b37..6b8bc403 100644 --- a/thermal/thermal_info_config_tokay.json +++ b/thermal/thermal_info_config_tokay.json @@ -178,6 +178,19 @@ "Coefficient": [1.0, -1.0], "Multiplier": 1 }, + { + "Name": "VIRTUAL-SKIN-LSTM-MODEL", + "Type": "UNKNOWN", + "VirtualSensor": true, + "ModelPath": "vt_prediction_lstm_model.tflite", + "Formula": "USE_ML_MODEL", + "Combination": ["north_therm", "soc_therm", "charging_therm", "disp_therm", "battery", "quiet_therm", "usb_pwr_therm", "rfpa_therm", "btmspkr_therm"], + "PreviousSampleCount": 11, + "OutputLabelCount": 6, + "Multiplier": 0.001, + "SupportUnderSampling": true, + "ValidateInput": true + }, { "Name": "STATS-UPDATOR", "Type": "UNKNOWN", @@ -185,8 +198,8 @@ "Hidden": true, "TriggerSensor": ["north_therm", "soc_therm", "charging_therm", "disp_therm", "quiet_therm", "usb_pwr_therm", "rfpa_therm", "btmspkr_therm"], "Formula": "WEIGHTED_AVG", - "Combination": ["VIRTUAL-SKIN-MODEL", "VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-LEGACY-DIFF"], - "Coefficient": [0.0, 0.0, 0.0], + "Combination": ["VIRTUAL-SKIN-MODEL", "VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-LEGACY-DIFF", "VIRTUAL-SKIN-LSTM-MODEL"], + "Coefficient": [0.0, 0.0, 0.0, 0.0], "Multiplier": 1, "SendPowerHint": true, "PollingDelay": 300000, @@ -208,6 +221,9 @@ "SendCallback": true, "PollingDelay": 300000, "PassiveDelay": 7000, + "PredictorInfo": { + "Sensor": "VIRTUAL-SKIN-LSTM-MODEL" + }, "BindedCdevInfo": [ { "CdevRequest": "tpu_cooling", diff --git a/thermal/vt_prediction_lstm_model_caiman.tflite b/thermal/vt_prediction_lstm_model_caiman.tflite new file mode 100644 index 00000000..14f07b5a Binary files /dev/null and b/thermal/vt_prediction_lstm_model_caiman.tflite differ diff --git a/thermal/vt_prediction_lstm_model_komodo.tflite b/thermal/vt_prediction_lstm_model_komodo.tflite new file mode 100644 index 00000000..8a8e2611 Binary files /dev/null and b/thermal/vt_prediction_lstm_model_komodo.tflite differ diff --git a/thermal/vt_prediction_lstm_model_tokay.tflite b/thermal/vt_prediction_lstm_model_tokay.tflite new file mode 100644 index 00000000..100d94e5 Binary files /dev/null and b/thermal/vt_prediction_lstm_model_tokay.tflite differ