Skip to content

Commit 2b24408

Browse files
icklejnikula
authored andcommitted
drm/i915/execlists: Mark up priority boost on preemption
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 <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190123135155.21562-1-chris@chris-wilson.co.uk (cherry picked from commit 6e062b6) Signed-off-by: Jani Nikula <jani.nikula@intel.com>
1 parent 49a5785 commit 2b24408

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpu/drm/i915/intel_lrc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ static void __unwind_incomplete_requests(struct intel_engine_cs *engine)
303303
*/
304304
if (!(prio & I915_PRIORITY_NEWCLIENT)) {
305305
prio |= I915_PRIORITY_NEWCLIENT;
306+
active->sched.attr.priority = prio;
306307
list_move_tail(&active->sched.link,
307308
i915_sched_lookup_priolist(engine, prio));
308309
}
@@ -645,6 +646,9 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
645646
int i;
646647

647648
priolist_for_each_request_consume(rq, rn, p, i) {
649+
GEM_BUG_ON(last &&
650+
need_preempt(engine, last, rq_prio(rq)));
651+
648652
/*
649653
* Can we combine this request with the current port?
650654
* It has to be the same context/ringbuffer and not

0 commit comments

Comments
 (0)