summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTormod Volden <bugzi06.fdo.tormod@xoxy.net>2007-07-11 21:25:30 -0400
committerAlex Deucher <alex@botch2.com>2007-07-11 21:25:30 -0400
commitb126b204d3465700e8c6a1fcc4770f322c8bb7db (patch)
tree868a69ddbffdfeb747ca4d37fae9905ec1f7d5ef
parent90692b3a123861ca02100f86b4c80f070fd4196d (diff)
Add "DRI" option to enable/disable DRI support
fixes bug 10746
-rw-r--r--man/savage.man4
-rw-r--r--src/savage_driver.c10
2 files changed, 12 insertions, 2 deletions
diff --git a/man/savage.man b/man/savage.man
index 9e8dd27..e5d3d27 100644
--- a/man/savage.man
+++ b/man/savage.man
@@ -221,6 +221,10 @@ on an AGP card the AGP bus speed is not set and no AGP aperture is
allocated. This implies
.BI DmaType
\*qPCI\*q.
+.TP
+.BI "Option \*qDRI\*q \*q" boolean \*q
+Enable DRI support. This option allows you to enable or disable the DRI.
+Default: \*qon\*q (enable DRI).
.SH FILES
savage_drv.o
.SH "SEE ALSO"
diff --git a/src/savage_driver.c b/src/savage_driver.c
index 1ed7782..98ea08e 100644
--- a/src/savage_driver.c
+++ b/src/savage_driver.c
@@ -245,6 +245,7 @@ typedef enum {
,OPTION_DMA_MODE
,OPTION_AGP_MODE
,OPTION_AGP_SIZE
+ ,OPTION_DRI
} SavageOpts;
@@ -277,6 +278,7 @@ static const OptionInfoRec SavageOptions[] =
{ OPTION_DMA_MODE, "DmaMode", OPTV_ANYSTR, {0}, FALSE },
{ OPTION_AGP_MODE, "AGPMode", OPTV_INTEGER, {0}, FALSE },
{ OPTION_AGP_SIZE, "AGPSize", OPTV_INTEGER, {0}, FALSE },
+ { OPTION_DRI, "DRI", OPTV_BOOLEAN, {0}, TRUE },
#endif
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};
@@ -3120,8 +3122,12 @@ static Bool SavageScreenInit(int scrnIndex, ScreenPtr pScreen,
vgaHWBlankScreen(pScrn, TRUE);
#ifdef XF86DRI
- if (psav->IsSecondary) {
- psav->directRenderingEnabled = FALSE;
+ if (!xf86ReturnOptValBool(psav->Options, OPTION_DRI, TRUE)) {
+ psav->directRenderingEnabled = FALSE;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Direct rendering forced off\n");
+ } else if (psav->IsSecondary) {
+ psav->directRenderingEnabled = FALSE;
} else if (xf86IsEntityShared(psav->pEnt->index)) {
/* Xinerama has sync problem with DRI, disable it for now */
psav->directRenderingEnabled = FALSE;