Mesa (staging/21.2): anv: Set CONTEXT_PARAM_RECOVERABLE to false
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Aug 23 17:44:10 UTC 2021
Module: Mesa
Branch: staging/21.2
Commit: e694d53ccc9e51c9be245816d872225dda269643
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e694d53ccc9e51c9be245816d872225dda269643
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Thu Aug 19 10:51:17 2021 -0500
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 at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Cc: mesa-stable at lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12476>
(cherry picked from commit a6a449837b1753a70894a6d532262df2ec0de873)
---
.pick_status.json | 2 +-
src/intel/vulkan/anv_device.c | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index 0d161055312..b420d4fb839 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -805,7 +805,7 @@
"description": "anv: Set CONTEXT_PARAM_RECOVERABLE to false",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 583a9d8f7c0..83ea7bd2560 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -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 =
More information about the mesa-commit
mailing list