From: Alex Deucher Date: Sat, 21 Apr 2018 19:09:59 +0000 (-0500) Subject: drm/amdgpu/powerplay: actually return the power with the new query X-Git-Tag: v4.18-rc1~128^2~12^2~99 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9e70b539292652d31091568f89e73b54e3a4f79d;p=users%2Fjedix%2Flinux-maple.git drm/amdgpu/powerplay: actually return the power with the new query Set query to the power value so we actually return it. Fixes no power value returned on asics with the new query. Tested-by: Dieter Nützel Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c index 232ea6fc30f4..c9dd0bec1e24 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c @@ -3369,6 +3369,7 @@ static int smu7_get_gpu_power(struct pp_hwmgr *hwmgr, u32 *query) smum_send_msg_to_smc_with_parameter(hwmgr, PPSMC_MSG_GetCurrPkgPwr, 0); tmp = cgs_read_register(hwmgr->device, mmSMC_MSG_ARG_0); + *query = tmp; if (tmp != 0) return 0;