<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Do we need an smu version check? Will <font size="2"><span style="font-size:11pt">AverageSocketPower</span></font> report correctly on older versions of smu firmware? Assuming that is ok, patch is:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Acked-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Russell, Kent <Kent.Russell@amd.com><br>
<b>Sent:</b> Thursday, August 22, 2019 8:19 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Russell, Kent <Kent.Russell@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu: Fix Vega20 Average Power value</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">The SMU changed reading from CurrSocketPower to AverageSocketPower, so<br>
reflect this accordingly. This fixes the issue where Average Power<br>
Consumption was being reported as 0 from SMU 40.46-onward<br>
<br>
Change-Id: I471f93316820f1401cb497eefe29da68376a4bb9<br>
Signed-off-by: Kent Russell <kent.russell@amd.com><br>
---<br>
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 2 +-<br>
drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 2 +-<br>
2 files changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c<br>
index 0516c294b377..1820133f0ceb 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c<br>
@@ -2101,7 +2101,7 @@ static int vega20_get_gpu_power(struct pp_hwmgr *hwmgr,<br>
if (ret)<br>
return ret;<br>
<br>
- *query = metrics_table.CurrSocketPower << 8;<br>
+ *query = metrics_table.AverageSocketPower << 8;<br>
<br>
return ret;<br>
}<br>
diff --git a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c<br>
index e14363182691..17af12ee9e78 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c<br>
@@ -2927,7 +2927,7 @@ static int vega20_get_gpu_power(struct smu_context *smu, uint32_t *value)<br>
if (ret)<br>
return ret;<br>
<br>
- *value = metrics.CurrSocketPower << 8;<br>
+ *value = metrics.AverageSocketPower << 8;<br>
<br>
return 0;<br>
}<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a></div>
</span></font></div>
</body>
</html>