drm/i915: Cancel all ready but queued requests when wedging
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 15 Sep 2017 17:31:00 +0000 (18:31 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 18 Sep 2017 09:59:55 +0000 (10:59 +0100)
commit27a5f61b377bb62e4813af57fd91636f91ea5755
tree6e17b8a3540ad9a9b2342753d59dd67b5a9c35c0
parent309bd8ed464fc08f79152e4a18b1da2b11410842
drm/i915: Cancel all ready but queued requests when wedging

When wedging the hw, we want to mark all in-flight requests as -EIO.
This is made slightly more complex by execlists who store the ready but
not yet submitted-to-hw requests on a private queue (an rbtree
priolist). Call into execlists to cancel not only the ELSP tracking for
the submitted requests, but also the queue of unsubmitted requests.

v2: Move the majority of engine_set_wedged to the backends (both legacy
ringbuffer and execlists handling their own lists).

Reported-by: Michał Winiarski <michal.winiarski@intel.com>
Testcase: igt/gem_eio/in-flight-contexts
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170915173100.26470-1-chris@chris-wilson.co.uk
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h