drm/i915: Rely on spinlock protection for GPU error capture
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 22 Jul 2019 22:28:47 +0000 (23:28 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 22 Jul 2019 23:22:20 +0000 (00:22 +0100)
commit3bdd4f8485310687affe117f1b1a6e9012e897f6
treef79e6e2ebf06caff04816e9fe3e1004756ee1773
parentdf8cf31e749788d8de8c3028e530e6fd9ef8bc79
drm/i915: Rely on spinlock protection for GPU error capture

Trust that we now have adequate protection over the low level structures
via the engine->active.lock to allow ourselves to capture the GPU error
state without the heavy hammer of stop_machine(). Sadly this does mean
that we have to forgo some of the lesser used information (not derived
from the active state) that is not controlled by the active locks. This
includes the list of buffers in the ppGTT and pinned globally in the
GGTT. Originally this was used to manually verify relocations, but
hasn't been required for sometime and modern mesa now has the habit of
ensuring that all interesting buffers within a batch are captured in their
entirety (that are the auxiliary state buffers, but not the textures).

A useful side-effect is that this allows us to restore error capturing
for Braswell and Broxton.

v2: Use pagevec for a typical arbitrary number of preallocated pages

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190722222847.24178-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_gpu_error.c
drivers/gpu/drm/i915/i915_gpu_error.h