From a6a449837b1753a70894a6d532262df2ec0de873 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 19 Aug 2021 10:51:17 -0500 Subject: [PATCH] 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 Reviewed-by: Kenneth Graunke Cc: mesa-stable@lists.freedesktop.org Part-of: --- src/intel/vulkan/anv_device.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index ef02557c4f1..3eb71eeb095 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -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 =