drm/amdgpu: fix suspend/resume hang regression
authorjsg <jsg@openbsd.org>
Thu, 7 Apr 2022 07:59:24 +0000 (07:59 +0000)
committerjsg <jsg@openbsd.org>
Thu, 7 Apr 2022 07:59:24 +0000 (07:59 +0000)
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

index a0b2862..89faa2a 100644 (file)
@@ -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);
 }
 
 /**