<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,Arial,Helvetica,sans-serif;" dir="ltr">
<p>You could do that as </p>
<p><br>
</p>
<p>WREG32_FIELD(UVD_CGC_GATE, REGS, 0);</p>
<p><br>
</p>
<p>Unless you need 'data' somewhere else in the function.</p>
<p><br>
</p>
<p>Tom</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Rex Zhu <Rex.Zhu@amd.com><br>
<b>Sent:</b> Wednesday, November 9, 2016 05:08<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Zhu, Rex<br>
<b>Subject:</b> [PATCH 1/2] drm/amdgpu: always un-gate UVD REGS path.</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Change-Id: I910a79b551a9b79b635161bb42ac123a23783225<br>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 3 +++<br>
 1 file changed, 3 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c<br>
index d2c96f1..d686946 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c<br>
@@ -596,7 +596,10 @@ static void uvd_v4_2_set_dcm(struct amdgpu_device *adev,<br>
                              bool sw_mode)<br>
 {<br>
         u32 tmp, tmp2;<br>
+       u32 data = RREG32(mmUVD_CGC_GATE);<br>
 <br>
+       data &= ~UVD_CGC_GATE__REGS_MASK;<br>
+       WREG32(mmUVD_CGC_GATE, data);<br>
         tmp = RREG32(mmUVD_CGC_CTRL);<br>
         tmp &= ~(UVD_CGC_CTRL__CLK_OFF_DELAY_MASK | UVD_CGC_CTRL__CLK_GATE_DLY_TIMER_MASK);<br>
         tmp |= UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK |<br>
-- <br>
1.9.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" id="LPlnk831725" previewremoved="true">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</div>
</body>
</html>