]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/amdgpu/powerplay: actually return the power with the new query
authorAlex Deucher <alexander.deucher@amd.com>
Sat, 21 Apr 2018 19:09:59 +0000 (14:09 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 May 2018 18:43:48 +0000 (13:43 -0500)
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 <Dieter@nuetzel-hh.de>
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c

index 232ea6fc30f4f862b67c01525c5914098b2e014a..c9dd0bec1e24c9fbb83bfcaf210f7e04a29eaa49 100644 (file)
@@ -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;