mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 04:30:10 +01:00
winsys/amdgpu: Hook up guilt to amdgpu_ctx_set_sw_reset_status
Certain return values have certain meanings indicating context loss and guilt. Hook those up here. Signed-off-by: Joshua Ashton <joshua@froggi.es> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27097>
This commit is contained in:
parent
024f144165
commit
cf24d15503
1 changed files with 16 additions and 3 deletions
|
|
@ -1618,9 +1618,22 @@ static void amdgpu_cs_submit_ib(void *job, void *gdata, int thread_index)
|
|||
|
||||
cleanup:
|
||||
if (unlikely(r)) {
|
||||
amdgpu_ctx_set_sw_reset_status((struct radeon_winsys_ctx*)acs->ctx,
|
||||
PIPE_GUILTY_CONTEXT_RESET,
|
||||
"amdgpu: The CS has been rejected (%i).\n", r);
|
||||
if (r == -ECANCELED) {
|
||||
amdgpu_ctx_set_sw_reset_status((struct radeon_winsys_ctx*)acs->ctx, PIPE_INNOCENT_CONTEXT_RESET,
|
||||
"amdgpu: The CS has cancelled because the context is lost. This context is innocent.\n");
|
||||
} else if (r == -ENODATA) {
|
||||
amdgpu_ctx_set_sw_reset_status((struct radeon_winsys_ctx*)acs->ctx, PIPE_GUILTY_CONTEXT_RESET,
|
||||
"amdgpu: The CS has cancelled because the context is lost. This context is guilty of a soft recovery.\n");
|
||||
} else if (r == -ETIME) {
|
||||
amdgpu_ctx_set_sw_reset_status((struct radeon_winsys_ctx*)acs->ctx, PIPE_GUILTY_CONTEXT_RESET,
|
||||
"amdgpu: The CS has cancelled because the context is lost. This context is guilty of a hard recovery.\n");
|
||||
} else {
|
||||
amdgpu_ctx_set_sw_reset_status((struct radeon_winsys_ctx*)acs->ctx,
|
||||
PIPE_UNKNOWN_CONTEXT_RESET,
|
||||
"amdgpu: The CS has been rejected, "
|
||||
"see dmesg for more information (%i).\n",
|
||||
r);
|
||||
}
|
||||
}
|
||||
|
||||
/* If there was an error, signal the fence, because it won't be signalled
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue