Commit 6b5defd6 authored by Eric Huang's avatar Eric Huang Committed by Alex Deucher

drm/amd/powerplay: power value format change for Vega10

Power value is an integer on vega10.
Signed-off-by: default avatarEric Huang <JinHuiEric.Huang@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c94d38f0
...@@ -3832,13 +3832,18 @@ static int vega10_dpm_get_mclk(struct pp_hwmgr *hwmgr, bool low) ...@@ -3832,13 +3832,18 @@ static int vega10_dpm_get_mclk(struct pp_hwmgr *hwmgr, bool low)
static int vega10_get_gpu_power(struct pp_hwmgr *hwmgr, static int vega10_get_gpu_power(struct pp_hwmgr *hwmgr,
struct pp_gpu_power *query) struct pp_gpu_power *query)
{ {
uint32_t value;
PP_ASSERT_WITH_CODE(!smum_send_msg_to_smc(hwmgr->smumgr, PP_ASSERT_WITH_CODE(!smum_send_msg_to_smc(hwmgr->smumgr,
PPSMC_MSG_GetCurrPkgPwr), PPSMC_MSG_GetCurrPkgPwr),
"Failed to get current package power!", "Failed to get current package power!",
return -EINVAL); return -EINVAL);
return vega10_read_arg_from_smc(hwmgr->smumgr, vega10_read_arg_from_smc(hwmgr->smumgr, &value);
&query->average_gpu_power); /* power value is an integer */
query->average_gpu_power = value << 8;
return 0;
} }
static int vega10_read_sensor(struct pp_hwmgr *hwmgr, int idx, static int vega10_read_sensor(struct pp_hwmgr *hwmgr, int idx,
......
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