]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitfafe7d5cd44fe590cf0ee3c4f893d3b5ad74ba16
treef79e6e2ebf06caff04816e9fe3e1004756ee1773
parent0d28dc0ee5b29d6c3da1c92c49dc2debe5deb9f6
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