[PATCH 17/17] drm/i915: Priority boost switching to an idle ring
Chris Wilson
chris at chris-wilson.co.uk
Wed Jan 3 09:37:06 UTC 2018
In order to maximise concurrency between engines, if we queue a request
to a current idle ring, reorder its dependencies to execute that request
as early as possible and ideally improve occupancy of multiple engines
simultaneously.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem_request.h | 1 +
drivers/gpu/drm/i915/intel_lrc.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem_request.h b/drivers/gpu/drm/i915/i915_gem_request.h
index be42b9462e65..dfe9a02c0208 100644
--- a/drivers/gpu/drm/i915/i915_gem_request.h
+++ b/drivers/gpu/drm/i915/i915_gem_request.h
@@ -82,6 +82,7 @@ enum {
};
#define I915_PRIORITY_LOCKED BIT(7)
+#define I915_PRIORITY_STALL BIT(0)
struct i915_gem_capture_list {
struct i915_gem_capture_list *next;
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index ffc20d7b754e..90822b0e8342 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -997,6 +997,9 @@ static void execlists_schedule(struct drm_i915_gem_request *request, int prio)
GEM_BUG_ON(prio == I915_PRIORITY_INVALID);
+ if (!READ_ONCE(request->engine->execlists.first))
+ prio |= I915_PRIORITY_STALL;
+
if (prio <= READ_ONCE(request->priotree.priority))
return;
--
2.15.1
More information about the Intel-gfx-trybot
mailing list