<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></p>
<div>Series is:<br>
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com></div>
<p></p>
<p><br>
</p>
<p><br>
</p>
<p>Best Regards</p>
<p>Rex<br>
</p>
<p><br>
</p>
<p><font size="2"><span style="font-size:10pt;"></span></font><span><span></span></span><br>
</p>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Tom St Denis <tom.stdenis@amd.com><br>
<b>Sent:</b> Saturday, September 9, 2017 12:01 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> StDenis, Tom<br>
<b>Subject:</b> [PATCH 16/16] drm/amd/powerplay: Tidy up vega10_thermal_initialize()</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Signed-off-by: Tom St Denis <tom.stdenis@amd.com><br>
---<br>
 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 13 +++++--------<br>
 1 file changed, 5 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c<br>
index d5d676595f10..5b3c443d4e94 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c<br>
@@ -429,19 +429,16 @@ static int vega10_thermal_initialize(struct pp_hwmgr *hwmgr)<br>
                 reg = soc15_get_register_offset(THM_HWID, 0,<br>
                                 mmCG_TACH_CTRL_BASE_IDX, mmCG_TACH_CTRL);<br>
                 cgs_write_register(hwmgr->device, reg,<br>
-                               (cgs_read_register(hwmgr->device, reg) &<br>
-                               ~CG_TACH_CTRL__EDGE_PER_REV_MASK) |<br>
-                               ((hwmgr->thermal_controller.fanInfo.<br>
-                               ucTachometerPulsesPerRevolution - 1) <<<br>
-                               CG_TACH_CTRL__EDGE_PER_REV__SHIFT));<br>
+                       CGS_REG_SET_FIELD(cgs_read_register(hwmgr->device, reg),<br>
+                               CG_TACH_CTRL, EDGE_PER_REV,<br>
+                               hwmgr->thermal_controller.fanInfo.ucTachometerPulsesPerRevolution - 1));<br>
         }<br>
 <br>
         reg = soc15_get_register_offset(THM_HWID, 0,<br>
                         mmCG_FDO_CTRL2_BASE_IDX, mmCG_FDO_CTRL2);<br>
         cgs_write_register(hwmgr->device, reg,<br>
-                       (cgs_read_register(hwmgr->device, reg) &<br>
-                       ~CG_FDO_CTRL2__TACH_PWM_RESP_RATE_MASK) |<br>
-                       (0x28 << CG_FDO_CTRL2__TACH_PWM_RESP_RATE__SHIFT));<br>
+               CGS_REG_SET_FIELD(cgs_read_register(hwmgr->device, reg),<br>
+                       CG_FDO_CTRL2, TACH_PWM_RESP_RATE, 0x28));<br>
 <br>
         return 0;<br>
 }<br>
-- <br>
2.12.0<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a previewremoved="true" id="LPlnk257147" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
<div style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;" id="LPBorder_GT_15051270193460.6331715354292681">
<table role="presentation" 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);" id="LPContainer_15051270193430.08215395543104731" cellspacing="0">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;" id="TextCell_15051270193450.8434762655037125">
<div id="LPRemovePreviewContainer_15051270193450.019914902208305496"></div>
<div style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; 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;" id="LPTitle_15051270193450.4318257709761001">
<a target="_blank" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" style="text-decoration: none;" id="LPUrlAnchor_15051270193450.4794142730862342">amd-gfx Info Page - freedesktop.org</a></div>
<div style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size: 14px; line-height: 14px;" id="LPMetadata_15051270193450.2295830383996682">
lists.freedesktop.org</div>
<div style="display: block; color: rgb(102, 102, 102); font-weight: 400; 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;" id="LPDescription_15051270193450.332819494062337">
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 ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
</div>
</span></font></div>
</div>
</body>
</html>