[PATCH 3/3] drm/i915: Priority boost switching to an idle ring

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_gem_request.h | 5 +++--
 drivers/gpu/drm/i915/intel_lrc.c        | 3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_request.h b/drivers/gpu/drm/i915/i915_gem_request.h
index ba83c507613b..7ba9cc53abe9 100644
--- a/drivers/gpu/drm/i915/i915_gem_request.h
+++ b/drivers/gpu/drm/i915/i915_gem_request.h
@@ -74,8 +74,9 @@ struct i915_priotree {
 };
 
 enum {
-	I915_PRIORITY_LOCKED = I915_PRIORITY_MAX,
-	I915_PRIORITY_DISPLAY
+	I915_PRIORITY_STALL = I915_PRIORITY_MAX,
+	I915_PRIORITY_LOCKED,
+	I915_PRIORITY_DISPLAY,
 };
 
 struct i915_gem_capture_list {
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 50bec759989f..b46cb1bb32b8 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -691,6 +691,9 @@ static void execlists_schedule(struct drm_i915_gem_request *request, int prio)
 	struct i915_dependency stack;
 	LIST_HEAD(dfs);
 
+	if (execlists_elsp_ready(request->engine))
+		prio = max(prio, I915_PRIORITY_STALL);
+
 	if (prio <= READ_ONCE(request->priotree.priority))
 		return;
 
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux