[3/4] drm/i915/execlists: Tweak priority hint to use last port if set
diff mbox series

Message ID 20191205145238.635670-3-chris@chris-wilson.co.uk
State New
Headers show
Series
  • [1/4] drm/i915/selftests: Disable heartbeats around long queues
Related show

Commit Message

Chris Wilson Dec. 5, 2019, 2:52 p.m. UTC
We use the priority hint to decide if it is worth resubmitting in order
to replace the currently contexts with new requests. If we have left a
port open, the hint should be taken from the top of the queue (as that
is the highest priority request that should be sent next but for
whatever reason could not be). However, if we have filled the second
submission port, that represents the lowest priority of the currently
executing requests and we do not need to kick the submission tasklet
unless we have something that is of higher priority.  This just removes a
few useless kicks and queuing of the submission tasklet.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/intel_lrc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 3ab2b7e18351..c48901fd17e9 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -1983,10 +1983,8 @@  static void execlists_dequeue(struct intel_engine_cs *engine)
 	 * request triggering preemption on the next dequeue (or subsequent
 	 * interrupt for secondary ports).
 	 */
-	execlists->queue_priority_hint = queue_prio(execlists);
-	GEM_TRACE("%s: queue_priority_hint:%d, submit:%s\n",
-		  engine->name, execlists->queue_priority_hint,
-		  yesno(submit));
+	execlists->queue_priority_hint =
+		port == last_port ? rq_prio(last) : queue_prio(execlists);
 
 	if (submit) {
 		*port = execlists_schedule_in(last, port - execlists->pending);