]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Apply batch location restrictions before pinning
authorChris Wilson <chris@chris-wilson.co.uk>
Sun, 10 Jun 2018 19:43:09 +0000 (20:43 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 11 Jun 2018 10:00:26 +0000 (11:00 +0100)
commit49aed015a971bbc24f23884e613bb8a8aff1827e
tree44419d31a7f778a7daf5e8200182f1d591a86a21
parentcc6fb0e7a71326277162a61c8cd6e87f85bee7f8
drm/i915: Apply batch location restrictions before pinning

We special case the position of the batch within the GTT to prevent
negative self-relocation deltas from underflowing. However, that
restriction is being applied after a trial pin of the batch in its
current position. Thus we are not rejecting an invalid location if the
batch has been used before, leading to an assertion if we happen to need
to rearrange the entire payload. In the worst case, this may cause a GPU
hang on gen7 or perhaps missing state.

References: https://bugs.freedesktop.org/show_bug.cgi?id=105720
Fixes: a3260046f7bb ("drm/i915: Eliminate lots of iterations over the execobjects array")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Martin Peres <martin.peres@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180610194325.13467-2-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/i915_gem_execbuffer.c