drm/i915: Show GEM_TRACE when detecting a failed GPU idle
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 9 Mar 2018 10:11:14 +0000 (10:11 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 13 Mar 2018 21:41:09 +0000 (21:41 +0000)
commit629820fcd0ddbb7955a37c075e82756da69ea908
treed773c0c4475652fba92dda331cff532530909e15
parenta8ada068a5025d738c870851d023b80cf6be0c95
drm/i915: Show GEM_TRACE when detecting a failed GPU idle

If we timeout waiting for the GPU to idle, something went seriously
wrong. We currently dump the engine state, but we can also dump the
ftrace buffer showing our last operations (when available).

In passing, note that since commit 559e040f1f08 ("drm/i915: Show the GPU
state when declaring wedged", we now show the engine state twice, once
in detecting the failed idle and then again on declaring wedged.

v2: ftrace_dump() takes a parameter specifying whether to dump all cpu
buffers or the local cpu's.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180309101114.1138-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem.h