<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:#317100;margin:15pt;" align="Left">
[AMD Public Use]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-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> Liang, Prike <Prike.Liang@amd.com><br>
<b>Sent:</b> Wednesday, April 15, 2020 11:43 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>; Huang, Ray <Ray.Huang@amd.com>; Liang, Prike <Prike.Liang@amd.com><br>
<b>Subject:</b> [PATCH] drm/amd/powerplay: fix resume failed as smu table initialize early exit</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">When the amdgpu in the suspend/resume loop need notify the dpm disabled,<br>
otherwise the smu table will be uninitialize and result in resume failed.<br>
<br>
Signed-off-by: Prike Liang <Prike.Liang@amd.com><br>
Tested-by: Mengbing Wang <Mengbing.Wang@amd.com><br>
---<br>
drivers/gpu/drm/amd/powerplay/renoir_ppt.c | 7 ++++++-<br>
1 file changed, 6 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c<br>
index 95eb445..7ddaea8 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c<br>
@@ -895,12 +895,17 @@ static int renoir_read_sensor(struct smu_context *smu,<br>
<br>
static bool renoir_is_dpm_running(struct smu_context *smu)<br>
{<br>
+ struct amdgpu_device *adev = smu->adev;<br>
+<br>
/*<br>
* Until now, the pmfw hasn't exported the interface of SMU<br>
* feature mask to APU SKU so just force on all the feature<br>
* at early initial stage.<br>
*/<br>
- return true;<br>
+ if (adev->in_suspend)<br>
+ return false;<br>
+ else<br>
+ return true;<br>
<br>
}<br>
<br>
-- <br>
2.7.4<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>