On Wednesday 21 April 2004 19:49, Michel DÃnzer wrote: > On Wed, 2004-04-21 at 04:17, Adam Jackson wrote: > > I tend to agree. I don't think there's any list of requested modules > > maintained anywhere. tdfx does xf86LoaderCheckSymbol("DRIQueryVersion") > > to see if libdri.a loaded though, which is probably good enough; if the > > check fails the message can be degraded to an X_INFO. Sound reasonable? > > I think so. But, while you're at it... the drivers need an option to > enable/disable the DRI, otherwise there's no way to control which > card(s) to enable it on in a multi-card setup.
Yes. That's a better idea than checking for symbol existance, actually. tdfx, i810, and mga already have a boolean Option "DRI" that does exactly this, so I copied that to the other drivers (defaulting it to "on" everywhere). This is used as the indicator of intent: the user is assumed to want DRI unless they say otherwise. If it's set false then none of the DRI init code will run, and the warning will be degraded to an info message. (If libdri doesn't get loaded then the initialization code will scream and yell anyway.) Revised patch attached. I'm pretty sure I didn't get the mach64 code right because there all the options are copied out into a struct _ATIRec individually rather than storing the whole ->Options array there. Very ugly. If someone who's not afraid of the mach64 DDX could take a look at that it'd be great. Also I missed glint and sunffb the first time around, because I was grepping for "Direct rendering disabled", so I normalized them too. - ajax
Index: xc/programs/Xserver/hw/xfree86/drivers/ati/aticonfig.c =================================================================== RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/aticonfig.c,v retrieving revision 1.3 diff -u -r1.3 aticonfig.c --- xc/programs/Xserver/hw/xfree86/drivers/ati/aticonfig.c 12 Apr 2004 04:45:20 -0000 1.3 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/aticonfig.c 23 Apr 2004 23:54:47 -0000 @@ -116,6 +116,7 @@ #ifdef XF86DRI +# define DO_DRI PublicOption[ATI_OPTION_DRI].value.bool # define IsPCI PublicOption[ATI_OPTION_IS_PCI].value.bool # define DMAMode PublicOption[ATI_OPTION_DMA_MODE].value.str # define AGPMode PublicOption[ATI_OPTION_AGP_MODE].value.num @@ -219,6 +220,7 @@ #ifdef XF86DRI + pATI->OptionDRI = DO_DRI; pATI->OptionIsPCI = IsPCI; pATI->OptionAGPMode = AGPMode; pATI->OptionAGPSize = AGPSize; Index: xc/programs/Xserver/hw/xfree86/drivers/ati/atioption.c =================================================================== RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/atioption.c,v retrieving revision 1.3 diff -u -r1.3 atioption.c --- xc/programs/Xserver/hw/xfree86/drivers/ati/atioption.c 12 Apr 2004 04:45:20 -0000 1.3 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/atioption.c 23 Apr 2004 23:54:47 -0000 @@ -79,6 +79,13 @@ #ifdef XF86DRI { + ATI_OPTION_DRI, + "DRI", + OPTV_BOOLEAN, + {0, }, + FALSE, + }, + { ATI_OPTION_IS_PCI, "force_pci_mode", OPTV_BOOLEAN, Index: xc/programs/Xserver/hw/xfree86/drivers/ati/atioption.h =================================================================== RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/atioption.h,v retrieving revision 1.3 diff -u -r1.3 atioption.h --- xc/programs/Xserver/hw/xfree86/drivers/ati/atioption.h 12 Apr 2004 04:45:20 -0000 1.3 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/atioption.h 23 Apr 2004 23:54:47 -0000 @@ -48,7 +48,8 @@ #endif /* AVOID_CPIO */ #ifdef XF86DRI - + + ATI_OPTION_DRI, ATI_OPTION_IS_PCI, ATI_OPTION_DMA_MODE, ATI_OPTION_AGP_MODE, Index: xc/programs/Xserver/hw/xfree86/drivers/ati/atiscreen.c =================================================================== RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/atiscreen.c,v retrieving revision 1.3 diff -u -r1.3 atiscreen.c --- xc/programs/Xserver/hw/xfree86/drivers/ati/atiscreen.c 12 Apr 2004 04:45:20 -0000 1.3 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/atiscreen.c 23 Apr 2004 23:54:47 -0000 @@ -176,10 +176,12 @@ * driver's InitGLXVisuals call back. */ - /* According to atiregs.h, GTPro (3D Rage Pro) is the first chip type with - * 3D triangle setup (the VERTEX_* registers) - */ - if (pATI->Chip < ATI_CHIP_264GTPRO) { + if (!pATI->OptionDRI) { + pATI->directRenderingEnabled = FALSE; + } else if (pATI->Chip < ATI_CHIP_264GTPRO) { + /* According to atiregs.h, GTPro (3D Rage Pro) is the first chip type with + * 3D triangle setup (the VERTEX_* registers) + */ xf86DrvMsg(iScreen, X_WARNING, "Direct rendering is not supported for ATI chips earlier than " "the ATI 3D Rage Pro.\n"); @@ -563,7 +565,7 @@ "Direct rendering enabled\n"); } else { /* FIXME: Release unused offscreen mem here? */ - xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, + xf86DrvMsg(pScreenInfo->scrnIndex, pATI->OptionDRI ? X_WARNING : X_INFO, "Direct rendering disabled\n"); } Index: xc/programs/Xserver/hw/xfree86/drivers/ati/atistruct.h =================================================================== RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/atistruct.h,v retrieving revision 1.3 diff -u -r1.3 atistruct.h --- xc/programs/Xserver/hw/xfree86/drivers/ati/atistruct.h 12 Apr 2004 04:45:20 -0000 1.3 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/atistruct.h 23 Apr 2004 23:54:48 -0000 @@ -475,6 +475,7 @@ FBAreaPtr backArea; int depthTexLines; FBAreaPtr depthTexArea; + CARD8 OptionDRI; /* DRI is desired */ CARD8 OptionIsPCI; /* Force PCI mode */ CARD8 OptionDMAMode; /* async, sync, mmio */ CARD8 OptionAGPMode; /* AGP mode */ Index: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c =================================================================== RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c,v retrieving revision 1.37 diff -u -r1.37 r128_driver.c --- xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c 12 Mar 2004 21:22:52 -0000 1.37 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c 23 Apr 2004 23:54:51 -0000 @@ -114,6 +114,7 @@ OPTION_DAC_6BIT, OPTION_DAC_8BIT, #ifdef XF86DRI + OPTION_DRI, OPTION_XV_DMA, OPTION_IS_PCI, OPTION_CCE_PIO, @@ -144,6 +145,7 @@ { OPTION_DAC_6BIT, "Dac6Bit", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_DAC_8BIT, "Dac8Bit", OPTV_BOOLEAN, {0}, TRUE }, #ifdef XF86DRI + { OPTION_DRI, "DRI", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_XV_DMA, "DMAForXv", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_IS_PCI, "ForcePCIMode", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_CCE_PIO, "CCEPIOMode", OPTV_BOOLEAN, {0}, FALSE }, @@ -2110,7 +2112,9 @@ info->CurrentLayout.pixel_bytes); int maxy = info->FbMapSize / width_bytes; - if (xf86ReturnOptValBool(info->Options, OPTION_NOACCEL, FALSE)) { + if (!xf86ReturnOptValBool(info->Options, OPTION_DRI, TRUE)) { + info->directRenderingEnabled = FALSE; + } else if (xf86ReturnOptValBool(info->Options, OPTION_NOACCEL, FALSE)) { xf86DrvMsg(scrnIndex, X_WARNING, "Acceleration disabled, not initializing the DRI\n"); info->directRenderingEnabled = FALSE; @@ -2466,7 +2470,9 @@ if (info->directRenderingEnabled) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Direct rendering enabled\n"); } else { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Direct rendering disabled\n"); + xf86DrvMsg(pScrn->scrnIndex, xf86ReturnOptValBool(info->Options, + OPTION_DRI, TRUE) ? X_WARNING : X_INFO, + "Direct rendering disabled\n"); } #endif Index: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c =================================================================== RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c,v retrieving revision 1.86 diff -u -r1.86 radeon_driver.c --- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c 29 Mar 2004 14:55:11 -0000 1.86 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c 23 Apr 2004 23:54:57 -0000 @@ -126,6 +126,7 @@ OPTION_DAC_6BIT, OPTION_DAC_8BIT, #ifdef XF86DRI + OPTION_DRI, OPTION_BUS_TYPE, OPTION_CP_PIO, OPTION_USEC_TIMEOUT, @@ -162,6 +163,7 @@ { OPTION_DAC_6BIT, "Dac6Bit", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_DAC_8BIT, "Dac8Bit", OPTV_BOOLEAN, {0}, TRUE }, #ifdef XF86DRI + { OPTION_DRI, "DRI", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_BUS_TYPE, "BusType", OPTV_ANYSTR, {0}, FALSE }, { OPTION_CP_PIO, "CPPIOMode", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_USEC_TIMEOUT, "CPusecTimeout", OPTV_INTEGER, {0}, FALSE }, @@ -4369,7 +4371,9 @@ info->CurrentLayout.pixel_bytes); int maxy = info->FbMapSize / width_bytes; - if (xf86ReturnOptValBool(info->Options, OPTION_NOACCEL, FALSE)) { + if (!xf86ReturnOptValBool(info->Options, OPTION_DRI, TRUE)) { + info->directRenderingEnabled = FALSE; + } else if (xf86ReturnOptValBool(info->Options, OPTION_NOACCEL, FALSE)) { xf86DrvMsg(scrnIndex, X_WARNING, "Acceleration disabled, not initializing the DRI\n"); info->directRenderingEnabled = FALSE; @@ -4820,7 +4824,9 @@ } xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Direct rendering enabled\n"); } else { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Direct rendering disabled\n"); + xf86DrvMsg(pScrn->scrnIndex, xf86ReturnOptValBool(info->Options, + OPTION_DRI, TRUE) ? X_WARNING : X_INFO, + "Direct rendering disabled\n"); } #endif Index: xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c =================================================================== RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c,v retrieving revision 1.24 diff -u -r1.24 glint_driver.c --- xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c 23 Oct 2003 02:23:30 -0000 1.24 +++ xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c 23 Apr 2004 23:55:02 -0000 @@ -197,7 +197,8 @@ OPTION_SHADOW_FB, OPTION_FBDEV, OPTION_FLATPANEL, - OPTION_VIDEO_KEY + OPTION_VIDEO_KEY, + OPTION_DRI } GLINTOpts; static const OptionInfoRec GLINTOptions[] = { @@ -211,6 +212,7 @@ { OPTION_FBDEV, "UseFBDev", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_FLATPANEL, "UseFlatPanel", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_VIDEO_KEY, "VideoKey", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_DRI, "DRI", OPTV_BOOLEAN, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -2926,7 +2928,8 @@ * is called. fbScreenInit will eventually call into the drivers * InitGLXVisuals call back. */ - if (!pGlint->NoAccel && pGlint->HWCursor) { + if (!pGlint->NoAccel && pGlint->HWCursor && + !xf86ReturnOptValBool(pGlint->Options, OPTION_DRI, TRUE)) { pGlint->directRenderingEnabled = GLINTDRIScreenInit(pScreen); } else { pGlint->directRenderingEnabled = FALSE; @@ -3158,10 +3161,11 @@ } if (pGlint->directRenderingEnabled) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "direct rendering enabled\n"); + "Direct rendering enabled\n"); } else { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "direct rendering disabled\n"); + xf86DrvMsg(pScrn->scrnIndex, xf86ReturnOptValBool(pGlint->Options, + OPTION_DRI, TRUE) ? X_WARNING : X_INFO, + "Direct rendering disabled\n"); } #endif Index: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c =================================================================== RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c,v retrieving revision 1.47 diff -u -r1.47 i810_driver.c --- xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c 23 Oct 2003 02:23:30 -0000 1.47 +++ xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c 23 Apr 2004 23:55:04 -0000 @@ -2187,7 +2187,9 @@ if (pI810->directRenderingEnabled) { xf86DrvMsg(pScrn->scrnIndex, driFrom, "Direct rendering enabled\n"); } else { - xf86DrvMsg(pScrn->scrnIndex, driFrom, "Direct rendering disabled\n"); + xf86DrvMsg(pScrn->scrnIndex, xf86ReturnOptValBool(pI810->Options, + OPTION_DRI, TRUE) ? X_WARNING : X_INFO, + "Direct rendering disabled\n"); } pScreen->SaveScreen = I810SaveScreen; Index: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c =================================================================== RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c,v retrieving revision 1.39 diff -u -r1.39 mga_driver.c --- xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c 23 Oct 2003 02:23:31 -0000 1.39 +++ xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c 23 Apr 2004 23:55:08 -0000 @@ -3284,6 +3284,7 @@ */ if (!xf86ReturnOptValBool(pMga->Options, OPTION_DRI, TRUE)) { driFrom = X_CONFIG; + pMga->directRenderingEnabled = FALSE; } else if ( pMga->NoAccel ) { xf86DrvMsg( pScrn->scrnIndex, X_ERROR, "Acceleration disabled, not initializing the DRI\n" ); @@ -3461,7 +3462,9 @@ if (pMga->directRenderingEnabled) { xf86DrvMsg(pScrn->scrnIndex, driFrom, "Direct rendering enabled\n"); } else { - xf86DrvMsg(pScrn->scrnIndex, driFrom, "Direct rendering disabled\n"); + xf86DrvMsg(pScrn->scrnIndex, xf86ReturnOptValBool(pMga->Options, + OPTION_DRI, TRUE) ? X_WARNING : X_INFO, + "Direct rendering disabled\n"); } if (pMga->DualHeadEnabled && pMga->SecondCrtc == FALSE) pMgaEnt->directRenderingEnabled = pMga->directRenderingEnabled; Index: xc/programs/Xserver/hw/xfree86/drivers/savage/savage_driver.c =================================================================== RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_driver.c,v retrieving revision 1.22 diff -u -r1.22 savage_driver.c --- xc/programs/Xserver/hw/xfree86/drivers/savage/savage_driver.c 26 Mar 2004 22:20:40 -0000 1.22 +++ xc/programs/Xserver/hw/xfree86/drivers/savage/savage_driver.c 23 Apr 2004 23:55:12 -0000 @@ -213,6 +213,9 @@ ,OPTION_BCI_FOR_XV ,OPTION_AGP_MODE ,OPTION_AGP_SIZE +#ifdef XF86DRI + ,OPTION_DRI +#endif } SavageOpts; @@ -237,6 +240,9 @@ { OPTION_BCI_FOR_XV, "BCIforXv", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_AGP_MODE, "AGPMode", OPTV_INTEGER, {0}, FALSE }, { OPTION_AGP_SIZE, "AGPSize", OPTV_INTEGER, {0}, FALSE }, +#ifdef XF86DRI + {OPTION_DRI, "DRI", OPTV_BOOLEAN, {0}, FALSE }, +#endif { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -2580,7 +2586,9 @@ return FALSE; #ifdef XF86DRI - if (((psav->Chipset == S3_TWISTER) + if (!xf86ReturnOptValBool(psav->Options, OPTION_DRI, TRUE)) { + psav->directRenderingEnabled = FALSE; + } else if (((psav->Chipset == S3_TWISTER) || (psav->Chipset == S3_PROSAVAGE) || (psav->Chipset == S3_SAVAGE4) || (psav->Chipset == S3_SAVAGE_MX) @@ -2715,7 +2723,9 @@ if (psav->directRenderingEnabled) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Direct rendering enabled\n"); } else { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Direct rendering disabled\n"); + xf86DrvMsg(pScrn->scrnIndex, xf86ReturnOptValBool(psav->Options, + OPTION_DRI, TRUE) ? X_WARNING : X_INFO, + "Direct rendering disabled\n"); } #endif Index: xc/programs/Xserver/hw/xfree86/drivers/sis/sis.h =================================================================== RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/sis/sis.h,v retrieving revision 1.5 diff -u -r1.5 sis.h --- xc/programs/Xserver/hw/xfree86/drivers/sis/sis.h 12 Sep 2003 14:24:16 -0000 1.5 +++ xc/programs/Xserver/hw/xfree86/drivers/sis/sis.h 23 Apr 2004 23:55:13 -0000 @@ -657,6 +657,7 @@ Bool irqEnabled; int irq; Bool IsAGPCard; + int DRI; unsigned long DRIheapstart, DRIheapend; void (*RenderCallback)(ScrnInfoPtr); Index: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_driver.c =================================================================== RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_driver.c,v retrieving revision 1.13 diff -u -r1.13 sis_driver.c --- xc/programs/Xserver/hw/xfree86/drivers/sis/sis_driver.c 30 Dec 2003 17:04:23 -0000 1.13 +++ xc/programs/Xserver/hw/xfree86/drivers/sis/sis_driver.c 23 Apr 2004 23:55:22 -0000 @@ -6305,9 +6305,11 @@ pSiS->cmdQueueLen = 0; /* Force an EngineIdle() at start */ #ifdef XF86DRI + if(!pSiS->DRI) + pSiS->directRenderingEnabled = FALSE; #ifdef SISDUALHEAD /* No DRI in dual head mode */ - if(pSiS->DualHeadMode) { + else if(pSiS->DualHeadMode) { pSiS->directRenderingEnabled = FALSE; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "DRI not supported in Dual Head mode\n"); @@ -6520,7 +6522,8 @@ /* TODO */ /* SISSetLFBConfig(pSiS); */ } else { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Direct rendering disabled\n"); + xf86DrvMsg(pScrn->scrnIndex, pSiS->DRI ? X_WARNING : X_INFO, + "Direct rendering disabled\n"); } #endif Index: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_opt.c =================================================================== RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/sis/sis_opt.c,v retrieving revision 1.5 diff -u -r1.5 sis_opt.c --- xc/programs/Xserver/hw/xfree86/drivers/sis/sis_opt.c 12 Sep 2003 14:24:16 -0000 1.5 +++ xc/programs/Xserver/hw/xfree86/drivers/sis/sis_opt.c 23 Apr 2004 23:55:24 -0000 @@ -135,6 +135,9 @@ #ifdef SIS_CP SIS_CP_OPT_OPTIONS #endif +#ifdef XF86DRI + OPTION_DRI, +#endif OPTION_PSEUDO } SISOpts; @@ -240,6 +243,9 @@ #ifdef SIS_CP SIS_CP_OPTION_DETAIL #endif +#ifdef XF86DRI + { OPTION_DRI, "DRI", OPTV_BOOLEAN, {0}, FALSE }, +#endif { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -366,6 +372,9 @@ #ifdef SIS_CP SIS_CP_OPT_DEFAULT #endif +#ifdef XF86DRI + pSiS->DRI = TRUE; +#endif /* Chipset dependent defaults */ @@ -479,6 +488,10 @@ } +#ifdef XF86DRI + pSiS->DRI = xf86ReturnOptValBool(pSiS->Options, OPTION_DRI, TRUE); +#endif + /* RenderAcceleration * En/Disables RENDER acceleration (315/330 series only) */ Index: xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_driver.c =================================================================== RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_driver.c,v retrieving revision 1.6 diff -u -r1.6 ffb_driver.c --- xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_driver.c 25 Mar 2003 11:23:40 -0000 1.6 +++ xc/programs/Xserver/hw/xfree86/drivers/sunffb/ffb_driver.c 23 Apr 2004 23:55:25 -0000 @@ -95,12 +95,18 @@ OPTION_SW_CURSOR, OPTION_HW_CURSOR, OPTION_NOACCEL +#ifdef XF86DRI + OPTION_DRI +#endif } FFBOpts; static const OptionInfoRec FFBOptions[] = { { OPTION_SW_CURSOR, "SWcursor", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_HW_CURSOR, "HWcursor", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE }, +#ifdef XF86DRI + { OPTION_DRI, "DRI", OPTV_BOOLEAN, {0}, FALSE }, +#endif { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -825,14 +831,18 @@ return FALSE; #ifdef XF86DRI - if (pFfb->ffb_type != afb_m3 && pFfb->ffb_type != afb_m6 && + if (!xf86ReturnOptValBool(pFfb->Options, OPTION_DRI, TRUE)) { + pFfb->dri_enabled = FALSE; + } else if (pFfb->ffb_type != afb_m3 && pFfb->ffb_type != afb_m6 && pFfb->NoAccel == FALSE) { pFfb->dri_enabled = FFBDRIScreenInit(pScreen); if (pFfb->dri_enabled == TRUE) - xf86Msg(X_INFO, "%s: DRM initialized\n", + xf86Msg(X_INFO, "%s: Direct rendering enabled.\n", pFfb->psdp->device); else - xf86Msg(X_INFO, "%s: DRM setup failed\n", + xf86Msg(xf86ReturnOptValBool(pFfb->Options, OPTION_DRI, + TRUE) ? X_WARNING : X_INFO, + "%s: Direct rendering disabled\n", pFfb->psdp->device); } else { pFfb->dri_enabled = FALSE; Index: xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c =================================================================== RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c,v retrieving revision 1.65 diff -u -r1.65 tdfx_driver.c --- xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c 23 Oct 2003 02:23:31 -0000 1.65 +++ xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c 23 Apr 2004 23:55:27 -0000 @@ -2233,7 +2233,9 @@ if (pTDFX->directRenderingEnabled) { xf86DrvMsg(pScrn->scrnIndex, driFrom, "Direct rendering enabled\n"); } else { - xf86DrvMsg(pScrn->scrnIndex, driFrom, "Direct rendering disabled\n"); + xf86DrvMsg(pScrn->scrnIndex, xf86ReturnOptValBool(pTDFX->Options, + OPTION_DRI, TRUE) ? X_WARNING : X_INFO, + "Direct rendering disabled\n"); } #endif