public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] drm-uapi: Update i915_drm.h for I915_CONTEXT_PARAM_RECOVERABLE
@ 2019-02-18 11:57 Chris Wilson
  2019-02-18 11:57 ` [igt-dev] [PATCH i-g-t 2/2] igt/gem_ctx_exec: Exercise I915_CONTEXT_PARAM_RECOVERABLE Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chris Wilson @ 2019-02-18 11:57 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

Copying i915_drm.h from

commit ba4fda620a5f7db521aa9e0262cf49854c1b1d9c (HEAD -> drm-intel-next-queued, drm-intel/drm-intel-next-queued)
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Feb 18 10:58:21 2019 +0000

    drm/i915: Optionally disable automatic recovery after a GPU reset

in order to expose the I915_CONTEXT_PARAM_RECOVERABLE for testing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 include/drm-uapi/i915_drm.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/include/drm-uapi/i915_drm.h b/include/drm-uapi/i915_drm.h
index d2792ab36..43fb8ede2 100644
--- a/include/drm-uapi/i915_drm.h
+++ b/include/drm-uapi/i915_drm.h
@@ -1491,6 +1491,26 @@ struct drm_i915_gem_context_param {
 	 * drm_i915_gem_context_param_sseu.
 	 */
 #define I915_CONTEXT_PARAM_SSEU		0x7
+
+/*
+ * Not all clients may want to attempt automatic recover of a context after
+ * a hang (for example, some clients may only submit very small incremental
+ * batches relying on known logical state of previous batches which will never
+ * recover correctly and each attempt will hang), and so would prefer that
+ * the context is forever banned instead.
+ *
+ * If set to false (0), after a reset, subsequent (and in flight) rendering
+ * from this context is discarded, and the client will need to create a new
+ * context to use instead.
+ *
+ * If set to true (1), the kernel will automatically attempt to recover the
+ * context by skipping the hanging batch and executing the next batch starting
+ * from the default context state (discarding the incomplete logical context
+ * state lost due to the reset).
+ *
+ * On creation, all new contexts are marked as recoverable.
+ */
+#define I915_CONTEXT_PARAM_RECOVERABLE	0x8
 	__u64 value;
 };
 
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-02-18 16:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-18 11:57 [igt-dev] [PATCH i-g-t 1/2] drm-uapi: Update i915_drm.h for I915_CONTEXT_PARAM_RECOVERABLE Chris Wilson
2019-02-18 11:57 ` [igt-dev] [PATCH i-g-t 2/2] igt/gem_ctx_exec: Exercise I915_CONTEXT_PARAM_RECOVERABLE Chris Wilson
2019-02-18 12:49   ` [igt-dev] [Intel-gfx] " Mika Kuoppala
2019-02-18 12:56     ` Chris Wilson
2019-02-18 12:50 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] drm-uapi: Update i915_drm.h for I915_CONTEXT_PARAM_RECOVERABLE Patchwork
2019-02-18 16:07 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox