summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-12-13 11:30:05 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-12-13 11:30:05 +0000
commit5d5b2b8ee203ae2274fc7d13ed38d2945facca9e (patch)
tree78fdd519272d448db536964ae2e76a7149c04967
parent1128825efb3179a5a5d951fa24db6b769ee41219 (diff)
uxa: Cap the maximum number of VMA cached
Since we can not keep an unlimited number of vma cached due to the hard per-process limits on the number of mappings and recreating mappings is slow due to excruciatingly slow GTT pagefaults, we need to compromise and keep a small MRU cache of inactive mmaps. This uses the new API in libdrm-2.4.29 to specify the limit upon the VMA cache maintained by libdrm. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--configure.ac2
-rw-r--r--src/intel_driver.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 4efb65d8..da5fd775 100644
--- a/configure.ac
+++ b/configure.ac
@@ -187,7 +187,7 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
# Obtain compiler/linker options for the driver dependencies
PKG_CHECK_MODULES(XORG, [xorg-server >= $required_xorg_xserver_version xproto fontsproto pixman-1 >= $required_pixman_version $REQUIRED_MODULES])
-PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.28])
+PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.29])
PKG_CHECK_MODULES(DRI, [xf86driproto], , DRI=no)
PKG_CHECK_MODULES(DRI2, [dri2proto >= 2.6],, DRI2=no)
PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
diff --git a/src/intel_driver.c b/src/intel_driver.c
index 066aa5f2..9094fd16 100644
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -413,6 +413,7 @@ static int intel_init_bufmgr(intel_screen_private *intel)
return FALSE;
drm_intel_bufmgr_gem_enable_reuse(intel->bufmgr);
+ drm_intel_bufmgr_gem_set_vma_cache_size(intel->bufmgr, 512);
drm_intel_bufmgr_gem_enable_fenced_relocs(intel->bufmgr);
list_init(&intel->batch_pixmaps);