<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">
<p style="font-family:Arial;font-size:11pt;color:#0078D7;margin:5pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<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> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Xiaomeng Hou <Xiaomeng.Hou@amd.com><br>
<b>Sent:</b> Tuesday, December 8, 2020 7:19 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Huang, Ray <Ray.Huang@amd.com>; Hou, Xiaomeng (Matthew) <Xiaomeng.Hou@amd.com>; Quan, Evan <Evan.Quan@amd.com><br>
<b>Subject:</b> [PATCH 3/3] drm/amdgpu/pm: inform PMFW rlc status before start/stop rlc for vangogh</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">RLC is halted when system suspend/shutdown. However, due to DPM enabled, PMFM is<br>
unaware of RLC being halted and will continue sending messages, which would<br>
eventually caused ACPI related hang. So send message to inform PMFM the rlc<br>
status before start/stop rlc.<br>
<br>
Signed-off-by: Xiaomeng Hou <Xiaomeng.Hou@amd.com><br>
Change-Id: I7b1a04f6e249ac6753109079ecb3019c99161d9f<br>
---<br>
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 16 ++++++++++++++++<br>
 1 file changed, 16 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c<br>
index cf999b7a2164..42a32c0e5bab 100644<br>
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c<br>
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c<br>
@@ -920,6 +920,14 @@ static int smu_smc_hw_setup(struct smu_context *smu)<br>
         uint32_t pcie_gen = 0, pcie_width = 0;<br>
         int ret = 0;<br>
 <br>
+       if (adev->in_suspend && smu->is_apu) {<br>
+               ret = smu_notify_rlc_status(smu, 1);</div>
<div class="PlainText">[kevin]:</div>
<div class="PlainText">for 2nd parameter of '1',  why not use the macro to replace it which is defined in previous patch ?</div>
<div class="PlainText">and why not put these codes into smu_resume/suspend functions?</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">+               if (ret) {<br>
+                       dev_info(adev->dev, "Failed to notify rlc status!\n");<br>
+                       return ret;<br>
+               }<br>
+       }<br>
+<br>
         if (adev->in_suspend && smu_is_dpm_running(smu)) {<br>
                 dev_info(adev->dev, "dpm has been enabled\n");<br>
                 /* this is needed specifically */<br>
@@ -1213,6 +1221,14 @@ static int smu_disable_dpms(struct smu_context *smu)<br>
                         dev_err(adev->dev, "Failed to disable smu features.\n");<br>
         }<br>
 <br>
+       if (smu->is_apu) {<br>
+               ret = smu_notify_rlc_status(smu, 0);<br>
+               if (ret) {<br>
+                       dev_info(adev->dev, "Failed to notify rlc status!\n");<br>
+                       return ret;<br>
+               }<br>
+       }<br>
+<br>
         if (adev->asic_type >= CHIP_NAVI10 &&<br>
             adev->gfx.rlc.funcs->stop)<br>
                 adev->gfx.rlc.funcs->stop(adev);<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7CKevin1.Wang%40amd.com%7Cb3afedc0e8a34992b17408d89b6b4f02%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637430232491676693%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=2gyWC0ytrVqLqNX2OappS8ALSyWkNa0xKYp96vMpxfk%3D&amp;reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7CKevin1.Wang%40amd.com%7Cb3afedc0e8a34992b17408d89b6b4f02%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637430232491676693%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=2gyWC0ytrVqLqNX2OappS8ALSyWkNa0xKYp96vMpxfk%3D&amp;reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>