Skip to contentSkip to conversation

drm/amdgpu/powerplay: actually return the power with the new query

PATCH In review Alex Deucher 2 participants 2 messages Apr 21, 2018 – Apr 23, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
index 720ac47d3365..90ad1b0ffb9a 100644
@@ -3340,6 +3340,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;
Signature · 6 lines
2.13.6

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20180421191151.12846-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Best Regards

Rex

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Alex Deucher <[email protected]>
Sent: Sunday, April 22, 2018 3:11 AM
To: [email protected]
Cc: Deucher, Alexander
Subject: [PATCH] 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.

---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
index 720ac47d3365..90ad1b0ffb9a 100644
@@ -3340,6 +3340,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;

--
2.13.6

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of Conduct.

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx