Commit dbd65625 authored by Felix Kühling's avatar Felix Kühling

- Changed option ForcePCIMode to option BusType for consistency with other

    drivers (radeon) and the DmaType option.
- Changed the type of a few more messages in SavagePreInit.
- Updated the manual page.
- Moved option CrtOnly to a more sensible place in the man page.
parent 0c5a94f8
......@@ -101,6 +101,12 @@ necessary to override it here. The
parameter may be specified as an integer in Hz (135750000), or with
standard suffixes like "k", "kHz", "M", or "MHz" (as in 135.75MHz).
.TP
.BI "Option \*qCrtOnly\*q \*q" boolean \*q
This option disables output to the LCD and enables output to the CRT port only.
It is useful on laptops if you only want to use the CRT port or to force the CRT
output only on desktop cards that use mobile chips. Default: auto-detect active
outputs
.TP
.BI "Option \*qUseBIOS\*q \*q" boolean \*q
Enable or disable use of the video BIOS to change modes. Ordinarily, the
.B savage
......@@ -158,23 +164,28 @@ The amount of AGP memory that will allocated for DMA and textures in
MB. Valid sizes are 4, 8, 16, 32, 64, 128 and 256. The default is
16MB.
.TP
.BI "Option \*qCrtOnly\*q \*q" boolean \*q
This option disables output to the LCD and enables output to the CRT port only.
It is useful on laptops if you only want to use the CRT port or to force the CRT
output only on desktop cards that use mobile chips. Default: auto-detect active
outputs
.TP
.BI "Option \*qDmaType\*q \*q" AGP \*q
.TP
.BI "Option \*qDmaType\*q \*q" PCI \*q
.BI "Option \*qDmaType\*q \*q" string \*q
The type of memory that will be used by the 3D driver for DMA (direct
memory access). \*qPCI\*q works with all hardware but with poor
performance. \*qAGP\*q only works if you have an AGP card. The default
is \*qAGP\*q if you have an AGP card, \*qPCI\*q otherwise.
memory access).
.br
PCI \-\- PCI memory (default on PCI cards)
.br
AGP \-\- AGP memory (default on AGP cards)
.br
\*qAGP\*q only works if you have an AGP card.
.TP
.BI "Option \*qForcePCIMode\*q \*q" boolean \*q
If you turn this on then PCI memory will be used for DMA and AGP
textures will be disabled.
.BI "Option \*qBusType\*q \*q" string \*q
The bus type that will be used to access the graphics card.
.br
PCI \-\- PCI bus (default on PCI cards)
.br
AGP \-\- AGP bus (default on AGP cards)
.br
\*qAGP\*q only works if you have an AGP card. If you choose \*qPCI\*q
on an AGP card the AGP bus speed is not set and no AGP aperture is
allocated. This implies
.BI DmaType
\*qPCI\*q.
.SH FILES
savage_drv.o
.SH "SEE ALSO"
......
......@@ -208,7 +208,7 @@ typedef enum {
,OPTION_DISABLE_COB
,OPTION_BCI_FOR_XV
,OPTION_DVI
,OPTION_FORCE_PCI
,OPTION_BUS_TYPE
,OPTION_DMA_TYPE
,OPTION_AGP_MODE
,OPTION_AGP_SIZE
......@@ -238,7 +238,7 @@ static const OptionInfoRec SavageOptions[] =
{ OPTION_BCI_FOR_XV, "BCIforXv", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_DVI, "DVI", OPTV_BOOLEAN, {0}, FALSE },
#ifdef XF86DRI
{ OPTION_FORCE_PCI, "ForcePCIMode", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_BUS_TYPE, "BusType", OPTV_ANYSTR, {0}, FALSE },
{ OPTION_DMA_TYPE, "DmaType", OPTV_ANYSTR, {0}, FALSE },
{ OPTION_AGP_MODE, "AGPMode", OPTV_INTEGER, {0}, FALSE },
{ OPTION_AGP_SIZE, "AGPSize", OPTV_INTEGER, {0}, FALSE },
......@@ -1306,6 +1306,8 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
} else
psav->ChipRev = psav->PciInfo->chipRev;
xf86DrvMsg(pScrn->scrnIndex, from, "Engine: \"%s\"\n", pScrn->chipset);
if (pEnt->device->videoRam != 0)
pScrn->videoRam = pEnt->device->videoRam;
......@@ -1377,12 +1379,47 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
}
}
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%s card detected\n",
xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "%s card detected\n",
(psav->IsPCI) ? "PCI" : "AGP");
if (xf86ReturnOptValBool(psav->Options, OPTION_FORCE_PCI, FALSE)) {
psav->IsPCI = TRUE;
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Forced into PCI-only mode\n");
if ((s = xf86GetOptValString(psav->Options, OPTION_BUS_TYPE))) {
if (strcmp(s, "AGP") == 0) {
if (psav->IsPCI) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"BusType AGP not available on PCI card\n");
} else {
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "BusType set to AGP\n");
}
} else if (strcmp(s, "PCI") == 0) {
psav->IsPCI = TRUE;
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "BusType set to PCI\n");
} else {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"Invalid BusType option, using %s DMA\n",
psav->IsPCI ? "PCI" : "AGP");
}
}
psav->AgpDMA = !psav->IsPCI;
if ((s = xf86GetOptValString(psav->Options, OPTION_DMA_TYPE))) {
if (strcmp(s, "AGP") == 0) {
if (psav->IsPCI) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"AGP DMA not available on PCI card, using PCI DMA\n");
} else {
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Using AGP DMA\n");
}
} else if (strcmp(s, "PCI") == 0) {
psav->AgpDMA = FALSE;
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Using PCI DMA\n");
} else {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"Invalid DmaType option, using %s DMA\n",
psav->AgpDMA ? "AGP" : "PCI");
}
} else {
xf86DrvMsg(pScrn->scrnIndex, X_DEFAULT,
"Using %s DMA\n", psav->AgpDMA ? "AGP" : "PCI");
}
if (!psav->IsPCI) {
......@@ -1409,6 +1446,7 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
xf86DrvMsg(pScrn->scrnIndex, from, "Using AGP %dx mode\n",
psav->agpMode);
from = X_DEFAULT;
if (xf86GetOptValInteger(psav->Options,
OPTION_AGP_SIZE, (int *)&(psav->agpSize))) {
switch (psav->agpSize) {
......@@ -1419,6 +1457,7 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
case 64:
case 128:
case 256:
from = X_CONFIG;
break;
default:
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
......@@ -1427,37 +1466,13 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
}
}
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
xf86DrvMsg(pScrn->scrnIndex, from,
"Using %d MB AGP aperture\n", psav->agpSize);
} else {
psav->agpMode = 0;
psav->agpSize = 0;
}
psav->AgpDMA = !psav->IsPCI;
if ((s = xf86GetOptValString(psav->Options, OPTION_DMA_TYPE))) {
if (strcmp(s, "AGP") == 0) {
if (psav->IsPCI) {
psav->AgpDMA = FALSE;
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"AGP DMA not available on PCI card, using PCI DMA\n");
} else {
psav->AgpDMA = TRUE;
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Using AGP DMA\n");
}
} else if (strcmp(s, "PCI") == 0) {
psav->AgpDMA = FALSE;
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Using PCI DMA\n");
} else {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"Invalid DmaType option, using %s DMA\n",
psav->AgpDMA ? "AGP" : "PCI");
}
} else {
xf86DrvMsg(pScrn->scrnIndex, X_DEFAULT,
"Using %s DMA\n", psav->AgpDMA ? "AGP" : "PCI");
}
#endif
/* we can use Option "DisableTile TRUE" to disable tile mode */
......@@ -1538,8 +1553,6 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
/* maybe throw in some more sanity checks here */
xf86DrvMsg(pScrn->scrnIndex, from, "Engine: \"%s\"\n", pScrn->chipset);
if (!SavageMapMMIO(pScrn)) {
SavageFreeRec(pScrn);
vbeFree(psav->pVbe);
......@@ -1785,7 +1798,7 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
sr30 = VGAIN8(0x3c5);
if (sr30 & 0x02 /*0x04 */) {
dvi = TRUE;
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Digital Flat Panel Detected\n");
xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Digital Flat Panel Detected\n");
}
}
......@@ -2732,7 +2745,7 @@ static Bool SavageMapMMIO(ScrnInfoPtr pScrn)
psav->FrameBufferBase = psav->PciInfo->memBase[1];
}
xf86DrvMsg( pScrn->scrnIndex, X_PROBED,
xf86DrvMsg( pScrn->scrnIndex, X_INFO,
"mapping MMIO @ 0x%lx with size 0x%x\n",
psav->MmioBase, SAVAGE_NEWMMIO_REGSIZE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment