anv: Set CONTEXT_PARAM_RECOVERABLE to false

We want the kernel to ban our context immediately instead of foolhardily
attempting to recover.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12476>
This commit is contained in:
Jason Ekstrand 2021-08-19 10:51:17 -05:00 committed by Marge Bot
parent 4a7714ab7b
commit a6a449837b
1 changed files with 9 additions and 0 deletions

View File

@ -3283,6 +3283,15 @@ VkResult anv_CreateDevice(
goto fail_fd;
}
/* Here we tell the kernel not to attempt to recover our context but
* immediately (on the next batchbuffer submission) report that the
* context is lost, and we will do the recovery ourselves. In the case
* of Vulkan, recovery means throwing VK_ERROR_DEVICE_LOST and letting
* the client clean up the pieces.
*/
anv_gem_set_context_param(device->fd, device->context_id,
I915_CONTEXT_PARAM_RECOVERABLE, false);
device->has_thread_submit = physical_device->has_thread_submit;
device->queues =