drm/i915/gt: Restore ce->signal flush before releasing virtual engine
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 8 Jan 2021 20:40:23 +0000 (20:40 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 8 Jan 2021 21:35:55 +0000 (21:35 +0000)
commit2b2985a417c7ca1752a4f0b2631cf916dabd43b5
tree269ede6dfce43edec4f7e3144341c6380fd3eab8
parent0399d0e33a649a77c81a8bd2b2c5831608a489b6
drm/i915/gt: Restore ce->signal flush before releasing virtual engine

Before we mark the virtual engine as no longer inflight, flush any
ongoing signaling that may be using the ce->signal_link along the
previous breadcrumbs. On switch to a new physical engine, that link will
be inserted into the new set of breadcrumbs, causing confusion to an
ongoing iterator.

This patch undoes a last minute mistake introduced into commit
bab0557c8dca ("drm/i915/gt: Remove virtual breadcrumb before transfer"),
whereby instead of unconditionally applying the flush, it was only
applied if the request itself was going to be reused.

v2: Generalise and cancel all remaining ce->signals

Fixes: bab0557c8dca ("drm/i915/gt: Remove virtual breadcrumb before transfer")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210108204026.20682-4-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
drivers/gpu/drm/i915/gt/intel_breadcrumbs.h
drivers/gpu/drm/i915/gt/intel_execlists_submission.c