winsys/amdgpu: Remove assert about user fence in amdgpu_fence_wait

The assertion `assert(afence->seq_no <= *user_fence_cpu)` in
`amdgpu_fence_wait` can trigger a Mesa exit during GPU mode2 resets in
virtualized guest environments.

A GPU reset can cause the hardware to discard commands, including the
one that updates the user fence BO (`*user_fence_cpu`). This leaves
`*user_fence_cpu` with an older value, while `afence->seq_no` (from
command submission) is newer, leading to
`afence->seq_no > *user_fence_cpu` and triggering the assert.

Removing this assert prevents Mesa from exiting in this reset scenario.
No adverse side effects observed during testing. The assert appears
overly strict for hardware reset events where command completion is not
guaranteed.

Signed-off-by: Wei Zhao <wei.zhao@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34924>
This commit is contained in:
Wei Zhao
2025-05-12 09:12:28 +00:00
committed by Marge Bot
parent c2b6600ae8
commit 9a21ac2730
@@ -212,10 +212,6 @@ bool amdgpu_fence_wait(struct pipe_fence_handle *fence, uint64_t timeout,
abs_timeout, 0, NULL))
return false;
/* Check that guest-side syncobj agrees with the user fence. */
if (user_fence_cpu && afence->aws->info.is_virtio)
assert(afence->seq_no <= *user_fence_cpu);
afence->signalled = true;
return true;
}