<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">when <span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 14.6667px;">PPSMC_MSG_PmStatusLogSample
sent, firmware will clean the temp sampling date, and add the sample task to dpm loop.</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-size: 14.6667px;">but firmware not clean the registers. if firmware not update the registers, we will read out the original value.</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-size: 14.6667px;"><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-size: 14.6667px;">Best Regards</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-size: 14.6667px;">Rex</span></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<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 Eric Huang <jinhuieric.huang@amd.com><br>
<b>Sent:</b> Friday, March 30, 2018 11:22 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> Re: [PATCH] drm/amd/pp: Clean register first to avoid read original value</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText"><br>
On 03/30/2018 10:36 AM, Eric Huang wrote:<br>
> It is not necessary to do that. The register will reset to 0 after <br>
> reading.<br>
The register is not reset after reading. Actually after <br>
PPSMC_MSG_PmStatusLogSample sent, the register will be updated. So it is <br>
still not necessary to do that.<br>
<br>
Eric<br>
><br>
> Eric<br>
><br>
><br>
> On 03/30/2018 03:33 AM, Rex Zhu wrote:<br>
>> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com><br>
>> ---<br>
>> drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 13 +++++++++++++<br>
>> 1 file changed, 13 insertions(+)<br>
>><br>
>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c <br>
>> b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
>> index aaa9f5b..38cf3a1 100644<br>
>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
>> @@ -3368,6 +3368,19 @@ static int smu7_get_gpu_power(struct pp_hwmgr <br>
>> *hwmgr,<br>
>> "Failed to start pm status log!",<br>
>> return -1);<br>
>> + cgs_write_ind_register(hwmgr->device,<br>
>> + CGS_IND_REG__SMC,<br>
>> + ixSMU_PM_STATUS_40, 0);<br>
>> + cgs_write_ind_register(hwmgr->device,<br>
>> + CGS_IND_REG__SMC,<br>
>> + ixSMU_PM_STATUS_49, 0);<br>
>> + cgs_write_ind_register(hwmgr->device,<br>
>> + CGS_IND_REG__SMC,<br>
>> + ixSMU_PM_STATUS_94, 0);<br>
>> + cgs_write_ind_register(hwmgr->device,<br>
>> + CGS_IND_REG__SMC,<br>
>> + ixSMU_PM_STATUS_95, 0);<br>
>> +<br>
>> /* Sampling period from 50ms to 4sec */<br>
>> msleep_interruptible(200);<br>
><br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" id="LPlnk194206" previewremoved="true">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
<div id="LPBorder_GT_15224555838300.6305618541058784" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15224555838230.7487087610706571" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_15224555838250.5092558814385109" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_15224555838250.8684840095335804"></div>
<div id="LPTitle_15224555838260.8317841949999445" style="top: 0px; color: rgb(0, 120, 215); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15224555838270.3536369120415084" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" target="_blank" style="text-decoration: none;">amd-gfx Info Page - freedesktop.org</a></div>
<div id="LPMetadata_15224555838270.8339160024590055" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
lists.freedesktop.org</div>
<div id="LPDescription_15224555838290.8158871495654998" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
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.</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>