summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-10-21 15:42:00 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2020-02-25 19:19:32 +0000
commit68f01edfa6279230b4730babc4463c9b7058b767 (patch)
tree79c21d45e27e8f3ce66d5fb4323a96c330cf78f7 /include
parent412b54f3f2c6fe2f560d7506cf8b8817741786c8 (diff)
i915: Exercise I915_CONTEXT_PARAM_RINGSIZE
I915_CONTEXT_PARAM_RINGSIZE specifies how large to create the command ringbuffer for logical ring contects. This directly affects the number of batches userspace can submit before blocking waiting for space. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/drm-uapi/i915_drm.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/drm-uapi/i915_drm.h b/include/drm-uapi/i915_drm.h
index b94e991b..3794e768 100644
--- a/include/drm-uapi/i915_drm.h
+++ b/include/drm-uapi/i915_drm.h
@@ -1619,6 +1619,27 @@ struct drm_i915_gem_context_param {
* By default, new contexts allow persistence.
*/
#define I915_CONTEXT_PARAM_PERSISTENCE 0xb
+
+/*
+ * I915_CONTEXT_PARAM_RINGSIZE:
+ *
+ * Sets the size of the CS ringbuffer to use for logical ring contexts. This
+ * applies a limit of how many batches can be queued to HW before the caller
+ * is blocked due to lack of space for more commands.
+ *
+ * Only reliably possible to be set prior to first use, i.e. during
+ * construction. At any later point, the current execution must be flushed as
+ * the ring can only be changed while the context is idle. Note, the ringsize
+ * can be specified as a constructor property, see
+ * I915_CONTEXT_CREATE_EXT_SETPARAM, but can also be set later if required.
+ *
+ * Only applies to the current set of engine and lost when those engines
+ * are replaced by a new mapping (see I915_CONTEXT_PARAM_ENGINES).
+ *
+ * Must be between 4 - 512 KiB, in intervals of page size [4 KiB].
+ * Default is 16 KiB.
+ */
+#define I915_CONTEXT_PARAM_RINGSIZE 0xc
/* Must be kept compact -- no holes and well documented */
__u64 value;