Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/powerplay: Fix CIK shutdown temperature

Remove extra multiplication.

CIK GPUs such as Hawaii appear to use PP_TABLE_V0 in which case
the shutdown temperature is hardcoded in smu7_init_dpm_defaults
and is already multiplied by 1000. The value was mistakenly
multiplied another time by smu7_get_thermal_temperature_range.

Fixes: 4ba082572a42 ("drm/amd/powerplay: export the thermal ranges of VI asics (V2)")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/1676
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Timur Kristóf and committed by
Alex Deucher
6917112a ef38b4ea

+1 -2
+1 -2
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
··· 5444 5444 thermal_data->max = table_info->cac_dtp_table->usSoftwareShutdownTemp * 5445 5445 PP_TEMPERATURE_UNITS_PER_CENTIGRADES; 5446 5446 else if (hwmgr->pp_table_version == PP_TABLE_V0) 5447 - thermal_data->max = data->thermal_temp_setting.temperature_shutdown * 5448 - PP_TEMPERATURE_UNITS_PER_CENTIGRADES; 5447 + thermal_data->max = data->thermal_temp_setting.temperature_shutdown; 5449 5448 5450 5449 thermal_data->sw_ctf_threshold = thermal_data->max; 5451 5450