summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-24 11:14:26 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-24 11:19:58 +0000
commit5b5cd6780ef7cae8f49d71d7c8532597291402d8 (patch)
treef8b5289469e450c3ae8d96a99d3df2fdea4f796f
parentf8ca50818cd4f82e0ad8eeb245e8ee838b083056 (diff)
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 <chris@chris-wilson.co.uk>
-rw-r--r--src/intel_driver.c5
1 files changed, 4 insertions, 1 deletions
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);