From 3a693bf31e0600559bf582c34cf520f24bf5bd75 Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 13 May 2022 03:24:22 +0000 Subject: [PATCH] drm/amdgpu: explicitly check for s0ix when evicting resources From Mario Limonciello 22b80bff17261427a5e152e537c3ec76fb356aec in linux 5.15.y/5.15.39 e53d9665ab003df0ece8f869fcd3c2bbbecf7190 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c index 1d85450b2aa..735a632ad9d 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c @@ -4027,8 +4027,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.20.1