winsys/amdgpu: use the no-op helper to detect if reset completion
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 7 Apr 2023 07:24:03 +0000 (09:24 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 27 Apr 2023 12:06:08 +0000 (12:06 +0000)
commitb4a2cb1e166891ee64a8971a43a42e7e0280a80e
tree520aa0c09bc16251d3aa2951c4e491aaae9d26e3
parent45cd75cdad3f6b34a47b3cb930db2dfb04669722
winsys/amdgpu: use the no-op helper to detect if reset completion

On older kernel the completion of the reset isn't signalled to userspace,
yet we need it to implement the EXT_robustness extension correctly.

In this situation, try to create a new context and submit a no-op job. If
the reset isn't done the kernel will reject the submission (-ECANCELED);
otherwise the submission will go through and we'll know that the reset is
done.

Reviewed-by: André Almeida <andrealmeid@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22290>
src/gallium/winsys/amdgpu/drm/amdgpu_cs.c