diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2018-07-12 14:47:30 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-07-16 11:39:22 -0500 |
commit | ce7577a2194b58bf7faf303612a24b7cd5210afc (patch) | |
tree | 6ff1738f581e87653e629ec538292e634fce84c6 /drivers/gpu/drm/amd/powerplay/hwmgr/vega12_thermal.c | |
parent | drm/amdgpu/pp: remove dead vega12 code (diff) | |
download | wireguard-linux-ce7577a2194b58bf7faf303612a24b7cd5210afc.tar.xz wireguard-linux-ce7577a2194b58bf7faf303612a24b7cd5210afc.zip |
drm/amdgpu/pp: split out common smumgr smu9 code
Split out the shared smumgr code for vega10 and 12
so we don't have duplicate code for both.
Reviewed-by: Rex Zhu <rezhu@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.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_thermal.c index cfd9e6ccb790..904eb2c9155b 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_thermal.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_thermal.c @@ -34,11 +34,9 @@ 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), "Attempt to get current RPM from SMC Failed!", - return -1); - PP_ASSERT_WITH_CODE(!vega12_read_arg_from_smc(hwmgr, - current_rpm), - "Attempt to read current RPM from SMC Failed!", - return -1); + return -EINVAL); + *current_rpm = smum_get_argument(hwmgr); + return 0; } |