diff options
author | Evan Quan <evan.quan@amd.com> | 2019-04-17 23:53:04 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-05-24 13:20:47 -0400 |
commit | 901cb599dbc233fc325e3602e7c1218d2c24359c (patch) | |
tree | b08e0ba946b8355571217be1152c58d8ce5fc56c /drivers/gpu/drm/amd | |
parent | 437ccd175a7a3c9871536a26b2d28e3c99515e7f (diff) |
drm/amd/powerplay: support temperature emergency max values
These new interfaces(temp1_emergency, temp2_emergency,
temp3_emergency) are supported on SOC15 dGPUs only.
Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 40 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/inc/power_state.h | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/inc/pp_thermal.h | 12 |
8 files changed, 80 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h index 8df54443ec78..521dbd0d9af8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | |||
@@ -75,14 +75,20 @@ struct amdgpu_dpm_thermal { | |||
75 | int min_temp; | 75 | int min_temp; |
76 | /* high temperature threshold */ | 76 | /* high temperature threshold */ |
77 | int max_temp; | 77 | int max_temp; |
78 | /* edge max emergency(shutdown) temp */ | ||
79 | int max_edge_emergency_temp; | ||
78 | /* hotspot low temperature threshold */ | 80 | /* hotspot low temperature threshold */ |
79 | int min_hotspot_temp; | 81 | int min_hotspot_temp; |
80 | /* hotspot high temperature critical threshold */ | 82 | /* hotspot high temperature critical threshold */ |
81 | int max_hotspot_crit_temp; | 83 | int max_hotspot_crit_temp; |
84 | /* hotspot max emergency(shutdown) temp */ | ||
85 | int max_hotspot_emergency_temp; | ||
82 | /* memory low temperature threshold */ | 86 | /* memory low temperature threshold */ |
83 | int min_mem_temp; | 87 | int min_mem_temp; |
84 | /* memory high temperature critical threshold */ | 88 | /* memory high temperature critical threshold */ |
85 | int max_mem_crit_temp; | 89 | int max_mem_crit_temp; |
90 | /* memory max emergency(shutdown) temp */ | ||
91 | int max_mem_emergency_temp; | ||
86 | /* was last interrupt low to high or high to low */ | 92 | /* was last interrupt low to high or high to low */ |
87 | bool high_to_low; | 93 | bool high_to_low; |
88 | /* interrupt source */ | 94 | /* interrupt source */ |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index 1f78deadb770..7093b4efc3a7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |||
@@ -1446,6 +1446,32 @@ static ssize_t amdgpu_hwmon_show_mem_temp_thresh(struct device *dev, | |||
1446 | return snprintf(buf, PAGE_SIZE, "%d\n", temp); | 1446 | return snprintf(buf, PAGE_SIZE, "%d\n", temp); |
1447 | } | 1447 | } |
1448 | 1448 | ||
1449 | static ssize_t amdgpu_hwmon_show_temp_emergency(struct device *dev, | ||
1450 | struct device_attribute *attr, | ||
1451 | char *buf) | ||
1452 | { | ||
1453 | struct amdgpu_device *adev = dev_get_drvdata(dev); | ||
1454 | int channel = to_sensor_dev_attr(attr)->index; | ||
1455 | int temp = 0; | ||
1456 | |||
1457 | if (channel >= PP_TEMP_MAX) | ||
1458 | return -EINVAL; | ||
1459 | |||
1460 | switch (channel) { | ||
1461 | case PP_TEMP_JUNCTION: | ||
1462 | temp = adev->pm.dpm.thermal.max_hotspot_emergency_temp; | ||
1463 | break; | ||
1464 | case PP_TEMP_EDGE: | ||
1465 | temp = adev->pm.dpm.thermal.max_edge_emergency_temp; | ||
1466 | break; | ||
1467 | case PP_TEMP_MEM: | ||
1468 | temp = adev->pm.dpm.thermal.max_mem_emergency_temp; | ||
1469 | break; | ||
1470 | } | ||
1471 | |||
1472 | return snprintf(buf, PAGE_SIZE, "%d\n", temp); | ||
1473 | } | ||
1474 | |||
1449 | static ssize_t amdgpu_hwmon_get_pwm1_enable(struct device *dev, | 1475 | static ssize_t amdgpu_hwmon_get_pwm1_enable(struct device *dev, |
1450 | struct device_attribute *attr, | 1476 | struct device_attribute *attr, |
1451 | char *buf) | 1477 | char *buf) |
@@ -2023,6 +2049,9 @@ static ssize_t amdgpu_hwmon_show_mclk_label(struct device *dev, | |||
2023 | * - temp[1-3]_crit_hyst: temperature hysteresis for critical limit in millidegrees Celsius | 2049 | * - temp[1-3]_crit_hyst: temperature hysteresis for critical limit in millidegrees Celsius |
2024 | * - temp2_crit_hyst and temp3_crit_hyst are supported on SOC15 dGPUs only | 2050 | * - temp2_crit_hyst and temp3_crit_hyst are supported on SOC15 dGPUs only |
2025 | * | 2051 | * |
2052 | * - temp[1-3]_emergency: temperature emergency max value(asic shutdown) in millidegrees Celsius | ||
2053 | * - these are supported on SOC15 dGPUs only | ||
2054 | * | ||
2026 | * hwmon interfaces for GPU voltage: | 2055 | * hwmon interfaces for GPU voltage: |
2027 | * | 2056 | * |
2028 | * - in0_input: the voltage on the GPU in millivolts | 2057 | * - in0_input: the voltage on the GPU in millivolts |
@@ -2072,10 +2101,13 @@ static ssize_t amdgpu_hwmon_show_mclk_label(struct device *dev, | |||
2072 | static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, amdgpu_hwmon_show_temp, NULL, 0); | 2101 | static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, amdgpu_hwmon_show_temp, NULL, 0); |
2073 | static SENSOR_DEVICE_ATTR(temp1_crit, S_IRUGO, amdgpu_hwmon_show_temp_thresh, NULL, 0); | 2102 | static SENSOR_DEVICE_ATTR(temp1_crit, S_IRUGO, amdgpu_hwmon_show_temp_thresh, NULL, 0); |
2074 | static SENSOR_DEVICE_ATTR(temp1_crit_hyst, S_IRUGO, amdgpu_hwmon_show_temp_thresh, NULL, 1); | 2103 | static SENSOR_DEVICE_ATTR(temp1_crit_hyst, S_IRUGO, amdgpu_hwmon_show_temp_thresh, NULL, 1); |
2104 | static SENSOR_DEVICE_ATTR(temp1_emergency, S_IRUGO, amdgpu_hwmon_show_temp_emergency, NULL, PP_TEMP_EDGE); | ||
2075 | static SENSOR_DEVICE_ATTR(temp2_crit, S_IRUGO, amdgpu_hwmon_show_hotspot_temp_thresh, NULL, 0); | 2105 | static SENSOR_DEVICE_ATTR(temp2_crit, S_IRUGO, amdgpu_hwmon_show_hotspot_temp_thresh, NULL, 0); |
2076 | static SENSOR_DEVICE_ATTR(temp2_crit_hyst, S_IRUGO, amdgpu_hwmon_show_hotspot_temp_thresh, NULL, 1); | 2106 | static SENSOR_DEVICE_ATTR(temp2_crit_hyst, S_IRUGO, amdgpu_hwmon_show_hotspot_temp_thresh, NULL, 1); |
2107 | static SENSOR_DEVICE_ATTR(temp2_emergency, S_IRUGO, amdgpu_hwmon_show_temp_emergency, NULL, PP_TEMP_JUNCTION); | ||
2077 | static SENSOR_DEVICE_ATTR(temp3_crit, S_IRUGO, amdgpu_hwmon_show_mem_temp_thresh, NULL, 0); | 2108 | static SENSOR_DEVICE_ATTR(temp3_crit, S_IRUGO, amdgpu_hwmon_show_mem_temp_thresh, NULL, 0); |
2078 | static SENSOR_DEVICE_ATTR(temp3_crit_hyst, S_IRUGO, amdgpu_hwmon_show_mem_temp_thresh, NULL, 1); | 2109 | static SENSOR_DEVICE_ATTR(temp3_crit_hyst, S_IRUGO, amdgpu_hwmon_show_mem_temp_thresh, NULL, 1); |
2110 | static SENSOR_DEVICE_ATTR(temp3_emergency, S_IRUGO, amdgpu_hwmon_show_temp_emergency, NULL, PP_TEMP_MEM); | ||
2079 | static SENSOR_DEVICE_ATTR(pwm1, S_IRUGO | S_IWUSR, amdgpu_hwmon_get_pwm1, amdgpu_hwmon_set_pwm1, 0); | 2111 | static SENSOR_DEVICE_ATTR(pwm1, S_IRUGO | S_IWUSR, amdgpu_hwmon_get_pwm1, amdgpu_hwmon_set_pwm1, 0); |
2080 | static SENSOR_DEVICE_ATTR(pwm1_enable, S_IRUGO | S_IWUSR, amdgpu_hwmon_get_pwm1_enable, amdgpu_hwmon_set_pwm1_enable, 0); | 2112 | static SENSOR_DEVICE_ATTR(pwm1_enable, S_IRUGO | S_IWUSR, amdgpu_hwmon_get_pwm1_enable, amdgpu_hwmon_set_pwm1_enable, 0); |
2081 | static SENSOR_DEVICE_ATTR(pwm1_min, S_IRUGO, amdgpu_hwmon_get_pwm1_min, NULL, 0); | 2113 | static SENSOR_DEVICE_ATTR(pwm1_min, S_IRUGO, amdgpu_hwmon_get_pwm1_min, NULL, 0); |
@@ -2106,6 +2138,9 @@ static struct attribute *hwmon_attributes[] = { | |||
2106 | &sensor_dev_attr_temp2_crit_hyst.dev_attr.attr, | 2138 | &sensor_dev_attr_temp2_crit_hyst.dev_attr.attr, |
2107 | &sensor_dev_attr_temp3_crit.dev_attr.attr, | 2139 | &sensor_dev_attr_temp3_crit.dev_attr.attr, |
2108 | &sensor_dev_attr_temp3_crit_hyst.dev_attr.attr, | 2140 | &sensor_dev_attr_temp3_crit_hyst.dev_attr.attr, |
2141 | &sensor_dev_attr_temp1_emergency.dev_attr.attr, | ||
2142 | &sensor_dev_attr_temp2_emergency.dev_attr.attr, | ||
2143 | &sensor_dev_attr_temp3_emergency.dev_attr.attr, | ||
2109 | &sensor_dev_attr_pwm1.dev_attr.attr, | 2144 | &sensor_dev_attr_pwm1.dev_attr.attr, |
2110 | &sensor_dev_attr_pwm1_enable.dev_attr.attr, | 2145 | &sensor_dev_attr_pwm1_enable.dev_attr.attr, |
2111 | &sensor_dev_attr_pwm1_min.dev_attr.attr, | 2146 | &sensor_dev_attr_pwm1_min.dev_attr.attr, |
@@ -2234,7 +2269,10 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj, | |||
2234 | (attr == &sensor_dev_attr_temp2_crit.dev_attr.attr || | 2269 | (attr == &sensor_dev_attr_temp2_crit.dev_attr.attr || |
2235 | attr == &sensor_dev_attr_temp2_crit_hyst.dev_attr.attr || | 2270 | attr == &sensor_dev_attr_temp2_crit_hyst.dev_attr.attr || |
2236 | attr == &sensor_dev_attr_temp3_crit.dev_attr.attr || | 2271 | attr == &sensor_dev_attr_temp3_crit.dev_attr.attr || |
2237 | attr == &sensor_dev_attr_temp3_crit_hyst.dev_attr.attr)) | 2272 | attr == &sensor_dev_attr_temp3_crit_hyst.dev_attr.attr || |
2273 | attr == &sensor_dev_attr_temp1_emergency.dev_attr.attr || | ||
2274 | attr == &sensor_dev_attr_temp2_emergency.dev_attr.attr || | ||
2275 | attr == &sensor_dev_attr_temp3_emergency.dev_attr.attr)) | ||
2238 | return 0; | 2276 | return 0; |
2239 | 2277 | ||
2240 | return effective_mode; | 2278 | return effective_mode; |
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c index af6ab04130ef..cc57fb953e62 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | |||
@@ -228,9 +228,12 @@ int phm_start_thermal_controller(struct pp_hwmgr *hwmgr) | |||
228 | struct PP_TemperatureRange range = { | 228 | struct PP_TemperatureRange range = { |
229 | TEMP_RANGE_MIN, | 229 | TEMP_RANGE_MIN, |
230 | TEMP_RANGE_MAX, | 230 | TEMP_RANGE_MAX, |
231 | TEMP_RANGE_MAX, | ||
231 | TEMP_RANGE_MIN, | 232 | TEMP_RANGE_MIN, |
232 | TEMP_RANGE_MAX, | 233 | TEMP_RANGE_MAX, |
234 | TEMP_RANGE_MAX, | ||
233 | TEMP_RANGE_MIN, | 235 | TEMP_RANGE_MIN, |
236 | TEMP_RANGE_MAX, | ||
234 | TEMP_RANGE_MAX}; | 237 | TEMP_RANGE_MAX}; |
235 | struct amdgpu_device *adev = hwmgr->adev; | 238 | struct amdgpu_device *adev = hwmgr->adev; |
236 | 239 | ||
@@ -245,10 +248,13 @@ int phm_start_thermal_controller(struct pp_hwmgr *hwmgr) | |||
245 | 248 | ||
246 | adev->pm.dpm.thermal.min_temp = range.min; | 249 | adev->pm.dpm.thermal.min_temp = range.min; |
247 | adev->pm.dpm.thermal.max_temp = range.max; | 250 | adev->pm.dpm.thermal.max_temp = range.max; |
251 | adev->pm.dpm.thermal.max_edge_emergency_temp = range.edge_emergency_max; | ||
248 | adev->pm.dpm.thermal.min_hotspot_temp = range.hotspot_min; | 252 | adev->pm.dpm.thermal.min_hotspot_temp = range.hotspot_min; |
249 | adev->pm.dpm.thermal.max_hotspot_crit_temp = range.hotspot_crit_max; | 253 | adev->pm.dpm.thermal.max_hotspot_crit_temp = range.hotspot_crit_max; |
254 | adev->pm.dpm.thermal.max_hotspot_emergency_temp = range.hotspot_emergency_max; | ||
250 | adev->pm.dpm.thermal.min_mem_temp = range.mem_min; | 255 | adev->pm.dpm.thermal.min_mem_temp = range.mem_min; |
251 | adev->pm.dpm.thermal.max_mem_crit_temp = range.mem_crit_max; | 256 | adev->pm.dpm.thermal.max_mem_crit_temp = range.mem_crit_max; |
257 | adev->pm.dpm.thermal.max_mem_emergency_temp = range.mem_emergency_max; | ||
252 | 258 | ||
253 | return ret; | 259 | return ret; |
254 | } | 260 | } |
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c index 4e1df44f094b..1422bc4e45d1 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | |||
@@ -4859,10 +4859,16 @@ static int vega10_get_thermal_temperature_range(struct pp_hwmgr *hwmgr, | |||
4859 | 4859 | ||
4860 | thermal_data->max = pp_table->TedgeLimit * | 4860 | thermal_data->max = pp_table->TedgeLimit * |
4861 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | 4861 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; |
4862 | thermal_data->edge_emergency_max = (pp_table->TedgeLimit + CTF_OFFSET_EDGE) * | ||
4863 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | ||
4862 | thermal_data->hotspot_crit_max = pp_table->ThotspotLimit * | 4864 | thermal_data->hotspot_crit_max = pp_table->ThotspotLimit * |
4863 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | 4865 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; |
4866 | thermal_data->hotspot_emergency_max = (pp_table->ThotspotLimit + CTF_OFFSET_HOTSPOT) * | ||
4867 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | ||
4864 | thermal_data->mem_crit_max = pp_table->ThbmLimit * | 4868 | thermal_data->mem_crit_max = pp_table->ThbmLimit * |
4865 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | 4869 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; |
4870 | thermal_data->mem_emergency_max = (pp_table->ThbmLimit + CTF_OFFSET_HBM)* | ||
4871 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | ||
4866 | 4872 | ||
4867 | return 0; | 4873 | return 0; |
4868 | } | 4874 | } |
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c index 4f63570ea257..60c9f9502e65 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | |||
@@ -2534,10 +2534,16 @@ static int vega12_get_thermal_temperature_range(struct pp_hwmgr *hwmgr, | |||
2534 | 2534 | ||
2535 | thermal_data->max = pp_table->TedgeLimit * | 2535 | thermal_data->max = pp_table->TedgeLimit * |
2536 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | 2536 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; |
2537 | thermal_data->edge_emergency_max = (pp_table->TedgeLimit + CTF_OFFSET_EDGE) * | ||
2538 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | ||
2537 | thermal_data->hotspot_crit_max = pp_table->ThotspotLimit * | 2539 | thermal_data->hotspot_crit_max = pp_table->ThotspotLimit * |
2538 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | 2540 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; |
2541 | thermal_data->hotspot_emergency_max = (pp_table->ThotspotLimit + CTF_OFFSET_HOTSPOT) * | ||
2542 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | ||
2539 | thermal_data->mem_crit_max = pp_table->ThbmLimit * | 2543 | thermal_data->mem_crit_max = pp_table->ThbmLimit * |
2540 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | 2544 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; |
2545 | thermal_data->mem_emergency_max = (pp_table->ThbmLimit + CTF_OFFSET_HBM)* | ||
2546 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | ||
2541 | 2547 | ||
2542 | return 0; | 2548 | return 0; |
2543 | } | 2549 | } |
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c index 555ff8733b6b..3a9629c907bb 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | |||
@@ -3982,10 +3982,16 @@ static int vega20_get_thermal_temperature_range(struct pp_hwmgr *hwmgr, | |||
3982 | 3982 | ||
3983 | thermal_data->max = pp_table->TedgeLimit * | 3983 | thermal_data->max = pp_table->TedgeLimit * |
3984 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | 3984 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; |
3985 | thermal_data->edge_emergency_max = (pp_table->TedgeLimit + CTF_OFFSET_EDGE) * | ||
3986 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | ||
3985 | thermal_data->hotspot_crit_max = pp_table->ThotspotLimit * | 3987 | thermal_data->hotspot_crit_max = pp_table->ThotspotLimit * |
3986 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | 3988 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; |
3989 | thermal_data->hotspot_emergency_max = (pp_table->ThotspotLimit + CTF_OFFSET_HOTSPOT) * | ||
3990 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | ||
3987 | thermal_data->mem_crit_max = pp_table->ThbmLimit * | 3991 | thermal_data->mem_crit_max = pp_table->ThbmLimit * |
3988 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | 3992 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; |
3993 | thermal_data->mem_emergency_max = (pp_table->ThbmLimit + CTF_OFFSET_HBM)* | ||
3994 | PP_TEMPERATURE_UNITS_PER_CENTIGRADES; | ||
3989 | 3995 | ||
3990 | return 0; | 3996 | return 0; |
3991 | } | 3997 | } |
diff --git a/drivers/gpu/drm/amd/powerplay/inc/power_state.h b/drivers/gpu/drm/amd/powerplay/inc/power_state.h index a8988e7d58c6..a5f2227a3971 100644 --- a/drivers/gpu/drm/amd/powerplay/inc/power_state.h +++ b/drivers/gpu/drm/amd/powerplay/inc/power_state.h | |||
@@ -124,10 +124,13 @@ struct PP_StateSoftwareAlgorithmBlock { | |||
124 | struct PP_TemperatureRange { | 124 | struct PP_TemperatureRange { |
125 | int min; | 125 | int min; |
126 | int max; | 126 | int max; |
127 | int edge_emergency_max; | ||
127 | int hotspot_min; | 128 | int hotspot_min; |
128 | int hotspot_crit_max; | 129 | int hotspot_crit_max; |
130 | int hotspot_emergency_max; | ||
129 | int mem_min; | 131 | int mem_min; |
130 | int mem_crit_max; | 132 | int mem_crit_max; |
133 | int mem_emergency_max; | ||
131 | }; | 134 | }; |
132 | 135 | ||
133 | struct PP_StateValidationBlock { | 136 | struct PP_StateValidationBlock { |
diff --git a/drivers/gpu/drm/amd/powerplay/inc/pp_thermal.h b/drivers/gpu/drm/amd/powerplay/inc/pp_thermal.h index 75a0a2f8bea2..3e30768f9e1c 100644 --- a/drivers/gpu/drm/amd/powerplay/inc/pp_thermal.h +++ b/drivers/gpu/drm/amd/powerplay/inc/pp_thermal.h | |||
@@ -27,14 +27,18 @@ | |||
27 | 27 | ||
28 | static const struct PP_TemperatureRange SMU7ThermalWithDelayPolicy[] = | 28 | static const struct PP_TemperatureRange SMU7ThermalWithDelayPolicy[] = |
29 | { | 29 | { |
30 | {-273150, 99000, -273150, 99000, -273150, 99000}, | 30 | {-273150, 99000, 99000, -273150, 99000, 99000, -273150, 99000, 99000}, |
31 | { 120000, 120000, 120000, 120000, 120000, 120000}, | 31 | { 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000}, |
32 | }; | 32 | }; |
33 | 33 | ||
34 | static const struct PP_TemperatureRange SMU7ThermalPolicy[] = | 34 | static const struct PP_TemperatureRange SMU7ThermalPolicy[] = |
35 | { | 35 | { |
36 | {-273150, 99000, -273150, 99000, -273150, 99000}, | 36 | {-273150, 99000, 99000, -273150, 99000, 99000, -273150, 99000, 99000}, |
37 | { 120000, 120000, 120000, 120000, 120000, 120000}, | 37 | { 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000}, |
38 | }; | 38 | }; |
39 | 39 | ||
40 | #define CTF_OFFSET_EDGE 5 | ||
41 | #define CTF_OFFSET_HOTSPOT 5 | ||
42 | #define CTF_OFFSET_HBM 5 | ||
43 | |||
40 | #endif | 44 | #endif |