st/xorg: Improve options and print them to log

Set 2D acceleration to off by default
Get fallback debugging from the Xorg config
Also print if 3D acceleration is enabled
This commit is contained in:
Jakob Bornecrantz 2010-01-22 18:28:40 +01:00
parent a3b783ea29
commit 0b482c4fbe
2 changed files with 18 additions and 3 deletions

View file

@ -78,11 +78,13 @@ typedef enum
{
OPTION_SW_CURSOR,
OPTION_2D_ACCEL,
OPTION_DEBUG_FALLBACK,
} drv_option_enums;
static const OptionInfoRec drv_options[] = {
{OPTION_SW_CURSOR, "SWcursor", OPTV_BOOLEAN, {0}, FALSE},
{OPTION_2D_ACCEL, "2DAccel", OPTV_BOOLEAN, {0}, FALSE},
{OPTION_DEBUG_FALLBACK, "DebugFallback", OPTV_BOOLEAN, {0}, FALSE},
{-1, NULL, OPTV_NONE, {0}, FALSE}
};
@ -670,10 +672,11 @@ drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
xf86SetBlackWhitePixels(pScreen);
ms->accelerate_2d = xf86ReturnOptValBool(ms->Options, OPTION_2D_ACCEL, FALSE);
ms->debug_fallback = xf86ReturnOptValBool(ms->Options, OPTION_DEBUG_FALLBACK, TRUE);
if (ms->screen) {
ms->exa = xorg_exa_init(pScrn, xf86ReturnOptValBool(ms->Options,
OPTION_2D_ACCEL, TRUE));
ms->debug_fallback = debug_get_bool_option("XORG_DEBUG_FALLBACK", TRUE);
ms->exa = xorg_exa_init(pScrn, ms->accelerate_2d);
xorg_xv_init(pScreen);
#ifdef DRI2
@ -681,6 +684,17 @@ drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
#endif
}
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "2D Acceleration is %s\n",
ms->screen && ms->accelerate_2d ? "enabled" : "disabled");
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Fallback debugging is %s\n",
ms->debug_fallback ? "enabled" : "disabled");
#ifdef DRI2
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "3D Acceleration is %s\n",
ms->screen ? "enabled" : "disabled");
#else
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "3D Acceleration is disabled\n");
#endif
miInitializeBackingStore(pScreen);
xf86SetBackingStore(pScreen);
xf86SetSilkenMouse(pScreen);

View file

@ -112,6 +112,7 @@ typedef struct _modesettingRec
/* exa */
struct exa_context *exa;
Bool noEvict;
Bool accelerate_2d;
Bool debug_fallback;
/* winsys hocks */