drm/i915/execlists: Reset CSB pointers on canceling requests (wedging)
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 14 Sep 2018 08:00:17 +0000 (09:00 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 14 Sep 2018 14:21:58 +0000 (15:21 +0100)
commit8db601f09127eb974e6fcf7fb30c70344d5727f6
tree3d6295d7621dd7c56529bfe93223268b5f7dae5f
parent5791bad4bc1f624969c875616d1032227f23c25e
drm/i915/execlists: Reset CSB pointers on canceling requests (wedging)

The prior assumption was that we did not need to reset the CSB on
wedging when cancelling the outstanding requests as it would be cleaned
up in the subsequent reset prior to restarting the GPU. However, what
was not accounted for was that in preparing for the reset, we would try
to process the outstanding CSB entries. If the GPU happened to complete
a CS event just as we were performing the cancellation of requests, that
event would be kept in the CSB until the reset -- but our bookkeeping
was cleared, causing confusion when trying to complete the CS event.

v2: Use a sanitize on unwedge to avoid interfering with eio suspend
(where we intentionally disable GPU reset).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107925
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180914080017.30308-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c