diff options
author | dawes <dawes> | 2001-03-28 18:29:31 +0000 |
---|---|---|
committer | dawes <dawes> | 2001-03-28 18:29:31 +0000 |
commit | 024d1a25cb3355da76983b7015a054a620d15cbb (patch) | |
tree | fdc0266809e86035dfd7d8a10b5c2db262ce73d5 /xc/programs/Xserver/hw/xfree86/drivers/tdfx | |
parent | 8e64ede5f2ce1ded9ed60e162e60f56de11fa089 (diff) |
- mga, tdfx: add a "DRI" option to make it possible to turn DRI on/off per
screen, and to turn it off in a static server.
- mga, tdfx, i810: make the "Direct rendering enabled/disabled" message
the same across these drivers, and print the appropriate "reason" flag
with the message.
Note: other drivers should get these changes too.
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/drivers/tdfx')
-rw-r--r-- | xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c index 55b2ad447..ca31bb47f 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c @@ -172,7 +172,8 @@ typedef enum { OPTION_USE_PIO, OPTION_SHOWCACHE, OPTION_VIDEO_KEY, - OPTION_NO_SLI + OPTION_NO_SLI, + OPTION_DRI } TDFXOpts; static OptionInfoRec TDFXOptions[] = { @@ -182,6 +183,7 @@ static OptionInfoRec TDFXOptions[] = { { OPTION_SHOWCACHE, "ShowCache", OPTV_BOOLEAN, {0}, FALSE}, { OPTION_VIDEO_KEY, "VideoKey", OPTV_INTEGER, {0}, FALSE}, { OPTION_NO_SLI, "NoSLI", OPTV_BOOLEAN, {0}, FALSE}, + { OPTION_DRI, "DRI", OPTV_BOOLEAN, {0}, FALSE}, { -1, NULL, OPTV_NONE, {0}, FALSE} }; @@ -677,6 +679,7 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags) if (xf86LoadSubModule(pScrn, "int10")) { xf86Int10InfoPtr pInt; +#if 0 xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Softbooting the board (through the int10 interface).\n"); pInt = xf86InitInt10(pTDFX->pEnt->index); @@ -691,6 +694,7 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags) "Softbooting the board succeeded.\n"); xf86FreeInt10(pInt); } +#endif } match=pTDFX->PciInfo=xf86GetPciInfoForEntity(pTDFX->pEnt->index); @@ -1768,6 +1772,7 @@ TDFXScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) { TDFXPtr pTDFX; VisualPtr visual; BoxRec MemBox; + MessageType driFrom = X_DEFAULT; TDFXTRACE("TDFXScreenInit start\n"); pScrn = xf86Screens[pScreen->myNum]; @@ -1851,10 +1856,14 @@ TDFXScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) { * is called. fbScreenInit will eventually call into the drivers * InitGLXVisuals call back. */ - if (!pTDFX->NoAccel) { - if ((pTDFX->backOffset != -1) && (pTDFX->depthOffset != -1)) { + if (!xf86ReturnOptValBool(TDFXOptions, OPTION_DRI, TRUE) || pTDFX->NoAccel) { + pTDFX->directRenderingEnabled = FALSE; + driFrom = X_CONFIG; + } else if ((pTDFX->backOffset != -1) && (pTDFX->depthOffset != -1)) { + pTDFX->directRenderingEnabled = FALSE; + driFrom = X_PROBED; + } else { pTDFX->directRenderingEnabled = TDFXDRIScreenInit(pScreen); - } } #endif @@ -1934,18 +1943,16 @@ TDFXScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) { xf86DPMSInit(pScreen, TDFXDisplayPowerManagementSet, 0); #ifdef XF86DRI - if (!pTDFX->NoAccel) { - if (pTDFX->directRenderingEnabled) { + if (pTDFX->directRenderingEnabled) { /* Now that mi, fb, drm and others have done their thing, * complete the DRI setup. */ pTDFX->directRenderingEnabled = TDFXDRIFinishScreenInit(pScreen); - } } if (pTDFX->directRenderingEnabled) { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "direct rendering enabled\n"); + xf86DrvMsg(pScrn->scrnIndex, driFrom, "Direct rendering enabled\n"); } else { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "direct rendering disabled\n"); + xf86DrvMsg(pScrn->scrnIndex, driFrom, "Direct rendering disabled\n"); } #endif |