From 5b5cd6780ef7cae8f49d71d7c8532597291402d8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 24 Feb 2012 11:14:26 +0000 Subject: uxa: Add a option to disable the bo cache If you are suffering from regular X crashes and rendering corruption with a flood of ENOSPC or even EFILE reported in the Xorg.log, try adding this snippet to your xorg.conf: Section "Driver" Option "BufferCache" "False" EndSection References: https://bugs.freedesktop.org/show_bug.cgi?id=39552 Signed-off-by: Chris Wilson --- src/intel_driver.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/intel_driver.c b/src/intel_driver.c index 1837509f..e2e43faa 100644 --- a/src/intel_driver.c +++ b/src/intel_driver.c @@ -105,6 +105,7 @@ typedef enum { OPTION_DEBUG_WAIT, OPTION_HOTPLUG, OPTION_RELAXED_FENCING, + OPTION_BUFFER_CACHE, } I830Opts; static OptionInfoRec I830Options[] = { @@ -126,6 +127,7 @@ static OptionInfoRec I830Options[] = { {OPTION_DEBUG_WAIT, "DebugWait", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_HOTPLUG, "HotPlug", OPTV_BOOLEAN, {0}, TRUE}, {OPTION_RELAXED_FENCING, "RelaxedFencing", OPTV_BOOLEAN, {0}, TRUE}, + {OPTION_BUFFER_CACHE, "BufferCache", OPTV_BOOLEAN, {0}, TRUE}, {-1, NULL, OPTV_NONE, {0}, FALSE} }; /* *INDENT-ON* */ @@ -394,7 +396,8 @@ static int intel_init_bufmgr(intel_screen_private *intel) if (!intel->bufmgr) return FALSE; - drm_intel_bufmgr_gem_enable_reuse(intel->bufmgr); + if (xf86ReturnOptValBool(intel->Options, OPTION_BUFFER_CACHE, TRUE)) + 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); -- cgit v1.2.3