History

drm/i915: Allow userspace to specify ringsize on construction

No good reason why we must always use a static ringsize, so let userspace select one during construction.

Chris Wilson committed 6 years ago

Commit 88be76c1 parent d13a3176 files · +202 −8Browse files

Showing the changes to include/uapi (1 of 6 files). Show all

Unified · Split

include/uapi/drm/i915_drm.h+21−0
@@ -1619,6 +1619,27 @@ struct drm_i915_gem_context_param { · 1618 unmodified lines
1619 * By default, new contexts allow persistence.1619 * By default, new contexts allow persistence.
1620 */1620 */
1621#define I915_CONTEXT_PARAM_PERSISTENCE 0xb1621#define I915_CONTEXT_PARAM_PERSISTENCE 0xb
1622
1623/*
1624 * I915_CONTEXT_PARAM_RINGSIZE:
1625 *
1626 * Sets the size of the CS ringbuffer to use for logical ring contexts. This
1627 * applies a limit of how many batches can be queued to HW before the caller
1628 * is blocked due to lack of space for more commands.
1629 *
1630 * Only reliably possible to be set prior to first use, i.e. during
1631 * construction. At any later point, the current execution must be flushed as
1632 * the ring can only be changed while the context is idle. Note, the ringsize
1633 * can be specified as a constructor property, see
1634 * I915_CONTEXT_CREATE_EXT_SETPARAM, but can also be set later if required.
1635 *
1636 * Only applies to the current set of engine and lost when those engines
1637 * are replaced by a new mapping (see I915_CONTEXT_PARAM_ENGINES).
1638 *
1639 * Must be between 4 - 512 KiB, in intervals of page size [4 KiB].
1640 * Default is 16 KiB.
1641 */
1642#define I915_CONTEXT_PARAM_RINGSIZE 0xc
1622/* Must be kept compact -- no holes and well documented */1643/* Must be kept compact -- no holes and well documented */
1623 1644
1624 __u64 value;1645 __u64 value;