diff --git a/device-caiman.mk b/device-caiman.mk index b97b6362..3cea0154 100644 --- a/device-caiman.mk +++ b/device-caiman.mk @@ -505,3 +505,8 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/google/caimito/bluetooth/audio_set_configurations.json:$(TARGET_COPY_OUT_VENDOR)/etc/aidl/le_audio/aidl_audio_set_configurations.json + +# Enable APF by default +PRODUCT_VENDOR_PROPERTIES += \ + vendor.powerhal.apf_disabled=false \ + vendor.powerhal.apf_enabled=true diff --git a/device-komodo.mk b/device-komodo.mk index f78c00ec..df18f582 100644 --- a/device-komodo.mk +++ b/device-komodo.mk @@ -506,3 +506,8 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/google/caimito/bluetooth/audio_set_configurations.json:$(TARGET_COPY_OUT_VENDOR)/etc/aidl/le_audio/aidl_audio_set_configurations.json + +# Enable APF by default +PRODUCT_VENDOR_PROPERTIES += \ + vendor.powerhal.apf_disabled=false \ + vendor.powerhal.apf_enabled=true diff --git a/device-ripcurrentpro.mk b/device-ripcurrentpro.mk index 9434e674..d3d9ef8f 100644 --- a/device-ripcurrentpro.mk +++ b/device-ripcurrentpro.mk @@ -245,3 +245,8 @@ PRODUCT_VENDOR_PROPERTIES += \ # Thread HAL PRODUCT_PACKAGES += \ com.google.caimito.hardware.threadnetwork + +# Enable APF by default +PRODUCT_VENDOR_PROPERTIES += \ + vendor.powerhal.apf_disabled=false \ + vendor.powerhal.apf_enabled=true diff --git a/device-tokay.mk b/device-tokay.mk index d41e0b30..59d7850e 100644 --- a/device-tokay.mk +++ b/device-tokay.mk @@ -475,3 +475,8 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/google/caimito/bluetooth/audio_set_configurations.json:$(TARGET_COPY_OUT_VENDOR)/etc/aidl/le_audio/aidl_audio_set_configurations.json + +# Enable APF by default +PRODUCT_VENDOR_PROPERTIES += \ + vendor.powerhal.apf_disabled=false \ + vendor.powerhal.apf_enabled=true diff --git a/perf/powerhint-caiman.json b/perf/powerhint-caiman.json index 0bed18b6..ded0c439 100644 --- a/perf/powerhint-caiman.json +++ b/perf/powerhint-caiman.json @@ -1107,6 +1107,13 @@ "Duration": 5000, "Value": "512" }, + { + "PowerHint": "LAUNCH", + "Node": "TAUClampBoost", + "Duration": 5000, + "Value": "765", + "EnableProperty": "vendor.powerhal.apf_disabled" + }, { "PowerHint": "LAUNCH", "Node": "FGUClampBoost", @@ -1181,7 +1188,8 @@ "PowerHint": "LAUNCH", "Node": "TAAutoPreferFit", "Duration": 5000, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", @@ -1189,35 +1197,47 @@ "Duration": 5000, "Value": "0xff" }, + { + "PowerHint": "LAUNCH", + "Node": "TAPreferredIdleMaskMid", + "Duration": 5000, + "Value": "0xff", + "EnableProperty": "vendor.powerhal.apf_disabled" + }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceEnable", "Duration": 5000, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceHighValue", - "Duration": 5000, - "Value": "765" + "Duration": 5000, + "Value": "765", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceHighPrio", "Duration": 5000, - "Value": "110" + "Value": "110", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceMidValue", - "Duration": 5000, - "Value": "590" + "Duration": 5000, + "Value": "590", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceMidPrio", "Duration": 5000, - "Value": "139" + "Value": "139", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", @@ -3472,13 +3492,15 @@ "PowerHint": "GAME", "Node": "AutoMigrationMarginsEnable", "Duration": 0, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.amm_enabled" }, { "PowerHint": "GAME", "Node": "AutoDvfsHeadroomEnable", "Duration": 0, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.amm_enabled" }, { "PowerHint": "GAME", @@ -3779,6 +3801,18 @@ "Node": "MIFTargetLoad", "Duration": 0, "Value": "20 80" + }, + { + "PowerHint": "DISABLE_AMM", + "Node": "AutoMigrationMarginsEnable", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "DISABLE_AMM", + "Node": "AutoDvfsHeadroomEnable", + "Duration": 0, + "Value": "0" } ], "GpuSysfsPath" : "/sys/devices/platform/1f000000.mali", diff --git a/perf/powerhint-komodo.json b/perf/powerhint-komodo.json index 0ccc1606..feaa5f98 100644 --- a/perf/powerhint-komodo.json +++ b/perf/powerhint-komodo.json @@ -1107,6 +1107,13 @@ "Duration": 5000, "Value": "512" }, + { + "PowerHint": "LAUNCH", + "Node": "TAUClampBoost", + "Duration": 5000, + "Value": "765", + "EnableProperty": "vendor.powerhal.apf_disabled" + }, { "PowerHint": "LAUNCH", "Node": "FGUClampBoost", @@ -1181,7 +1188,8 @@ "PowerHint": "LAUNCH", "Node": "TAAutoPreferFit", "Duration": 5000, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", @@ -1189,35 +1197,47 @@ "Duration": 5000, "Value": "0xff" }, + { + "PowerHint": "LAUNCH", + "Node": "TAPreferredIdleMaskMid", + "Duration": 5000, + "Value": "0xff", + "EnableProperty": "vendor.powerhal.apf_disabled" + }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceEnable", "Duration": 5000, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceHighValue", - "Duration": 5000, - "Value": "765" + "Duration": 5000, + "Value": "765", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceHighPrio", "Duration": 5000, - "Value": "110" + "Value": "110", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceMidValue", - "Duration": 5000, - "Value": "590" + "Duration": 5000, + "Value": "590", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceMidPrio", "Duration": 5000, - "Value": "139" + "Value": "139", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", @@ -3472,13 +3492,15 @@ "PowerHint": "GAME", "Node": "AutoMigrationMarginsEnable", "Duration": 0, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.amm_enabled" }, { "PowerHint": "GAME", "Node": "AutoDvfsHeadroomEnable", "Duration": 0, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.amm_enabled" }, { "PowerHint": "GAME", @@ -3779,6 +3801,18 @@ "Node": "MIFTargetLoad", "Duration": 0, "Value": "20 80" + }, + { + "PowerHint": "DISABLE_AMM", + "Node": "AutoMigrationMarginsEnable", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "DISABLE_AMM", + "Node": "AutoDvfsHeadroomEnable", + "Duration": 0, + "Value": "0" } ], "GpuSysfsPath" : "/sys/devices/platform/1f000000.mali", diff --git a/perf/powerhint-ripcurrentpro.json b/perf/powerhint-ripcurrentpro.json index f970372a..274b0e9f 100644 --- a/perf/powerhint-ripcurrentpro.json +++ b/perf/powerhint-ripcurrentpro.json @@ -991,6 +991,13 @@ "Duration": 5000, "Value": "512" }, + { + "PowerHint": "LAUNCH", + "Node": "TAUClampBoost", + "Duration": 5000, + "Value": "765", + "EnableProperty": "vendor.powerhal.apf_disabled" + }, { "PowerHint": "LAUNCH", "Node": "FGUClampBoost", @@ -1065,7 +1072,8 @@ "PowerHint": "LAUNCH", "Node": "TAAutoPreferFit", "Duration": 5000, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", @@ -1073,35 +1081,47 @@ "Duration": 5000, "Value": "0xff" }, + { + "PowerHint": "LAUNCH", + "Node": "TAPreferredIdleMaskMid", + "Duration": 5000, + "Value": "0xff", + "EnableProperty": "vendor.powerhal.apf_disabled" + }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceEnable", "Duration": 5000, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceHighValue", - "Duration": 5000, - "Value": "765" + "Duration": 5000, + "Value": "765", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceHighPrio", "Duration": 5000, - "Value": "110" + "Value": "110", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceMidValue", - "Duration": 5000, - "Value": "590" + "Duration": 5000, + "Value": "590", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceMidPrio", "Duration": 5000, - "Value": "139" + "Value": "139", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", diff --git a/perf/powerhint-tokay.json b/perf/powerhint-tokay.json index 1bbab17a..b4e6b7e1 100644 --- a/perf/powerhint-tokay.json +++ b/perf/powerhint-tokay.json @@ -1107,6 +1107,13 @@ "Duration": 5000, "Value": "512" }, + { + "PowerHint": "LAUNCH", + "Node": "TAUClampBoost", + "Duration": 5000, + "Value": "765", + "EnableProperty": "vendor.powerhal.apf_disabled" + }, { "PowerHint": "LAUNCH", "Node": "FGUClampBoost", @@ -1181,7 +1188,8 @@ "PowerHint": "LAUNCH", "Node": "TAAutoPreferFit", "Duration": 5000, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", @@ -1189,35 +1197,47 @@ "Duration": 5000, "Value": "0xff" }, + { + "PowerHint": "LAUNCH", + "Node": "TAPreferredIdleMaskMid", + "Duration": 5000, + "Value": "0xff", + "EnableProperty": "vendor.powerhal.apf_disabled" + }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceEnable", "Duration": 5000, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceHighValue", - "Duration": 5000, - "Value": "765" + "Duration": 5000, + "Value": "765", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceHighPrio", "Duration": 5000, - "Value": "110" + "Value": "110", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceMidValue", - "Duration": 5000, - "Value": "590" + "Duration": 5000, + "Value": "590", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceMidPrio", "Duration": 5000, - "Value": "139" + "Value": "139", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", @@ -3472,13 +3492,15 @@ "PowerHint": "GAME", "Node": "AutoMigrationMarginsEnable", "Duration": 0, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.amm_enabled" }, { "PowerHint": "GAME", "Node": "AutoDvfsHeadroomEnable", "Duration": 0, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.amm_enabled" }, { "PowerHint": "GAME", @@ -3779,6 +3801,18 @@ "Node": "MIFTargetLoad", "Duration": 0, "Value": "20 80" + }, + { + "PowerHint": "DISABLE_AMM", + "Node": "AutoMigrationMarginsEnable", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "DISABLE_AMM", + "Node": "AutoDvfsHeadroomEnable", + "Duration": 0, + "Value": "0" } ], "GpuSysfsPath" : "/sys/devices/platform/1f000000.mali", diff --git a/thermal/thermal_info_config_caiman.json b/thermal/thermal_info_config_caiman.json index d1ec90fb..6369238a 100644 --- a/thermal/thermal_info_config_caiman.json +++ b/thermal/thermal_info_config_caiman.json @@ -1133,22 +1133,29 @@ ] }, { - "Name": "VIRTUAL-USB-THROTTLING", + "Name": "USB-MINUS-CHARGING", "Type": "UNKNOWN", "VirtualSensor": true, "Formula": "WEIGHTED_AVG", + "Combination": ["usb_pwr_therm", "charging_therm"], + "Coefficient": [1.0, -1.0] + }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Formula": "COUNT_THRESHOLD", "TriggerSensor": "usb_pwr_therm", - "Combination": ["usb_pwr_therm"], - "Coefficient": [1.0], - "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 55.0, "NaN", "NaN"], - "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 1.9, 0.0, 0.0], + "Combination": ["usb_pwr_therm", "usb_pwr_therm", "USB-MINUS-CHARGING"], + "Coefficient": [55000.0, 50000.0, 2000.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 2.0, "NaN", "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.9, 0.0, 0.0], "BindedCdevInfo": [ { "CdevRequest": "usbc-port", "LimitInfo": [0, 0, 0, 0, 1, 1, 1] } ], - "Multiplier": 0.001, "PollingDelay": 300000, "PassiveDelay": 7000 }, @@ -1156,13 +1163,12 @@ "Name": "VIRTUAL-USB-UI", "Type": "USB_PORT", "VirtualSensor": true, - "Formula": "WEIGHTED_AVG", + "Formula": "COUNT_THRESHOLD", "TriggerSensor": "usb_pwr_therm", - "Combination": ["usb_pwr_therm"], - "Coefficient": [1.0], - "HotThreshold": ["NaN", "NaN", "NaN", "NaN", "NaN", 57.0, "NaN"], - "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.0, 1.9, 0.0], - "Multiplier": 0.001, + "Combination": ["usb_pwr_therm", "usb_pwr_therm", "USB-MINUS-CHARGING"], + "Coefficient": [57000.0, 52000.0, 2000.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", "NaN", 2.0, "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.0, 0.9, 0.0], "PollingDelay": 300000, "PassiveDelay": 7000, "SendCallback": true diff --git a/thermal/thermal_info_config_charge_caiman.json b/thermal/thermal_info_config_charge_caiman.json index f2ad61be..52174348 100644 --- a/thermal/thermal_info_config_charge_caiman.json +++ b/thermal/thermal_info_config_charge_caiman.json @@ -265,22 +265,29 @@ ] }, { - "Name": "VIRTUAL-USB-THROTTLING", + "Name": "USB-MINUS-CHARGING", "Type": "UNKNOWN", "VirtualSensor": true, "Formula": "WEIGHTED_AVG", + "Combination": ["usb_pwr_therm", "charging_therm"], + "Coefficient": [1.0, -1.0] + }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Formula": "COUNT_THRESHOLD", "TriggerSensor": "usb_pwr_therm", - "Combination": ["usb_pwr_therm"], - "Coefficient": [1.0], - "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 55.0, "NaN", "NaN"], - "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 1.9, 0.0, 0.0], + "Combination": ["usb_pwr_therm", "usb_pwr_therm", "USB-MINUS-CHARGING"], + "Coefficient": [55000.0, 50000.0, 2000.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 2.0, "NaN", "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.9, 0.0, 0.0], "BindedCdevInfo": [ { "CdevRequest": "usbc-port", "LimitInfo": [0, 0, 0, 0, 1, 1, 1] } ], - "Multiplier": 0.001, "PollingDelay": 300000, "PassiveDelay": 7000 } diff --git a/thermal/thermal_info_config_charge_komodo.json b/thermal/thermal_info_config_charge_komodo.json index 1851ceb4..07150dae 100644 --- a/thermal/thermal_info_config_charge_komodo.json +++ b/thermal/thermal_info_config_charge_komodo.json @@ -276,22 +276,29 @@ ] }, { - "Name": "VIRTUAL-USB-THROTTLING", + "Name": "USB-MINUS-CHARGING", "Type": "UNKNOWN", "VirtualSensor": true, "Formula": "WEIGHTED_AVG", + "Combination": ["usb_pwr_therm", "charging_therm"], + "Coefficient": [1.0, -1.0] + }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Formula": "COUNT_THRESHOLD", "TriggerSensor": "usb_pwr_therm", - "Combination": ["usb_pwr_therm"], - "Coefficient": [1.0], - "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 55.0, "NaN", "NaN"], - "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 1.9, 0.0, 0.0], + "Combination": ["usb_pwr_therm", "usb_pwr_therm", "USB-MINUS-CHARGING"], + "Coefficient": [55000.0, 50000.0, 2000.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 2.0, "NaN", "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.9, 0.0, 0.0], "BindedCdevInfo": [ { "CdevRequest": "usbc-port", "LimitInfo": [0, 0, 0, 0, 1, 1, 1] } ], - "Multiplier": 0.001, "PollingDelay": 300000, "PassiveDelay": 7000 } diff --git a/thermal/thermal_info_config_charge_tokay.json b/thermal/thermal_info_config_charge_tokay.json index 740ecfa1..e5cc66fd 100644 --- a/thermal/thermal_info_config_charge_tokay.json +++ b/thermal/thermal_info_config_charge_tokay.json @@ -243,22 +243,29 @@ ] }, { - "Name": "VIRTUAL-USB-THROTTLING", + "Name": "USB-MINUS-CHARGING", "Type": "UNKNOWN", "VirtualSensor": true, "Formula": "WEIGHTED_AVG", + "Combination": ["usb_pwr_therm", "charging_therm"], + "Coefficient": [1.0, -1.0] + }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Formula": "COUNT_THRESHOLD", "TriggerSensor": "usb_pwr_therm", - "Combination": ["usb_pwr_therm"], - "Coefficient": [1.0], - "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 55.0, "NaN", "NaN"], - "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 1.9, 0.0, 0.0], + "Combination": ["usb_pwr_therm", "usb_pwr_therm", "USB-MINUS-CHARGING"], + "Coefficient": [55000.0, 50000.0, 2000.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 2.0, "NaN", "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.9, 0.0, 0.0], "BindedCdevInfo": [ { "CdevRequest": "usbc-port", "LimitInfo": [0, 0, 0, 0, 1, 1, 1] } ], - "Multiplier": 0.001, "PollingDelay": 300000, "PassiveDelay": 7000 } diff --git a/thermal/thermal_info_config_komodo.json b/thermal/thermal_info_config_komodo.json index 045e4ad8..e1ae5722 100644 --- a/thermal/thermal_info_config_komodo.json +++ b/thermal/thermal_info_config_komodo.json @@ -1156,22 +1156,29 @@ ] }, { - "Name": "VIRTUAL-USB-THROTTLING", + "Name": "USB-MINUS-CHARGING", "Type": "UNKNOWN", "VirtualSensor": true, "Formula": "WEIGHTED_AVG", + "Combination": ["usb_pwr_therm", "charging_therm"], + "Coefficient": [1.0, -1.0] + }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Formula": "COUNT_THRESHOLD", "TriggerSensor": "usb_pwr_therm", - "Combination": ["usb_pwr_therm"], - "Coefficient": [1.0], - "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 55.0, "NaN", "NaN"], - "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 1.9, 0.0, 0.0], + "Combination": ["usb_pwr_therm", "usb_pwr_therm", "USB-MINUS-CHARGING"], + "Coefficient": [55000.0, 50000.0, 2000.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 2.0, "NaN", "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.9, 0.0, 0.0], "BindedCdevInfo": [ { "CdevRequest": "usbc-port", "LimitInfo": [0, 0, 0, 0, 1, 1, 1] } ], - "Multiplier": 0.001, "PollingDelay": 300000, "PassiveDelay": 7000 }, @@ -1179,13 +1186,12 @@ "Name": "VIRTUAL-USB-UI", "Type": "USB_PORT", "VirtualSensor": true, - "Formula": "WEIGHTED_AVG", + "Formula": "COUNT_THRESHOLD", "TriggerSensor": "usb_pwr_therm", - "Combination": ["usb_pwr_therm"], - "Coefficient": [1.0], - "HotThreshold": ["NaN", "NaN", "NaN", "NaN", "NaN", 57.0, "NaN"], - "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.0, 1.9, 0.0], - "Multiplier": 0.001, + "Combination": ["usb_pwr_therm", "usb_pwr_therm", "USB-MINUS-CHARGING"], + "Coefficient": [57000.0, 52000.0, 2000.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", "NaN", 2.0, "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.0, 0.9, 0.0], "PollingDelay": 300000, "PassiveDelay": 7000, "SendCallback": true diff --git a/thermal/thermal_info_config_tokay.json b/thermal/thermal_info_config_tokay.json index 05b1ead8..30a492c8 100644 --- a/thermal/thermal_info_config_tokay.json +++ b/thermal/thermal_info_config_tokay.json @@ -1090,22 +1090,29 @@ ] }, { - "Name": "VIRTUAL-USB-THROTTLING", + "Name": "USB-MINUS-CHARGING", "Type": "UNKNOWN", "VirtualSensor": true, "Formula": "WEIGHTED_AVG", + "Combination": ["usb_pwr_therm", "charging_therm"], + "Coefficient": [1.0, -1.0] + }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Formula": "COUNT_THRESHOLD", "TriggerSensor": "usb_pwr_therm", - "Combination": ["usb_pwr_therm"], - "Coefficient": [1.0], - "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 55.0, "NaN", "NaN"], - "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 1.9, 0.0, 0.0], + "Combination": ["usb_pwr_therm", "usb_pwr_therm", "USB-MINUS-CHARGING"], + "Coefficient": [55000.0, 50000.0, 2000.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 2.0, "NaN", "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.9, 0.0, 0.0], "BindedCdevInfo": [ { "CdevRequest": "usbc-port", "LimitInfo": [0, 0, 0, 0, 1, 1, 1] } ], - "Multiplier": 0.001, "PollingDelay": 300000, "PassiveDelay": 7000 }, @@ -1113,13 +1120,12 @@ "Name": "VIRTUAL-USB-UI", "Type": "USB_PORT", "VirtualSensor": true, - "Formula": "WEIGHTED_AVG", + "Formula": "COUNT_THRESHOLD", "TriggerSensor": "usb_pwr_therm", - "Combination": ["usb_pwr_therm"], - "Coefficient": [1.0], - "HotThreshold": ["NaN", "NaN", "NaN", "NaN", "NaN", 57.0, "NaN"], - "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.0, 1.9, 0.0], - "Multiplier": 0.001, + "Combination": ["usb_pwr_therm", "usb_pwr_therm", "USB-MINUS-CHARGING"], + "Coefficient": [57000.0, 52000.0, 2000.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", "NaN", 2.0, "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.0, 0.9, 0.0], "PollingDelay": 300000, "PassiveDelay": 7000, "SendCallback": true