<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);">
I sent a similar patch out a while ago, but never had a chance to follow up on it. The problem is users might change the default.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<a href="https://www.spinics.net/lists/amd-gfx/msg60578.html" id="LPlnk">https://www.spinics.net/lists/amd-gfx/msg60578.html</a></div>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1"></div>
<br>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Alex</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<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> Vishwakarma, Pratik <Pratik.Vishwakarma@amd.com><br>
<b>Sent:</b> Thursday, July 22, 2021 1:27 AM<br>
<b>To:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Vishwakarma, Pratik <Pratik.Vishwakarma@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu: Check pmops for desired suspend state</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">[Why]<br>
User might set mem_sleep as deep and it will result<br>
in amdgpu resume errors.<br>
<br>
[How]<br>
Check with pm for default suspend state<br>
<br>
Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++-<br>
1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c<br>
index af1710971ff3..d92196429741 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c<br>
@@ -1468,7 +1468,8 @@ static int amdgpu_pmops_suspend(struct device *dev)<br>
struct amdgpu_device *adev = drm_to_adev(drm_dev);<br>
int r;<br>
<br>
- if (amdgpu_acpi_is_s0ix_supported(adev))<br>
+ if (amdgpu_acpi_is_s0ix_supported(adev)<br>
+ && pm_suspend_default_s2idle())<br>
adev->in_s0ix = true;<br>
adev->in_s3 = true;<br>
r = amdgpu_device_suspend(drm_dev, true);<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>