<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;" align="Left">
[AMD Official Use Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
</div>
This<span style="color:#c0c0c0"> </span>patch<span style="color:#c0c0c0"> </span>
is<span style="color:#c0c0c0"> </span>Reviewed-by:<span style="color:#c0c0c0"> </span>
James<span style="color:#c0c0c0"> </span>Zhu<span style="color:#c0c0c0"> </span><James.Zhu@amd.com>
<div>
<div id="Signature">
<div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p><br>
</p>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<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> Tianci Yin <tianci.yin@amd.com><br>
<b>Sent:</b> Wednesday, March 23, 2022 12:01 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Chen, Guchun <Guchun.Chen@amd.com>; Zhu, James <James.Zhu@amd.com>; Wang, Yu (Charlie) <Yu.Wang4@amd.com>; Yin, Tianci (Rico) <Tianci.Yin@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu/vcn: improve vcn dpg stop procedure</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Prior to disabling dpg, VCN need unpausing dpg mode, or VCN will hang in<br>
S3 resuming.<br>
<br>
Signed-off-by: Tianci Yin <tianci.yin@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 3 +++<br>
 1 file changed, 3 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c<br>
index b16c56aa2d22..0d590183328f 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c<br>
@@ -1480,8 +1480,11 @@ static int vcn_v3_0_start_sriov(struct amdgpu_device *adev)<br>
 <br>
 static int vcn_v3_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)<br>
 {<br>
+       struct dpg_pause_state state = {.fw_based = VCN_DPG_STATE__UNPAUSE};<br>
         uint32_t tmp;<br>
 <br>
+       vcn_v3_0_pause_dpg_mode(adev, 0, &state);<br>
+<br>
         /* Wait for power status to be 1 */<br>
         SOC15_WAIT_ON_RREG(VCN, inst_idx, mmUVD_POWER_STATUS, 1,<br>
                 UVD_POWER_STATUS__UVD_POWER_STATUS_MASK);<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>