diff options
author | Jon Nettleton <jon.nettleton@gmail.com> | 2007-06-10 13:59:29 +0000 |
---|---|---|
committer | Jon Nettleton <jon.nettleton@gmail.com> | 2007-06-10 13:59:29 +0000 |
commit | 659bc675f4f52f539205ef7eae7e88e25fef3165 (patch) | |
tree | 7de86f06a30ab0450d2b46e9ab6273c30cc91e53 | |
parent | 22d903928bc8241652f18b519814a54e0d2f65de (diff) |
porting changeset r353 from trunk herevbe_testing
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | unichrome/via.man | 8 | ||||
-rw-r--r-- | unichrome/via_driver.c | 66 |
3 files changed, 41 insertions, 48 deletions
@@ -1,3 +1,12 @@ +2007-06-10 Benno Schulenberg <bensberg-at-justemail-dot-net> + + * unichrome/via.man: + * unichrome/via_driver.c: (VIAPreInit): + + Move reading of the VideoRAM option to after X has parsed the + config file. Also put the chipset and revision print statements + together and at the beginning. Plus several small layout tweaks. + 2007-05-18 Xavier Bachelot <xavier-at-bachelot-dot-org> * libxvmc/Makefile.am: @@ -24,9 +33,9 @@ * unichrome/via_driver.h: * unichrome/via.man: - Added per chipset option defaults. This should allow the - driver to install and work out of the box with almost all - hardware and xorg.conf configurations. + Added per-chipset option defaults. This should allow the + driver to work out of the box with almost all hardware and + xorg.conf configurations. 2007-05-07 Gabriel Mansi <gabriel-dot-mansi-at-gmail-dot-com> diff --git a/unichrome/via.man b/unichrome/via.man index 4a52fc0..6541bce 100644 --- a/unichrome/via.man +++ b/unichrome/via.man @@ -89,8 +89,8 @@ Enables or disables image centering on DVI displays. .BI "Option \*qDisableIRQ\*q \*q" boolean \*q Disables the Vblank IRQ. This is a workaround for some mainboards that have problems with IRQs from the Unichrome engine. With IRQs disabled, -DRI clients have no way to synchronize drawing to Vblank. ( Enabled by -default on the KM400 and K8M800 Chipsets ) +DRI clients have no way to synchronize drawing to Vblank. (This option +is enabled by default on the KM400 and K8M800 chipsets.) .TP .BI "Option \*qDisableVQ\*q \*q" boolean \*q Disables the use of VQ. VQ is enabled by default. @@ -98,8 +98,8 @@ Disables the use of VQ. VQ is enabled by default. .BI "Option \*qEnableAGPDMA\*q \*q" boolean \*q Enables the AGP DMA functionality in DRM. This requires that DRI is enabled and will force 2D and 3D acceleration to use AGP DMA. The XvMC DRI client -will also make use of this on the CLE266 to consume much less CPU. ( This is -enabled by default on all chipsets except the K8M890 and P4M900 ) +will also make use of this on the CLE266 to consume much less CPU. (This +option is enabled by default on all chipsets except the K8M890 and P4M900.) .TP .BI "Option \*qExaNoComposite\*q \*q" boolean \*q If EXA is enabled (using the option "AccelMethod"), this option enables diff --git a/unichrome/via_driver.c b/unichrome/via_driver.c index 8505dc0..4b6f148 100644 --- a/unichrome/via_driver.c +++ b/unichrome/via_driver.c @@ -695,7 +695,7 @@ static Bool VIASetupDefaultOptions(ScrnInfoPtr pScrn) #ifdef VIA_HAVE_EXA pVia->noComposite = FALSE; pVia->exaScratchSize = VIA_SCRATCH_SIZE / 1024; -#endif /* VIA_HAVE_EXA */ +#endif pVia->hwcursor = pVia->shadowFB ? FALSE : TRUE; pVia->VQEnable = TRUE; pVia->DRIIrqEnable = TRUE; @@ -944,41 +944,25 @@ static Bool VIAPreInit(ScrnInfoPtr pScrn, int flags) pVia->Chipset); } + xf86DrvMsg(pScrn->scrnIndex, from, "Chipset: \"%s\"\n", pScrn->chipset); + if (pEnt->device->chipRev >= 0) { pVia->ChipRev = pEnt->device->chipRev; xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "ChipRev override: %d\n", pVia->ChipRev); } else { - /*pVia->ChipRev = pVia->PciInfo->chipRev;*/ - /* Read PCI bus 0, dev 0, function 0, index 0xF6 to get chip rev. */ + /* Read PCI bus 0, dev 0, function 0, index 0xF6 to get chip revision */ pVia->ChipRev = pciReadByte(pciTag(0, 0, 0), 0xF6); } - from = X_DEFAULT; - - pScrn->videoRam = pEnt->device->videoRam; - from = xf86GetOptValInteger(VIAOptions, OPTION_VIDEORAM, - &pScrn->videoRam) ? - X_CONFIG : X_PROBED; - xf86DrvMsg( pScrn->scrnIndex, X_CONFIG, - "VideoRAM %dkB\n", pScrn->videoRam ); - - if (pEnt->device->videoRam != 0) { - if (!pScrn->videoRam) - pScrn->videoRam = pEnt->device->videoRam; - else { - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - "Video Memory Size in Option is %d KB, Detect is %d KB!", - pScrn->videoRam, pEnt->device->videoRam); - } - } + if (pVia->Chipset == VIA_CLE266) + ViaDoubleCheckCLE266Revision(pScrn); - xfree(pEnt); + xf86DrvMsg(pScrn->scrnIndex, from, "Chipset revision: %d\n", pVia->ChipRev); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Setting up default chipset options...\n"); - if (!VIASetupDefaultOptions(pScrn)) { VIAFreeRec(pScrn); return FALSE; @@ -988,6 +972,18 @@ static Bool VIAPreInit(ScrnInfoPtr pScrn, int flags) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Starting to parse config file options...\n"); + + pScrn->videoRam = pEnt->device->videoRam; + from = xf86GetOptValInteger(VIAOptions, OPTION_VIDEORAM, + &pScrn->videoRam) ? + X_CONFIG : X_PROBED; + xf86DrvMsg(pScrn->scrnIndex, from, "VideoRAM is set to %d kB\n", + pScrn->videoRam); + if (pScrn->videoRam != pEnt->device->videoRam) + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "Detected VideoRAM was %d kB!\n", pEnt->device->videoRam); + xfree(pEnt); + //pVia->shadowFB = FALSE; from = xf86GetOptValBool(VIAOptions, OPTION_SHADOW_FB, &pVia->shadowFB) ? X_CONFIG : X_DEFAULT; @@ -1071,26 +1067,21 @@ static Bool VIAPreInit(ScrnInfoPtr pScrn, int flags) * if neither is specified is HW. */ - from = X_DEFAULT; //pVia->hwcursor = pVia->shadowFB ? FALSE : TRUE; + from = X_DEFAULT; if (xf86GetOptValBool(VIAOptions, OPTION_HWCURSOR, &pVia->hwcursor)) from = X_CONFIG; - if (xf86GetOptValBool(VIAOptions, OPTION_SWCURSOR, &pVia->hwcursor)) { pVia->hwcursor = !pVia->hwcursor; from = X_CONFIG; } - if (pVia->IsSecondary) pVia->hwcursor = FALSE; - - if (pVia->hwcursor) { - xf86DrvMsg(pScrn->scrnIndex, from, - "Hardware two-color cursors.\n" - "\tSoftware full color cursors.\n"); - } else { + if (pVia->hwcursor) + xf86DrvMsg(pScrn->scrnIndex, from, "Hardware two-color cursors; " + "software full-color cursors.\n"); + else xf86DrvMsg(pScrn->scrnIndex, from, "Using software cursors.\n"); - } //pVia->VQEnable = TRUE; from = xf86GetOptValBool(VIAOptions, OPTION_DISABLEVQ, &pVia->VQEnable) @@ -1318,7 +1309,7 @@ static Bool VIAPreInit(ScrnInfoPtr pScrn, int flags) "No default TV type is set.\n"); } - /* TV out put signal Option */ + /* TV output signal Option */ pBIOSInfo->TVOutput = TVOUTPUT_NONE; if ((s = xf86GetOptValString(VIAOptions, OPTION_TVOUTPUT))) { if (!xf86NameCmp(s, "S-Video")) { @@ -1350,8 +1341,6 @@ static Bool VIAPreInit(ScrnInfoPtr pScrn, int flags) /* maybe throw in some more sanity checks here */ - xf86DrvMsg(pScrn->scrnIndex, from, "Chipset: \"%s\"\n", pScrn->chipset); - pVia->PciTag = pciTag(pVia->PciInfo->bus, pVia->PciInfo->device, pVia->PciInfo->func); @@ -1379,11 +1368,6 @@ static Bool VIAPreInit(ScrnInfoPtr pScrn, int flags) pVia->I2CScan ? "" : "not "); #endif /* HAVE_DEBUG */ - if (pVia->Chipset == VIA_CLE266) - ViaDoubleCheckCLE266Revision(pScrn); - - xf86DrvMsg(pScrn->scrnIndex, from, "Chipset Rev.: %d\n", pVia->ChipRev); - ViaCheckCardId(pScrn); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "...Finished parsing config file options.\n"); |