drm/i915: Reacquire priolist cache after dropping the engine lock

Submitted by Chris Wilson on Feb. 11, 2019, 3:45 p.m.

Details

Message ID 20190211154530.17627-1-chris@chris-wilson.co.uk
State New
Headers show

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/i915_scheduler.c b/drivers/gpu/drm/i915/i915_scheduler.c
index d01683167c77..177505b9c509 100644
--- a/drivers/gpu/drm/i915/i915_scheduler.c
+++ b/drivers/gpu/drm/i915/i915_scheduler.c
@@ -340,6 +340,8 @@  static void __i915_schedule(struct i915_request *rq,
 
 		engine = sched_lock_engine(node, engine);
 		lockdep_assert_held(&engine->timeline.lock);
+		if (last != engine) /* if we drop the lock, refetch priolist */
+			last = NULL;
 
 		/* Recheck after acquiring the engine->timeline.lock */
 		if (prio <= node->attr.priority || node_signaled(node))