<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);">
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 Mario Limonciello <mario.limonciello@amd.com><br>
<b>Sent:</b> Monday, January 3, 2022 10:23 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Limonciello, Mario <Mario.Limonciello@amd.com><br>
<b>Subject:</b> [PATCH 1/2] drm/amdgpu: explicitly check for s0ix when evicting resources</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">This codepath should be running in both s0ix and s3, but only does<br>
currently because s3 and s0ix are both set in the s0ix case.<br>
<br>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--<br>
1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
index ce93a304292c..412f377f80b1 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
@@ -3956,8 +3956,8 @@ void amdgpu_device_fini_sw(struct amdgpu_device *adev)<br>
*/<br>
static void amdgpu_device_evict_resources(struct amdgpu_device *adev)<br>
{<br>
- /* No need to evict vram on APUs for suspend to ram */<br>
- if (adev->in_s3 && (adev->flags & AMD_IS_APU))<br>
+ /* No need to evict vram on APUs for suspend to ram or s2idle */<br>
+ if ((adev->in_s3 || adev->in_s0ix) && (adev->flags & AMD_IS_APU))<br>
return;<br>
<br>
if (amdgpu_ttm_evict_resources(adev, TTM_PL_VRAM))<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>