<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"><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;">>We also need to power
it back up in hw_fini and suspend and then power</span><br 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;">
<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;">>it back down in resume.</span><br>
</p>
<div><br>
</div>
Yes, this logic will be added in acp block.
<div>In this patch, we only power down acp when it was not used and have no inpact wen s3.</div>
<div><br>
</div>
<div>Best Regards</div>
<div>Rex<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> Alex Deucher <alexdeucher@gmail.com><br>
<b>Sent:</b> Thursday, July 19, 2018 9:56 PM<br>
<b>To:</b> Zhu, Rex<br>
<b>Cc:</b> amd-gfx list<br>
<b>Subject:</b> Re: [PATCH 2/2] drm/amdgpu: Power down acp if board uses AZ</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Thu, Jul 19, 2018 at 4:46 AM, Rex Zhu <rex.zhu@amd.com> wrote:<br>
> if board uses AZ rather than ACP, we power down acp<br>
> through smu to save power.<br>
><br>
<br>
We also need to power it back up in hw_fini and suspend and then power<br>
it back down in resume.<br>
<br>
Alex<br>
<br>
> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com><br>
> ---<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 8 +++++---<br>
> 1 file changed, 5 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c<br>
> index 71efcf3..4e18a88 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c<br>
> @@ -35,6 +35,7 @@<br>
><br>
> #include "acp_gfx_if.h"<br>
><br>
> +<br>
> #define ACP_TILE_ON_MASK 0x03<br>
> #define ACP_TILE_OFF_MASK 0x02<br>
> #define ACP_TILE_ON_RETAIN_REG_MASK 0x1f<br>
> @@ -289,11 +290,12 @@ static int acp_hw_init(void *handle)<br>
> r = amd_acp_hw_init(adev->acp.cgs_device,<br>
> ip_block->version->major, ip_block->version->minor);<br>
> /* -ENODEV means board uses AZ rather than ACP */<br>
> - if (r == -ENODEV)<br>
> + if (r == -ENODEV) {<br>
> + amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_ACP, true);<br>
> return 0;<br>
> - else if (r)<br>
> + } else if (r) {<br>
> return r;<br>
> -<br>
> + }<br>
> if (adev->rmmio_size == 0 || adev->rmmio_size < 0x5289)<br>
> return -EINVAL;<br>
><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="LPlnk998837" class="OWAAutoLink" previewremoved="true">
https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
<div id="LPBorder_GT_15320131028380.702754859637317" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15320131028280.1025073489385282" 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_15320131028320.9917042135546368" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_15320131028320.024263722967099"></div>
<div id="LPTitle_15320131028320.9687962596936737" 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_15320131028340.4538000273988081" 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_15320131028350.13229109652970839" 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_15320131028370.6585869579202912" 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>
</div>
</body>
</html>