]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/execlists: Remove incorrect BUG_ON for schedule-out
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 7 Sep 2019 10:50:46 +0000 (11:50 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 7 Oct 2019 17:44:46 +0000 (10:44 -0700)
commit85d456e7fc173b6591a8a345cb967a2c49548899
treeedf59f85de46b9caa8080be7e0a9f772af83c291
parent52b7759f73b03afc7cba59d3686ec69261291235
drm/i915/execlists: Remove incorrect BUG_ON for schedule-out

As we may unwind incomplete requests (for preemption) prior to
processing the CSB and the schedule-out events, we may update rq->engine
(resetting it to point back to the parent virtual engine) prior to
calling execlists_schedule_out(), invalidating the assertion that the
request still points to the inflight engine. (The likelihood of this is
increased if the CSB interrupt processing is pushed to the ksoftirqd for
being too slow and direct submission overtakes it.)

Tvrtko summarised it as:
"So unwind from direct submission resets rq->engine and races with
process_csb from the tasklet which notices request has actually
completed."

Reported-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Fixes: 4a24537b5914 ("drm/i915/execlists: Lift process_csb() out of the irq-off spinlock")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190907105046.19934-1-chris@chris-wilson.co.uk
(cherry picked from commit d810583fc2fcf139cc766eb2303500b2d9cf064d)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/gt/intel_lrc.c