drm/i915/gtt: Make gen6 page directories evictable
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 12 Jun 2018 12:04:46 +0000 (13:04 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 12 Jun 2018 17:01:51 +0000 (18:01 +0100)
commite9e7dc4144cd6d4ba873fd506fe38bccb9dbbd85
treefa0d0f9a81614e69ed5a43f53f879c3e012f8e1f
parent3d6d62eae7d75a902f4eacdbb2d775c7c27f3987
drm/i915/gtt: Make gen6 page directories evictable

Currently all page directories are bound at creation using an
unevictable node in the GGTT. This severely limits us as we cannot
remove any inactive ppgtt for new contexts, or under aperture pressure.
To fix this we need to make the page directory into a first class and
unbindable vma. Hence, the creation of a custom vma to wrap the page
directory as opposed to a GEM object.

In this patch, we leave the page directories pinned upon creation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Reviewed-by: Matthew Auld <matthew.william.auld@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180612120446.13901-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_gem_gtt.h
drivers/gpu/drm/i915/i915_vma.h