OSDN Git Service

drm/i915: Always sanity check engine state upon idling
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 26 Aug 2017 11:09:33 +0000 (12:09 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 29 Aug 2017 15:56:04 +0000 (16:56 +0100)
commitcad9946c2a4375386062131858881cfd30fc1b8f
treef47224653d7dabb060a825046d9c756bc3099080
parent3dbf26ed7b9b40a8cb008ab9ad25703363af815d
drm/i915: Always sanity check engine state upon idling

When we do a locked idle we know that afterwards all requests have been
completed and the engines have been cleared of tasks. For whatever
reason, this doesn't always happen and we may go into a suspend with
ELSP still full, and this causes an issue upon resume as we get very,
very confused.

If the engines refuse to idle, mark the device as wedged. In the process
we get rid of the maybe unused open-coded version of wait_for_engines
reported by Nick Desaulniers and Matthias Kaehlcke.

v2: Suppress the -EIO before suspend, but keep it for seqno wrap.

References: https://bugs.freedesktop.org/show_bug.cgi?id=101891
References: https://bugs.freedesktop.org/show_bug.cgi?id=102456
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Matthias Kaehlcke <mka@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170826110935.10237-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
drivers/gpu/drm/i915/i915_gem.c