mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 13:04:36 +07:00
drm/amd/powerplay: add function set_thermal_fan_table for navi10
add callback function set_thermal_fan_table for navi10 asic Signed-off-by:Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
4228b6015d
commit
da85f08123
@ -807,6 +807,18 @@ static bool navi10_is_dpm_running(struct smu_context *smu)
|
|||||||
return !!(feature_enabled & SMC_DPM_FEATURE);
|
return !!(feature_enabled & SMC_DPM_FEATURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int navi10_set_thermal_fan_table(struct smu_context *smu)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
struct smu_table_context *table_context = &smu->smu_table;
|
||||||
|
PPTable_t *pptable = table_context->driver_pptable;
|
||||||
|
|
||||||
|
ret = smu_send_smc_msg_with_param(smu, SMU_MSG_SetFanTemperatureTarget,
|
||||||
|
(uint32_t)pptable->FanTargetTemperature);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct pptable_funcs navi10_ppt_funcs = {
|
static const struct pptable_funcs navi10_ppt_funcs = {
|
||||||
.tables_init = navi10_tables_init,
|
.tables_init = navi10_tables_init,
|
||||||
.alloc_dpm_context = navi10_allocate_dpm_context,
|
.alloc_dpm_context = navi10_allocate_dpm_context,
|
||||||
@ -833,6 +845,7 @@ static const struct pptable_funcs navi10_ppt_funcs = {
|
|||||||
.get_gpu_power = navi10_get_gpu_power,
|
.get_gpu_power = navi10_get_gpu_power,
|
||||||
.get_current_activity_percent = navi10_get_current_activity_percent,
|
.get_current_activity_percent = navi10_get_current_activity_percent,
|
||||||
.is_dpm_running = navi10_is_dpm_running,
|
.is_dpm_running = navi10_is_dpm_running,
|
||||||
|
.set_thermal_fan_table = navi10_set_thermal_fan_table,
|
||||||
};
|
};
|
||||||
|
|
||||||
void navi10_set_ppt_funcs(struct smu_context *smu)
|
void navi10_set_ppt_funcs(struct smu_context *smu)
|
||||||
|
Loading…
Reference in New Issue
Block a user