From 90829643d08dd1bef06bb9c27d8a8d8abaf935a1 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 9 Mar 2011 08:27:02 +0000 Subject: 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 (cherry picked from commit 049ce4397ddf7fd088ce364cbb53cacf5133176f) Conflicts: man/intel.man src/intel_driver.c src/intel_driver.h --- src/intel_driver.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/intel_driver.c') diff --git a/src/intel_driver.c b/src/intel_driver.c index 7ca802a5..15437023 100644 --- a/src/intel_driver.c +++ b/src/intel_driver.c @@ -104,7 +104,8 @@ typedef enum { OPTION_FALLBACKDEBUG, OPTION_LVDS24BITMODE, OPTION_FBC, - OPTION_TILING, + OPTION_TILING_FB, + OPTION_TILING_2D, OPTION_SHADOW, OPTION_SWAPBUFFERS_WAIT, OPTION_LVDSFIXEDMODE, @@ -127,7 +128,8 @@ static OptionInfoRec I830Options[] = { {OPTION_FALLBACKDEBUG, "FallbackDebug", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_LVDS24BITMODE, "LVDS24Bit", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_FBC, "FramebufferCompression", OPTV_BOOLEAN, {0}, TRUE}, - {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}, {OPTION_LVDSFIXEDMODE, "LVDSFixedMode", OPTV_BOOLEAN, {0}, FALSE}, @@ -2254,16 +2256,13 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv) intel->use_shadow = !intel->can_blt; /* Enable tiling by default */ - intel->tiling = TRUE; + intel->tiling = INTEL_TILING_ALL; /* Allow user override if they set a value */ - /* Allow user override if they set a value */ - if (!ALWAYS_TILING(intel) && xf86IsOptionSet(intel->Options, OPTION_TILING)) { - if (xf86ReturnOptValBool(intel->Options, OPTION_TILING, FALSE)) - intel->tiling = TRUE; - else - intel->tiling = FALSE; - } + 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; if (xf86IsOptionSet(intel->Options, OPTION_SHADOW)) { if (xf86ReturnOptValBool(intel->Options, OPTION_SHADOW, FALSE)) @@ -2288,8 +2287,12 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv) 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"); -- cgit v1.2.3