<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri",sans-serif;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri",sans-serif;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri",sans-serif;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri",sans-serif;}
span.EmailStyle25
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Yes.<o:p></o:p></p>
<p class="MsoNormal">Is there any dependant patches?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Shirish S<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Zhu, Rex <br>
<b>Sent:</b> Tuesday, October 16, 2018 12:29 PM<br>
<b>To:</b> S, Shirish <Shirish.S@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> RE: [PATCH] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by user<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The code base is different.<o:p></o:p></p>
<p class="MsoNormal">And do you set ip_block_mask = 0xeff to diable vce?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best Regards<o:p></o:p></p>
<p class="MsoNormal">Rex<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></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 #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> S, Shirish <br>
<b>Sent:</b> Wednesday, October 17, 2018 1:25 AM<br>
<b>To:</b> Zhu, Rex <<a href="mailto:Rex.Zhu@amd.com">Rex.Zhu@amd.com</a>>; Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com">Alexander.Deucher@amd.com</a>>;
<a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
<b>Subject:</b> RE: [PATCH] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by user<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Nope, I have just cherry-picked this patch.<o:p></o:p></p>
<p class="MsoNormal">Is there any dependency?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Shirish S<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Zhu, Rex <br>
<b>Sent:</b> Tuesday, October 16, 2018 12:15 PM<br>
<b>To:</b> S, Shirish <<a href="mailto:Shirish.S@amd.com">Shirish.S@amd.com</a>>; Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com">Alexander.Deucher@amd.com</a>>;
<a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
<b>Subject:</b> RE: [PATCH] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by user<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Do you test based on drm-next branch?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best Regards<o:p></o:p></p>
<p class="MsoNormal">Rex<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></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 #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> S, Shirish <br>
<b>Sent:</b> Wednesday, October 17, 2018 1:12 AM<br>
<b>To:</b> Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com">Alexander.Deucher@amd.com</a>>; Zhu, Rex <<a href="mailto:Rex.Zhu@amd.com">Rex.Zhu@amd.com</a>>;
<a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
<b>Subject:</b> RE: [PATCH] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by user<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This patch fails on the very first resume as below:<o:p></o:p></p>
<p class="MsoNormal">[ 53.632732] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!<o:p></o:p></p>
<p class="MsoNormal">[ 54.653212] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!<o:p></o:p></p>
<p class="MsoNormal">[ 55.673692] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!<o:p></o:p></p>
<p class="MsoNormal">[ 56.694203] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!<o:p></o:p></p>
<p class="MsoNormal">[ 57.714683] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!<o:p></o:p></p>
<p class="MsoNormal">[ 58.735164] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!<o:p></o:p></p>
<p class="MsoNormal">[ 59.755643] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!<o:p></o:p></p>
<p class="MsoNormal">[ 60.776124] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!<o:p></o:p></p>
<p class="MsoNormal">[ 61.796608] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!<o:p></o:p></p>
<p class="MsoNormal">[ 62.817092] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, trying to reset the ECPU!!!<o:p></o:p></p>
<p class="MsoNormal">[ 62.837108] [drm:vce_v3_0_set_powergating_state] *ERROR* VCE not responding, giving up!!!<o:p></o:p></p>
<p class="MsoNormal">[ 62.837112] Power gating vce_v3_0 failed<o:p></o:p></p>
<p class="MsoNormal">[ 62.837118] [drm:amdgpu_device_ip_suspend_phase1] *ERROR* set_powergating_state(gate) of IP block <vce_v3_0> failed -110<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I believe there is some more work left to be done with it.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Shirish S<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> amd-gfx <<a href="mailto:amd-gfx-bounces@lists.freedesktop.org">amd-gfx-bounces@lists.freedesktop.org</a>>
<b>On Behalf Of </b>Deucher, Alexander<br>
<b>Sent:</b> Tuesday, October 16, 2018 9:44 AM<br>
<b>To:</b> Zhu, Rex <<a href="mailto:Rex.Zhu@amd.com">Rex.Zhu@amd.com</a>>; <a href="mailto:amd-gfx@lists.freedesktop.org">
amd-gfx@lists.freedesktop.org</a><br>
<b>Subject:</b> Re: [PATCH] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by user<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div id="divtagdefaultwrapper">
<p><span style="font-size:12.0pt;color:black">Reviewed-by: Alex Deucher <</span><a href="mailto:alexander.deucher@amd.com"><span style="font-size:12.0pt">alexander.deucher@amd.com</span></a><span style="font-size:12.0pt;color:black">><o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="3" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> amd-gfx <</span><a href="mailto:amd-gfx-bounces@lists.freedesktop.org">amd-gfx-bounces@lists.freedesktop.org</a><span style="color:black">> on behalf of Rex Zhu <</span><a href="mailto:Rex.Zhu@amd.com">Rex.Zhu@amd.com</a><span style="color:black">><br>
<b>Sent:</b> Tuesday, October 16, 2018 1:33:46 AM<br>
<b>To:</b> </span><a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><span style="color:black">; Deucher, Alexander<br>
<b>Cc:</b> Zhu, Rex<br>
<b>Subject:</b> [PATCH] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by user</span>
<o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">If user disable uvd/vce/vcn/acp blocks via module<br>
parameter ip_block_mask,<br>
driver power off thoser blocks to save power.<br>
<br>
Signed-off-by: Rex Zhu <<a href="mailto:Rex.Zhu@amd.com">Rex.Zhu@amd.com</a>><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 +++++++++++++++++++<br>
1 file changed, 19 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
index 1e4dd09..3ffee08 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
@@ -1774,6 +1774,24 @@ static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power<br>
<br>
for (j = 0; j < adev->num_ip_blocks; j++) {<br>
i = state == AMD_PG_STATE_GATE ? j : adev->num_ip_blocks - j - 1;<br>
+<br>
+ /* try to power off VCE/UVD/VCN/ACP if they were disabled by user */<br>
+ if ((adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_UVD ||<br>
+ adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_VCE ||<br>
+ adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_VCN ||<br>
+ adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_ACP) &&<br>
+ adev->ip_blocks[i].version->funcs->set_powergating_state) {<br>
+ if (!adev->ip_blocks[i].status.valid) {<br>
+ r = adev->ip_blocks[i].version->funcs->set_powergating_state((void *)adev,<br>
+ state);<br>
+ if (r) {<br>
+ DRM_ERROR("set_powergating_state(gate) of IP block <%s> failed %d\n",<br>
+ adev->ip_blocks[i].version->funcs->name, r);<br>
+ return r;<br>
+ }<br>
+ }<br>
+ }<br>
+<br>
if (!adev->ip_blocks[i].status.late_initialized)<br>
continue;<br>
/* skip CG for VCE/UVD, it's handled specially */<br>
@@ -1791,6 +1809,7 @@ static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power<br>
}<br>
}<br>
}<br>
+<br>
return 0;<br>
}<br>
<br>
-- <br>
1.9.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
<a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>