提交 605660b1 编写于 作者: Q Qiang Yu 提交者: Zheng Zengkai

drm/amdgpu: fix suspend/resume hang regression

stable inclusion
from stable-v5.10.104
commit 6828da5dea530f4743ecdef89f90cc117dfe3cee
bugzilla: https://gitee.com/openeuler/kernel/issues/I56XAC

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6828da5dea530f4743ecdef89f90cc117dfe3cee

--------------------------------

[ Upstream commit f1ef1701 ]

Regression has been reported that suspend/resume may hang with
the previous vm ready check commit.

So bring back the evicted list check as a temp fix.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1922
Fixes: c1a66c3b ("drm/amdgpu: check vm ready by amdgpu_vm->evicting flag")
Reviewed-by: NChristian König <christian.koenig@amd.com>
Signed-off-by: NQiang Yu <qiang.yu@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 d7ec5ed7
......@@ -724,7 +724,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);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册