aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_thermal.c
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2020-03-27 10:48:20 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-04-01 14:44:45 -0400
commita0ec225633d9f681e393a1827f29f02c837deb84 (patch)
treec4211c3a036c7295fe10cfbf6f43e5e548c6081f /drivers/gpu/drm/amd/powerplay/hwmgr/vega12_thermal.c
parentdrm/amd/powerplay: avoid calling Vega20 specific SMU message implemention (diff)
downloadwireguard-linux-a0ec225633d9f681e393a1827f29f02c837deb84.tar.xz
wireguard-linux-a0ec225633d9f681e393a1827f29f02c837deb84.zip
drm/amd/powerplay: unified interfaces for message issuing and response checking
This can avoid potential race condition between them. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Kenneth Feng <kenneth.feng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/hwmgr/vega12_thermal.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/vega12_thermal.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_thermal.c
index 904eb2c9155b..c85806a6f62e 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_thermal.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_thermal.c
@@ -32,10 +32,10 @@
static int vega12_get_current_rpm(struct pp_hwmgr *hwmgr, uint32_t *current_rpm)
{
PP_ASSERT_WITH_CODE(!smum_send_msg_to_smc(hwmgr,
- PPSMC_MSG_GetCurrentRpm),
+ PPSMC_MSG_GetCurrentRpm,
+ current_rpm),
"Attempt to get current RPM from SMC Failed!",
return -EINVAL);
- *current_rpm = smum_get_argument(hwmgr);
return 0;
}
@@ -259,7 +259,8 @@ int vega12_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
ret = smum_send_msg_to_smc_with_parameter(hwmgr,
PPSMC_MSG_SetFanTemperatureTarget,
- (uint32_t)table->FanTargetTemperature);
+ (uint32_t)table->FanTargetTemperature,
+ NULL);
return ret;
}