Skip to content

Commit

Permalink
drm/i915/execlists: Mark up priority boost on preemption
Browse files Browse the repository at this point in the history
Record the priority boost we giving to the preempted client or else we
may end up in a situation where the priority queue no longer matches the
request priority order and so we can end up in an infinite loop of
preempting the same pair of requests.

Fixes: e9eaf82 ("drm/i915: Priority boost for waiting clients")
Signed-off-by: Chris Wilson <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Reviewed-by: Tvrtko Ursulin <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 6e062b6)
Signed-off-by: Jani Nikula <[email protected]>
  • Loading branch information
ickle authored and jnikula committed Jan 24, 2019
1 parent 49a5785 commit 2b24408
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/i915/intel_lrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ static void __unwind_incomplete_requests(struct intel_engine_cs *engine)
*/
if (!(prio & I915_PRIORITY_NEWCLIENT)) {
prio |= I915_PRIORITY_NEWCLIENT;
active->sched.attr.priority = prio;
list_move_tail(&active->sched.link,
i915_sched_lookup_priolist(engine, prio));
}
Expand Down Expand Up @@ -645,6 +646,9 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
int i;

priolist_for_each_request_consume(rq, rn, p, i) {
GEM_BUG_ON(last &&
need_preempt(engine, last, rq_prio(rq)));

/*
* Can we combine this request with the current port?
* It has to be the same context/ringbuffer and not
Expand Down

0 comments on commit 2b24408

Please sign in to comment.