From f24eb5de8da14f31f4815d783b89a7a3fad0f636 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 7 Apr 2022 07:59:24 +0000 Subject: [PATCH] drm/amdgpu: fix suspend/resume hang regression From Qiang Yu 46eed3a37dee87b9c35c7419e1820797121893a0 in linux 5.15.y/5.15.27 f1ef17011c765495c876fa75435e59eecfdc1ee4 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_vm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_vm.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_vm.c index a0b2862b2eb..89faa2a72e7 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_vm.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_vm.c @@ -843,7 +843,8 @@ bool amdgpu_vm_ready(struct amdgpu_vm *vm) amdgpu_vm_eviction_lock(vm); ret = !vm->evicting; amdgpu_vm_eviction_unlock(vm); - return ret; + + return ret && list_empty(&vm->evicted); } /** -- 2.20.1