]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Flush pending GTT writes before unbinding
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 4 Dec 2017 13:25:13 +0000 (13:25 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 5 Dec 2017 21:50:56 +0000 (21:50 +0000)
commitb1133fc40841b2fe2b976e606da4cf33f23b6e9f
treecfe7f87e98e8480a83fef0ba26549b01a8543fb9
parent0f536fcdedb18b4f47b7fc178e799089405f8ab6
drm/i915: Flush pending GTT writes before unbinding

From the shrinker paths, we want to relinquish the GPU and GGTT access to
the object, releasing the backing storage back to the system for
swapout. As a part of that process we would unpin the pages, marking
them for access by the CPU (for the swapout/swapin). However, if that
process was interrupted after unbind the vma, we missed a flush of the
inflight GGTT writes before we made that GTT space available again for
reuse, with the prospect that we would redirect them to another page.

The bug dates back to the introduction of multiple GGTT vma, but the
code itself dates to commit 7f804619ac85 ("drm/i915: Unbind closed vma
for i915_gem_object_unbind()").

Fixes: 7f804619ac85 ("drm/i915: Unbind closed vma for i915_gem_object_unbind()")
Fixes: 0ec86f5a64d9 ("drm/i915: Use partial view in mmap fault handler")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171204132513.7303-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c