[PATCH 1/2] drm/amdgpu: explicitly check for s0ix when evicting resources

Deucher, Alexander Alexander.Deucher at amd.com
Tue Jan 4 17:14:58 UTC 2022


[Public]

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Mario Limonciello <mario.limonciello at amd.com>
Sent: Monday, January 3, 2022 10:23 AM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Limonciello, Mario <Mario.Limonciello at amd.com>
Subject: [PATCH 1/2] drm/amdgpu: explicitly check for s0ix when evicting resources

This codepath should be running in both s0ix and s3, but only does
currently because s3 and s0ix are both set in the s0ix case.

Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index ce93a304292c..412f377f80b1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3956,8 +3956,8 @@ void amdgpu_device_fini_sw(struct amdgpu_device *adev)
  */
 static void amdgpu_device_evict_resources(struct amdgpu_device *adev)
 {
-       /* No need to evict vram on APUs for suspend to ram */
-       if (adev->in_s3 && (adev->flags & AMD_IS_APU))
+       /* No need to evict vram on APUs for suspend to ram or s2idle */
+       if ((adev->in_s3 || adev->in_s0ix) && (adev->flags & AMD_IS_APU))
                 return;

         if (amdgpu_ttm_evict_resources(adev, TTM_PL_VRAM))
--
2.25.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20220104/1676e591/attachment-0001.htm>


More information about the amd-gfx mailing list