radv/amdgpu: Handle -ENODATA and -ETIME from cs_submit

This can be sent in the event of a soft/hard recovery.

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
This commit is contained in:
Joshua Ashton
2024-01-15 20:29:44 +00:00
committed by Marge Bot
parent 7a0b343495
commit c58cff3ce4

View File

@@ -1767,7 +1767,16 @@ radv_amdgpu_cs_submit(struct radv_amdgpu_ctx *ctx, struct radv_amdgpu_cs_request
fprintf(stderr, "radv/amdgpu: Not enough memory for command submission.\n");
result = VK_ERROR_OUT_OF_HOST_MEMORY;
} else if (r == -ECANCELED) {
fprintf(stderr, "radv/amdgpu: The CS has been cancelled because the context is lost.\n");
fprintf(stderr,
"radv/amdgpu: The CS has been cancelled because the context is lost. This context is innocent.\n");
result = VK_ERROR_DEVICE_LOST;
} else if (r == -ENODATA) {
fprintf(stderr, "radv/amdgpu: The CS has been cancelled because the context is lost. This context is guilty "
"of a soft recovery.\n");
result = VK_ERROR_DEVICE_LOST;
} else if (r == -ETIME) {
fprintf(stderr, "radv/amdgpu: The CS has been cancelled because the context is lost. This context is guilty "
"of a hard recovery.\n");
result = VK_ERROR_DEVICE_LOST;
} else {
fprintf(stderr,