aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_gtt.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-06-14 14:43:15 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2018-06-14 19:20:33 +0100
commit4a192c7e8b14a2bf8f30b1fac3599a7d391dfcf9 (patch)
treeedd6b70d40df46eaddb1763090ae88a89cbc0fdc /drivers/gpu/drm/i915/i915_gem_gtt.h
parentdrm/i915/gtt: Lazily allocate page directories for gen7 (diff)
downloadlinux-dev-4a192c7e8b14a2bf8f30b1fac3599a7d391dfcf9.tar.xz
linux-dev-4a192c7e8b14a2bf8f30b1fac3599a7d391dfcf9.zip
drm/i915/gtt: Free unused page tables on unbind the context
As we cannot reliably change used page tables while the context is active, the earliest opportunity we have to recover excess pages is when the context becomes idle. So whenever we unbind the context (it must be idle, and indeed being evicted) free the unused ptes. 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-2-chris@chris-wilson.co.uk
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
index d7b7b4afe060..46c95d188580 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.h
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
@@ -414,6 +414,7 @@ struct gen6_hw_ppgtt {
gen6_pte_t __iomem *pd_addr;
unsigned int pin_count;
+ bool scan_for_unused_pt;
};
#define __to_gen6_ppgtt(base) container_of(base, struct gen6_hw_ppgtt, base)