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>
(cherry picked from commit a6a449837b)
This commit is contained in:
Jason Ekstrand 2021-08-19 10:51:17 -05:00 committed by Dylan Baker
parent f2b61f3538
commit e64eeb5240
2 changed files with 10 additions and 1 deletions

View file

@ -1282,7 +1282,7 @@
"description": "anv: Set CONTEXT_PARAM_RECOVERABLE to false",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -3203,6 +3203,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 =