Skip to content

Commit

Permalink
drm/i915: Tweak scheduler's kick_submission()
Browse files Browse the repository at this point in the history
Skip useless priority bumping on adding a new dependency by making sure
that we do update the priority if we would have rescheduled the active
cotnext.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200310115947.6482-1-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Mar 10, 2020
1 parent 209df10 commit 6cebcf7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/i915/i915_scheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,15 @@ static void kick_submission(struct intel_engine_cs *engine,
if (!inflight)
goto unlock;

engine->execlists.queue_priority_hint = prio;

/*
* If we are already the currently executing context, don't
* bother evaluating if we should preempt ourselves.
*/
if (inflight->context == rq->context)
goto unlock;

engine->execlists.queue_priority_hint = prio;
if (need_preempt(prio, rq_prio(inflight)))
tasklet_hi_schedule(&engine->execlists.tasklet);

Expand Down

0 comments on commit 6cebcf7

Please sign in to comment.