]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: don't do allocate_va_range again on PIN_UPDATE
authorMatthew Auld <matthew.auld@intel.com>
Fri, 12 May 2017 09:14:23 +0000 (10:14 +0100)
committerJani Nikula <jani.nikula@intel.com>
Mon, 15 May 2017 11:44:33 +0000 (14:44 +0300)
commit27aec8a725f926a16dac5ce34f5ef361e19de678
treedf469f9fe4c6296eae84d2ec5ed7c85f06f73ab1
parent2a8600c29a6aea603f2012a6289b7de46631bf25
drm/i915: don't do allocate_va_range again on PIN_UPDATE

If a vma is already bound to a ppgtt, we incorrectly call
allocate_va_range again when doing a PIN_UPDATE, which will result in
over accounting within our paging structures, such that when we do
unbind something we don't actually destroy the structures and end up
inadvertently recycling them. In reality this probably isn't too bad,
but once we start touching PDEs and PDPEs for 64K/2M/1G pages this
apparent recycling will manifest into lots of really, really subtle
bugs.

v2: Fix the testing of vma->flags for aliasing_ppgtt_bind_vma

Fixes: d34778320b03 ("drm/i915: Move allocate_va_range to GTT")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170512091423.26085-1-chris@chris-wilson.co.uk
(cherry picked from commit 1f23475c893a85c934143cd64865ebb9b6af383f)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/i915_gem_gtt.c