<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">
<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> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Hawking Zhang <Hawking.Zhang@amd.com><br>
<b>Sent:</b> Tuesday, August 27, 2019 5:19 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Zhang, Hawking <Hawking.Zhang@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu: correct in_suspend setting for navi series</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">in_suspend flag should be set in amdgpu_device_suspend/resume in pairs,<br>
instead of gfx10 ip suspend/resume function.<br>
<br>
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 12 ++----------<br>
 1 file changed, 2 insertions(+), 10 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<br>
index f708912..a2f4ff1 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<br>
@@ -3768,20 +3768,12 @@ static int gfx_v10_0_hw_fini(void *handle)<br>
 <br>
 static int gfx_v10_0_suspend(void *handle)<br>
 {<br>
-       struct amdgpu_device *adev = (struct amdgpu_device *)handle;<br>
-<br>
-       adev->in_suspend = true;<br>
-       return gfx_v10_0_hw_fini(adev);<br>
+       return gfx_v10_0_hw_fini(handle);<br>
 }<br>
 <br>
 static int gfx_v10_0_resume(void *handle)<br>
 {<br>
-       struct amdgpu_device *adev = (struct amdgpu_device *)handle;<br>
-       int r;<br>
-<br>
-       r = gfx_v10_0_hw_init(adev);<br>
-       adev->in_suspend = false;<br>
-       return r;<br>
+       return gfx_v10_0_hw_init(handle);<br>
 }<br>
 <br>
 static bool gfx_v10_0_is_idle(void *handle)<br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a></div>
</span></font></div>
</body>
</html>