diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-03-09 08:27:02 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-03-09 08:37:02 +0000 |
commit | 049ce4397ddf7fd088ce364cbb53cacf5133176f (patch) | |
tree | 18ba8567e79a818d85af8676179dce5e178cacab /src/intel_driver.c | |
parent | 0bb1a5f19e09dc553761ddd90bf6319eab94a597 (diff) |
Give each user of tiling separate xorg.conf options
So that you can indeed allocate a linear framebuffer if you so desire
without breaking mesa.
Adds:
Section "Driver"
Option "LinearFramebuffer" "False|True" # default false
EndSection
to xorg.conf
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/intel_driver.c')
-rw-r--r-- | src/intel_driver.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/intel_driver.c b/src/intel_driver.c index ebed2582..6b610b85 100644 --- a/src/intel_driver.c +++ b/src/intel_driver.c @@ -89,7 +89,8 @@ typedef enum { OPTION_VIDEO_KEY, OPTION_COLOR_KEY, OPTION_FALLBACKDEBUG, - OPTION_TILING, + OPTION_TILING_FB, + OPTION_TILING_2D, OPTION_SHADOW, OPTION_SWAPBUFFERS_WAIT, #ifdef INTEL_XVMC @@ -108,7 +109,8 @@ static OptionInfoRec I830Options[] = { {OPTION_COLOR_KEY, "ColorKey", OPTV_INTEGER, {0}, FALSE}, {OPTION_VIDEO_KEY, "VideoKey", OPTV_INTEGER, {0}, FALSE}, {OPTION_FALLBACKDEBUG, "FallbackDebug", OPTV_BOOLEAN, {0}, FALSE}, - {OPTION_TILING, "Tiling", OPTV_BOOLEAN, {0}, TRUE}, + {OPTION_TILING_2D, "Tiling", OPTV_BOOLEAN, {0}, TRUE}, + {OPTION_TILING_FB, "LinearFramebuffer", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_SHADOW, "Shadow", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_SWAPBUFFERS_WAIT, "SwapbuffersWait", OPTV_BOOLEAN, {0}, TRUE}, #ifdef INTEL_XVMC @@ -586,12 +588,13 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags) drmCommandNone(intel->drmSubFD, DRM_I915_GEM_THROTTLE) != 0; /* Enable tiling by default */ - intel->tiling = TRUE; + intel->tiling = INTEL_TILING_ALL; /* Allow user override if they set a value */ - if (!ALWAYS_TILING(intel)) - intel->tiling = xf86ReturnOptValBool(intel->Options, - OPTION_TILING, TRUE); + if (!xf86ReturnOptValBool(intel->Options, OPTION_TILING_2D, TRUE)) + intel->tiling &= ~INTEL_TILING_2D; + if (xf86ReturnOptValBool(intel->Options, OPTION_TILING_FB, FALSE)) + intel->tiling &= ~INTEL_TILING_FB; intel->can_blt = can_accelerate_blt(intel); intel->use_shadow = !intel->can_blt; @@ -616,8 +619,12 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags) if (IS_GEN6(intel)) intel->swapbuffers_wait = FALSE; - xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "Tiling %sabled\n", - intel->tiling ? "en" : "dis"); + xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "Framebuffer %s\n", + intel->tiling & INTEL_TILING_FB ? "tiled" : "linear"); + xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "Pixmaps %s\n", + intel->tiling & INTEL_TILING_2D ? "tiled" : "linear"); + xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "3D buffers %s\n", + intel->tiling & INTEL_TILING_3D ? "tiled" : "linear"); xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "SwapBuffers wait %sabled\n", intel->swapbuffers_wait ? "en" : "dis"); |