]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Assign I915_COLOR_UNEVICTABLE to the address space head_node
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 6 Feb 2017 08:45:46 +0000 (08:45 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 6 Feb 2017 13:46:23 +0000 (13:46 +0000)
commit378525a42d4fc43141d02ff03ed4a5bbaed411d8
tree4b8dd24698a968dd6311221c84634d0876d64751
parentc44d5e8f7aba1a1e3a2a81aa460cfc2d71fe93ac
drm/i915: Assign I915_COLOR_UNEVICTABLE to the address space head_node

The drm_mm range manager (within i915_address_space) uses a special
drm_mm_node that excludes the unavailable range (beyond the end of the
drm_mm). However, we play games with the global GTT to use the head_node
to exclude the tail page but tell ourselves that the whole range is
available. This causes an issue when we try to evict using the full
range of the global GTT which is wider than the drm_mm, resulting in
complete confusion and catastrophe. One way to resolve this would be to
use a reserved node to exclude the guard page, or we can treat the
drm_mm's head_node as our guard page and assign it the appropriate
colour.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170206084547.27921-2-chris@chris-wilson.co.uk
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
drivers/gpu/drm/i915/i915_gem_gtt.c