thermal: bringup PID thermal throttling for CPU GPU

Bug: 196478280
Test: run burn8 and manhattan
Change-Id: I447fa5bc452f413f65c46c235a5a3692b628586b
This commit is contained in:
TeYuan Wang 2022-03-30 11:12:23 +08:00 committed by Wei Wang
parent 63032d0c25
commit f0cda432e8
7 changed files with 921 additions and 1580 deletions

View file

@ -109,7 +109,8 @@ DEVICE_MANIFEST_FILE += \
# Thermal Config
PRODUCT_COPY_FILES += \
device/google/pantah/thermal_info_config_cheetah.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json
device/google/pantah/thermal_info_config_cheetah.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \
device/google/pantah/thermal_info_config_A0.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_A0.json
# Power HAL config
PRODUCT_COPY_FILES += \

View file

@ -79,7 +79,8 @@ DEVICE_MANIFEST_FILE += \
# Thermal Config
PRODUCT_COPY_FILES += \
device/google/pantah/thermal_info_config_cloudripper.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json
device/google/pantah/thermal_info_config_cloudripper.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \
device/google/pantah/thermal_info_config_A0.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_A0.json
# Power HAL config
PRODUCT_COPY_FILES += \

View file

@ -97,7 +97,8 @@ DEVICE_MANIFEST_FILE += \
# Thermal Config
PRODUCT_COPY_FILES += \
device/google/pantah/thermal_info_config_panther.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json
device/google/pantah/thermal_info_config_panther.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \
device/google/pantah/thermal_info_config_A0.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_A0.json
# Power HAL config
PRODUCT_COPY_FILES += \

View file

@ -84,7 +84,8 @@ DEVICE_MANIFEST_FILE += \
# Thermal Config
PRODUCT_COPY_FILES += \
device/google/pantah/thermal_info_config_ravenclaw.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json
device/google/pantah/thermal_info_config_ravenclaw.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \
device/google/pantah/thermal_info_config_A0.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_A0.json
# Power HAL config
PRODUCT_COPY_FILES += \

591
thermal_info_config_A0.json Normal file
View file

@ -0,0 +1,591 @@
{
"Sensors":[
{
"Name":"battery",
"Type":"BATTERY",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
"NAN",
"NAN",
"60.0"
],
"VrThreshold":"NAN",
"Multiplier":0.001
},
{
"Name":"LITTLE",
"Type":"CPU",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
"NAN",
"NAN",
115.0
],
"VrThreshold":"NAN",
"Multiplier":0.001
},
{
"Name":"MID",
"Type":"CPU",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
"NAN",
"NAN",
115.0
],
"VrThreshold":"NAN",
"Multiplier":0.001
},
{
"Name":"G3D",
"Type":"GPU",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
"NAN",
"NAN",
115.0
],
"VrThreshold":"NAN",
"Multiplier":0.001
},
{
"Name":"battery_cycle",
"Type":"BCL_VOLTAGE",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
"NAN",
"NAN",
"NAN"
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":false
},
{
"Name":"critical-battery-cell",
"Type":"BCL_VOLTAGE",
"VirtualSensor":true,
"Formula":"COUNT_THRESHOLD",
"TriggerSensor": "vdroop1",
"Combination":[
"battery",
"battery_cycle",
"vdroop1"
],
"Coefficient":[
"-10000",
"400",
"1000"
],
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
"NAN",
3.00,
"NAN"
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":true
},
{
"Name":"FLASH_LED_REDUCE",
"Type":"UNKNOWN",
"VirtualSensor":true,
"Formula":"COUNT_THRESHOLD",
"TriggerSensor": "vdroop1",
"Combination":[
"battery",
"battery_cycle",
"vdroop1"
],
"Coefficient":[
"-10000",
"400",
"1000"
],
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
3.00,
"NAN",
"NAN"
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":true,
"SendPowerHint":true
},
{
"Name":"soc",
"Type":"BCL_PERCENTAGE",
"HotThreshold":[
"NAN",
80,
"NAN",
90,
93,
96,
"NAN"
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":true,
"PollingDelay":300000,
"PassiveDelay":5000,
"BindedCdevInfo": [
{
"CdevRequest": "thermal-cpufreq-2",
"LimitInfo": [0, 0, 0, 7, 7, 10, 10]
}
]
},
{
"Name":"batoilo",
"Type":"BCL_CURRENT",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
5000,
"NAN",
"NAN"
],
"HotHysteresis":[
0.0,
0.0,
0.0,
0.0,
100,
0.0,
0.0
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":true,
"BindedCdevInfo": [
{
"CdevRequest": "thermal-cpufreq-2",
"LimitInfo": [0, 0, 0, 0, 7, 10, 10]
},
{
"CdevRequest": "thermal-gpufreq-0",
"LimitInfo": [0, 0, 0, 0, 10, 11, 11]
},
{
"CdevRequest": "tpu_cooling",
"LimitInfo": [0, 0, 0, 0, 4, 4, 4]
}
]
},
{
"Name":"BCL_AUDIO_BAACL",
"Type":"BCL_VOLTAGE",
"VirtualSensor":true,
"Formula":"COUNT_THRESHOLD",
"TriggerSensor": "soc",
"Combination":[
"battery",
"soc"
],
"Coefficient":[
"-25000",
"80"
],
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
2.0,
"NAN",
"NAN"
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":true
},
{
"Name":"vdroop1",
"Type":"BCL_VOLTAGE",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
1000,
"NAN",
"NAN"
],
"HotHysteresis":[
0.0,
0.0,
0.0,
0.0,
100,
0.0,
0.0
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":true,
"BindedCdevInfo": [
{
"CdevRequest": "thermal-cpufreq-2",
"LimitInfo": [0, 0, 0, 0, 7, 10, 10]
},
{
"CdevRequest": "thermal-gpufreq-0",
"LimitInfo": [0, 0, 0, 0, 7, 7, 7]
},
{
"CdevRequest": "tpu_cooling",
"LimitInfo": [0, 0, 0, 0, 4, 4, 4]
}
]
},
{
"Name":"vdroop2",
"Type":"BCL_VOLTAGE",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
1200,
"NAN",
"NAN"
],
"HotHysteresis":[
0.0,
0.0,
0.0,
0.0,
100,
0.0,
0.0
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":true,
"BindedCdevInfo": [
{
"CdevRequest": "thermal-cpufreq-2",
"LimitInfo": [0, 0, 0, 0, 7, 10, 10]
},
{
"CdevRequest": "thermal-gpufreq-0",
"LimitInfo": [0, 0, 0, 0, 15, 15, 15]
},
{
"CdevRequest": "tpu_cooling",
"LimitInfo": [0, 0, 0, 0, 4, 4, 4]
}
]
},
{
"Name":"smpl_gm",
"Type":"BCL_VOLTAGE",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
1100,
"NAN",
"NAN"
],
"HotHysteresis":[
0.0,
0.0,
0.0,
0.0,
100,
0.0,
0.0
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":true,
"BindedCdevInfo": [
{
"CdevRequest": "thermal-cpufreq-2",
"LimitInfo": [0, 0, 0, 0, 7, 10, 10]
},
{
"CdevRequest": "thermal-gpufreq-0",
"LimitInfo": [0, 0, 0, 0, 13, 13, 13]
},
{
"CdevRequest": "tpu_cooling",
"LimitInfo": [0, 0, 0, 0, 4, 4, 4]
}
]
},
{
"Name":"ocp_cpu1",
"Type":"BCL_CURRENT",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
7000,
"NAN",
"NAN"
],
"HotHysteresis":[
0.0,
0.0,
0.0,
0.0,
100,
0.0,
0.0
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":true
},
{
"Name":"ocp_cpu2",
"Type":"BCL_CURRENT",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
12000,
"NAN",
"NAN"
],
"HotHysteresis":[
0.0,
0.0,
0.0,
0.0,
100,
0.0,
0.0
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":true
},
{
"Name":"ocp_tpu",
"Type":"BCL_CURRENT",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
10500,
"NAN",
"NAN"
],
"HotHysteresis":[
0.0,
0.0,
0.0,
0.0,
100,
0.0,
0.0
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":true
},
{
"Name":"ocp_gpu",
"Type":"BCL_CURRENT",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
12000,
"NAN",
"NAN"
],
"HotHysteresis":[
0.0,
0.0,
0.0,
0.0,
100,
0.0,
0.0
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":true
},
{
"Name":"soft_ocp_cpu2",
"Type":"BCL_CURRENT",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
9000,
"NAN",
"NAN"
],
"HotHysteresis":[
0.0,
0.0,
0.0,
0.0,
100,
0.0,
0.0
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":true
},
{
"Name":"soft_ocp_cpu1",
"Type":"BCL_CURRENT",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
7000,
"NAN",
"NAN"
],
"HotHysteresis":[
0.0,
0.0,
0.0,
0.0,
100,
0.0,
0.0
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":true
},
{
"Name":"soft_ocp_tpu",
"Type":"BCL_CURRENT",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
8500,
"NAN",
"NAN"
],
"HotHysteresis":[
0.0,
0.0,
0.0,
0.0,
100,
0.0,
0.0
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":true
},
{
"Name":"soft_ocp_gpu",
"Type":"BCL_CURRENT",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
9000,
"NAN",
"NAN"
],
"HotHysteresis":[
0.0,
0.0,
0.0,
0.0,
100,
0.0,
0.0
],
"VrThreshold":"NAN",
"Multiplier":1,
"Monitor":true
},
{
"Name":"TPU",
"Type":"NPU",
"HotThreshold":[
"NAN",
"NAN",
"NAN",
"NAN",
"NAN",
"NAN",
115.0
],
"VrThreshold":"NAN",
"Multiplier":0.001
}
],
"CoolingDevices":[
{
"Name":"thermal-cpufreq-0",
"Type":"CPU",
"WritePath":"/dev/thermal/cdev-by-name/thermal-cpufreq-0/user_vote",
"State2Power":["1100", "1050", "1000", "950", "900", "850", "800", "750", "700", "650", "600"]
},
{
"Name":"thermal-cpufreq-1",
"Type":"CPU",
"WritePath":"/dev/thermal/cdev-by-name/thermal-cpufreq-1/user_vote",
"State2Power":["1400", "1350", "1300", "1250", "1200", "1150", "1100", "1050", "1000", "950", "900", "850", "800", "750"]
},
{
"Name":"thermal-cpufreq-2",
"Type":"CPU",
"WritePath":"/dev/thermal/cdev-by-name/thermal-cpufreq-2/user_vote",
"State2Power":["1450", "1400", "1350", "1300", "1250", "1200", "1150", "1100", "1050", "1000", "950", "900", "850", "800", "750"]
},
{
"Name":"thermal-gpufreq-0",
"Type":"GPU",
"WritePath":"/dev/thermal/cdev-by-name/thermal-gpufreq-0/user_vote"
},
{
"Name":"tpu_cooling",
"Type":"NPU",
"WritePath":"/dev/thermal/cdev-by-name/tpu_cooling/user_vote"
}
]
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff