<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;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Right now I'm running with PP enabled, CG all enabled (well defaults for CZ) and PG all disabled.</p>
<p><br>
</p>
<p>I think with DPM the clock gating kicks in with module load (I seem to recall that when testing the UVD PG changes).</p>
<p><br>
</p>
<p>Tom</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Deucher, Alexander<br>
<b>Sent:</b> Thursday, July 14, 2016 14:09<br>
<b>To:</b> StDenis, Tom<br>
<b>Cc:</b> amd-gfx list<br>
<b>Subject:</b> RE: powerplay UVD CG (defaults to on)</font>
<div> </div>
</div>
<div>
<div>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Is that clock gating or uvd clock dpm?</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Alex</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<div style="border:none; border-left:solid blue 1.5pt; padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif""> StDenis, Tom
<br>
<b>Sent:</b> Thursday, July 14, 2016 2:04 PM<br>
<b>To:</b> Deucher, Alexander<br>
<b>Cc:</b> amd-gfx list<br>
<b>Subject:</b> Re: powerplay UVD CG (defaults to on)</span></p>
</div>
</div>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
 </p>
<div id="divtagdefaultwrapper">
<p style="background:white"><span style="font-family:"Calibri","sans-serif"; color:black">Hi Alex,</span></p>
<p style="background:white"><span style="font-family:"Calibri","sans-serif"; color:black"> </span></p>
<p style="background:white"><span style="font-family:"Calibri","sans-serif"; color:black">Thing is once the core is in use (and all times after that) UVD clocks are being gated (by firmware) as you'd expect.  For instance, UDEC_SCLK is reading ~10% by the debug
 tool while playing a 1080p h264 video on my CZ.  If I stop playing video the clock doesn't go back to 100% so FW is still gating it (reads 0%).</span></p>
<p style="background:white"><span style="font-family:"Calibri","sans-serif"; color:black"> </span></p>
<p style="background:white"><span style="font-family:"Calibri","sans-serif"; color:black">It's likely a late_init issue I just wanted to know if there was a technical reason to not have it gated after loading the module (like for PG it must be enabled after
 the core is initialized properly for instance which is why it's not supported in PP just yet).</span></p>
<p style="background:white"><span style="font-family:"Calibri","sans-serif"; color:black"> </span></p>
<p style="background:white"><span style="font-family:"Calibri","sans-serif"; color:black">Cheers,</span></p>
<p style="background:white"><span style="font-family:"Calibri","sans-serif"; color:black">Tom</span></p>
<p style="background:white"><span style="font-family:"Calibri","sans-serif"; color:black"> </span></p>
<div>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif; background: white;">
<span style="font-family:"Calibri","sans-serif"; color:black"> </span></p>
<div>
<div align="center" style="text-align: center; margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif; background: white;">
<span style="font-family:"Calibri","sans-serif"; color:black">
<hr size="2" width="98%" align="center">
</span></div>
<div id="divRplyFwdMsg">
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif; background: white;">
<b><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:black">From:</span></b><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:black"> Deucher, Alexander<br>
<b>Sent:</b> Thursday, July 14, 2016 13:59<br>
<b>To:</b> StDenis, Tom; amd-gfx list<br>
<b>Subject:</b> RE: powerplay UVD CG (defaults to on)</span><span style="font-family:"Calibri","sans-serif"; color:black">
</span></p>
<div>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif; background: white;">
<span style="font-family:"Calibri","sans-serif"; color:black"> </span></p>
</div>
</div>
<div>
<div>
<p style="background:white"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">On asic powerup, the UVD clocks are not gated IIRC.  All the blocks that support clockgating get gated in amdgpu_late_init() in amdgpu_device which
 calls the set_clockgating_state() callback for each IP.  So they should be gated at that point.  You'll probably want to check and see what powerplay does in it’s set_clockgating_state or late_init IP callbacks.  UVD and VCE are a bit trickier since they only
 support manual clock and powergating.</span><span style="color:black"></span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span><span style="color:black"></span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Alex</span><span style="color:black"></span></p>
<p style="background:white"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span><span style="color:black"></span></p>
<div style="border:none; border-left:solid blue 1.5pt; padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p style="background:white"><b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">From:</span></b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> amd-gfx [<a href="mailto:amd-gfx-bounces@lists.freedesktop.org" style="color: blue; text-decoration: underline;">mailto:amd-gfx-bounces@lists.freedesktop.org</a>]
<b>On Behalf Of </b>StDenis, Tom<br>
<b>Sent:</b> Thursday, July 14, 2016 10:05 AM<br>
<b>To:</b> amd-gfx list<br>
<b>Subject:</b> powerplay UVD CG (defaults to on)</span><span style="color:black"></span></p>
</div>
</div>
<p style="background:white"><span style="color:black"> </span></p>
<div id="divtagdefaultwrapper">
<p style="background:white"><span style="font-family:"Calibri","sans-serif"; color:black">Upon loading the module the UVD clocks are full on until you use the UVD block in which case CG kicks in.  This is on a boot with pg_mask=0 but cg_mask left alone (I'm
 trying to see if I can get a system hang with PG alone turned off).</span></p>
<p style="background:white"><span style="font-family:"Calibri","sans-serif"; color:black"> </span></p>
<p style="background:white"><span style="font-family:"Calibri","sans-serif"; color:black">That's probably a bug in powerplay though right?  I'd think on boot the UVD clocks should gate.  Is that on purpose or as a workaround for something?</span></p>
<p style="background:white"><span style="font-family:"Calibri","sans-serif"; color:black"> </span></p>
<p style="background:white"><span style="font-family:"Calibri","sans-serif"; color:black">Tom</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>