From: jsg Date: Fri, 13 May 2022 03:24:22 +0000 (+0000) Subject: drm/amdgpu: explicitly check for s0ix when evicting resources X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3a693bf31e0600559bf582c34cf520f24bf5bd75;p=openbsd 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 --- 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))