Commit 22f1e0e8 authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher

drm/amd/powerplay: give better names for the thermal IRQ related APIs

Thermal control is performed by PMFW. What handled in driver is
just whether or not to enable the alert(to driver).
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent be80b431
......@@ -1346,7 +1346,7 @@ static int smu_hw_init(void *handle)
if (ret)
goto failed;
ret = smu_start_thermal_control(smu);
ret = smu_enable_thermal_alert(smu);
if (ret)
goto failed;
......@@ -1392,7 +1392,7 @@ static int smu_hw_fini(void *handle)
smu_i2c_eeprom_fini(smu, &adev->pm.smu_i2c);
ret = smu_stop_thermal_control(smu);
ret = smu_disable_thermal_alert(smu);
if (ret) {
pr_warn("Fail to stop thermal control!\n");
return ret;
......@@ -1533,7 +1533,7 @@ static int smu_suspend(void *handle)
smu_i2c_eeprom_fini(smu, &adev->pm.smu_i2c);
ret = smu_stop_thermal_control(smu);
ret = smu_disable_thermal_alert(smu);
if (ret) {
pr_warn("Fail to stop thermal control!\n");
return ret;
......@@ -1578,7 +1578,7 @@ static int smu_resume(void *handle)
if (ret)
goto failed;
ret = smu_start_thermal_control(smu);
ret = smu_enable_thermal_alert(smu);
if (ret)
goto failed;
......
......@@ -2442,8 +2442,8 @@ static const struct pptable_funcs arcturus_ppt_funcs = {
.set_power_limit = smu_v11_0_set_power_limit,
.get_current_clk_freq = smu_v11_0_get_current_clk_freq,
.init_max_sustainable_clocks = smu_v11_0_init_max_sustainable_clocks,
.start_thermal_control = smu_v11_0_start_thermal_control,
.stop_thermal_control = smu_v11_0_stop_thermal_control,
.enable_thermal_alert = smu_v11_0_enable_thermal_alert,
.disable_thermal_alert = smu_v11_0_disable_thermal_alert,
.set_deep_sleep_dcefclk = smu_v11_0_set_deep_sleep_dcefclk,
.display_clock_voltage_request = smu_v11_0_display_clock_voltage_request,
.get_fan_control_mode = smu_v11_0_get_fan_control_mode,
......
......@@ -530,8 +530,8 @@ struct pptable_funcs {
int (*set_power_limit)(struct smu_context *smu, uint32_t n);
int (*get_current_clk_freq)(struct smu_context *smu, enum smu_clk_type clk_id, uint32_t *value);
int (*init_max_sustainable_clocks)(struct smu_context *smu);
int (*start_thermal_control)(struct smu_context *smu);
int (*stop_thermal_control)(struct smu_context *smu);
int (*enable_thermal_alert)(struct smu_context *smu);
int (*disable_thermal_alert)(struct smu_context *smu);
int (*set_deep_sleep_dcefclk)(struct smu_context *smu, uint32_t clk);
int (*set_active_display_count)(struct smu_context *smu, uint32_t count);
int (*store_cc6_data)(struct smu_context *smu, uint32_t separation_time,
......
......@@ -207,9 +207,9 @@ int smu_v11_0_get_current_clk_freq(struct smu_context *smu,
int smu_v11_0_init_max_sustainable_clocks(struct smu_context *smu);
int smu_v11_0_start_thermal_control(struct smu_context *smu);
int smu_v11_0_enable_thermal_alert(struct smu_context *smu);
int smu_v11_0_stop_thermal_control(struct smu_context *smu);
int smu_v11_0_disable_thermal_alert(struct smu_context *smu);
int smu_v11_0_read_sensor(struct smu_context *smu,
enum amd_pp_sensors sensor,
......
......@@ -2320,8 +2320,8 @@ static const struct pptable_funcs navi10_ppt_funcs = {
.set_power_limit = smu_v11_0_set_power_limit,
.get_current_clk_freq = smu_v11_0_get_current_clk_freq,
.init_max_sustainable_clocks = smu_v11_0_init_max_sustainable_clocks,
.start_thermal_control = smu_v11_0_start_thermal_control,
.stop_thermal_control = smu_v11_0_stop_thermal_control,
.enable_thermal_alert = smu_v11_0_enable_thermal_alert,
.disable_thermal_alert = smu_v11_0_disable_thermal_alert,
.set_deep_sleep_dcefclk = smu_v11_0_set_deep_sleep_dcefclk,
.display_clock_voltage_request = smu_v11_0_display_clock_voltage_request,
.get_fan_control_mode = smu_v11_0_get_fan_control_mode,
......
......@@ -118,10 +118,10 @@ static inline int smu_send_smc_msg(struct smu_context *smu, enum smu_message_typ
((smu)->ppt_funcs->tables_init ? (smu)->ppt_funcs->tables_init((smu), (tab)) : 0)
#define smu_set_thermal_fan_table(smu) \
((smu)->ppt_funcs->set_thermal_fan_table ? (smu)->ppt_funcs->set_thermal_fan_table((smu)) : 0)
#define smu_start_thermal_control(smu) \
((smu)->ppt_funcs->start_thermal_control? (smu)->ppt_funcs->start_thermal_control((smu)) : 0)
#define smu_stop_thermal_control(smu) \
((smu)->ppt_funcs->stop_thermal_control? (smu)->ppt_funcs->stop_thermal_control((smu)) : 0)
#define smu_enable_thermal_alert(smu) \
((smu)->ppt_funcs->enable_thermal_alert? (smu)->ppt_funcs->enable_thermal_alert((smu)) : 0)
#define smu_disable_thermal_alert(smu) \
((smu)->ppt_funcs->disable_thermal_alert? (smu)->ppt_funcs->disable_thermal_alert((smu)) : 0)
#define smu_smc_read_sensor(smu, sensor, data, size) \
((smu)->ppt_funcs->read_sensor? (smu)->ppt_funcs->read_sensor((smu), (sensor), (data), (size)) : -EINVAL)
......
......@@ -1176,7 +1176,7 @@ static int smu_v11_0_set_thermal_range(struct smu_context *smu,
return 0;
}
int smu_v11_0_start_thermal_control(struct smu_context *smu)
int smu_v11_0_enable_thermal_alert(struct smu_context *smu)
{
int ret = 0;
struct smu_temperature_range range;
......@@ -1215,7 +1215,7 @@ int smu_v11_0_start_thermal_control(struct smu_context *smu)
return ret;
}
int smu_v11_0_stop_thermal_control(struct smu_context *smu)
int smu_v11_0_disable_thermal_alert(struct smu_context *smu)
{
return amdgpu_irq_put(smu->adev, smu->irq_source, 0);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment