]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gtt: Lazily allocate page directories for gen7
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 14 Jun 2018 13:43:14 +0000 (14:43 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 14 Jun 2018 18:20:33 +0000 (19:20 +0100)
commit8ea16f272f58617703b6cff4401a5fba6352ce5c
treef30b75b076ae323652dcec2d9bfb0352984af69f
parentfe0883f9a38d0d21a2203b4c8499e0bc28a0404c
drm/i915/gtt: Lazily allocate page directories for gen7

As we were only supporting aliasing_ppgtt on gen7 for some time, we
saved a few checks by preallocating the page directories on creation.
However, since we need 2MiB of page directories for each ppgtt, to
support arbitrary numbers of user contexts, we need to be more prudent
in our allocations, and defer the page allocation until it is used. We
don't recover unused pages yet as we found that doing so on the fly
(i.e. altering TLB entries) would confuse the GPU.

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>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180614134315.5900-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_gtt.c