<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:#008000;margin:15pt;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Acked-by: Alex Deucher <alexander.deucher@amd.com><br>
</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> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Prike Liang <Prike.Liang@amd.com><br>
<b>Sent:</b> Monday, April 25, 2022 2:52 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Lazar, Lijo <Lijo.Lazar@amd.com>; Liang, Prike <Prike.Liang@amd.com>; Huang, Ray <Ray.Huang@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu: keep mmhub clock gating being enabled during s2idle suspend</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Without MMHUB clock gating being enabled then MMHUB will not disconnect<br>
from DF and will result in DF C-state entry can't be accessed during S2idle<br>
suspend, and eventually s0ix entry will be blocked.<br>
<br>
Signed-off-by: Prike Liang <Prike.Liang@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 10 ++++++++++<br>
 1 file changed, 10 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c<br>
index a455e59f41f4..20946bc7fc93 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c<br>
@@ -1151,6 +1151,16 @@ static int gmc_v10_0_set_clockgating_state(void *handle,<br>
         int r;<br>
         struct amdgpu_device *adev = (struct amdgpu_device *)handle;<br>
 <br>
+       /*<br>
+        * The issue mmhub can't disconnect from DF with MMHUB clock gating being disabled<br>
+        * is a new problem observed at DF 3.0.3, however with the same suspend sequence not<br>
+        * seen any issue on the DF 3.0.2 series platform.<br>
+        */<br>
+       if (adev->in_s0ix && adev->ip_versions[DF_HWIP][0] > IP_VERSION(3, 0, 2)) {<br>
+               dev_dbg(adev->dev, "keep mmhub clock gating being enabled for s0ix\n");<br>
+               return 0;<br>
+       }<br>
+<br>
         r = adev->mmhub.funcs->set_clockgating(adev, state);<br>
         if (r)<br>
                 return r;<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>