Commit 5945d8b9 authored by Chris Wilson's avatar Chris Wilson Committed by Andi Shyti
Browse files

drm/i915/gem: Use large rings for compute contexts



Allow compute contexts to submit the maximal amount of work without
blocking userspace.

The original size for user LRC ring's (SZ_16K) was chosen to minimise
memory consumption, without being so small as to frequently stall in the
middle of workloads. With the main consumers being GL / media pipelines
of 2 or 3 batches per frame, we want to support ~10 requests in flight
to allow for the application to control throttling without stalling
within a frame.

v2:
  - cover with else part

Signed-off-by: default avatarChris Wilson <chris.p.wilson@intel.com>
Signed-off-by: default avatarTejas Upadhyay <tejas.upadhyay@intel.com>
Reviewed-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230517135754.1110291-1-tejas.upadhyay@intel.com
parent 08264f85
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -964,6 +964,10 @@ static int intel_context_set_gem(struct intel_context *ce,
	RCU_INIT_POINTER(ce->gem_context, ctx);

	GEM_BUG_ON(intel_context_is_pinned(ce));

	if (ce->engine->class == COMPUTE_CLASS)
		ce->ring_size = SZ_512K;
	else
		ce->ring_size = SZ_16K;

	i915_vm_put(ce->vm);