Change-Id: If240a45dd2538e93185802b1fce54fd83de89de0
Signed-off-by: Evan Quan <[email protected]>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
index 2d55dab..ed16468 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
@@ -4988,6 +4988,26 @@ static int vega10_notify_cac_buffer_info(struct pp_hwmgr 
*hwmgr,
        return 0;
 }
 
+static struct PP_TemperatureRange SMU7ThermalWithDelayPolicy[] =
+{
+       {-273150,  99000},
+       { 120000, 120000},
+};
+
+static int vega10_get_thermal_temperature_range(struct pp_hwmgr *hwmgr,
+               struct PP_TemperatureRange *thermal_data)
+{
+       struct phm_ppt_v2_information *table_info =
+                       (struct phm_ppt_v2_information *)hwmgr->pptable;
+
+       memcpy(thermal_data, &SMU7ThermalWithDelayPolicy[0], sizeof(struct 
PP_TemperatureRange));
+
+       thermal_data->max = table_info->tdp_table->usSoftwareShutdownTemp *
+               PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
+
+       return 0;
+}
+
 static int vega10_register_thermal_interrupt(struct pp_hwmgr *hwmgr,
                const void *info)
 {
@@ -5074,6 +5094,7 @@ static const struct pp_hwmgr_func vega10_hwmgr_funcs = {
        .set_mclk_od = vega10_set_mclk_od,
        .avfs_control = vega10_avfs_enable,
        .notify_cac_buffer_info = vega10_notify_cac_buffer_info,
+       .get_thermal_temperature_range = vega10_get_thermal_temperature_range,
        .register_internal_thermal_interrupt = 
vega10_register_thermal_interrupt,
        .start_thermal_controller = vega10_start_thermal_controller,
 };
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to