configure.ac | 2 - src/voodoo.h | 2 - src/voodoo_dga.c | 2 - src/voodoo_driver.c | 20 ++++++++++++----- src/voodoo_hardware.c | 57 ++++++++++++++++++++++++++++++++++++++++--------- src/voodoo_pcirename.h | 6 ++--- 6 files changed, 66 insertions(+), 23 deletions(-)
New commits: commit 01e0f1442d8883376aeb5eb764e0ee92e00d4fdb Author: Adam Jackson <a...@redhat.com> Date: Tue Feb 24 10:29:41 2009 -0500 xf86-video-voodoo-1.2.1 diff --git a/configure.ac b/configure.ac index b7cc28c..ff6c1a5 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ(2.57) AC_INIT([xf86-video-voodoo], - 1.2.0, + 1.2.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xf86-video-voodoo) commit 1c82022d0952c6953c87609b2a44cab3af6d86cb Author: Alan Cox <a...@lxorguk.ukuu.org.uk> Date: Fri Aug 15 19:29:14 2008 -0400 Add missing call to xf86SetCrtcForModes() and add pass through option This fixes the problems with the crashes and other funnies. It was almost entirely down to a missing call to xf86SetCrtcForModes(). With that added the clock data appears valid and the card is working. I've also added support for the pass through switching as that is useful for debug when your text consoles are on the pass through display diff --git a/src/voodoo.h b/src/voodoo.h index 750c42b..4f97a8a 100644 --- a/src/voodoo.h +++ b/src/voodoo.h @@ -13,7 +13,7 @@ typedef struct { CloseScreenProcPtr CloseScreen; /* Wrapped Close */ XAAInfoRecPtr AccelInfoRec; /* Cached Accel rec for close */ Bool Blanked; - Bool OnAtExit; + Bool PassThrough; /* Set to restore pass through on exit */ EntityInfoPtr pEnt; OptionInfoPtr Options; diff --git a/src/voodoo_driver.c b/src/voodoo_driver.c index dc2176a..2822543 100644 --- a/src/voodoo_driver.c +++ b/src/voodoo_driver.c @@ -110,12 +110,14 @@ _X_EXPORT DriverRec VOODOO = { typedef enum { OPTION_NOACCEL, - OPTION_SHADOW_FB + OPTION_SHADOW_FB, + OPTION_PASS_THROUGH, } VoodooOpts; static const OptionInfoRec VoodooOptions[] = { { OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_SHADOW_FB, "ShadowFB", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_PASS_THROUGH,"PassThrough", OPTV_BOOLEAN, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -436,6 +438,9 @@ VoodooPreInit(ScrnInfoPtr pScrn, int flags) pVoo->Accel = 0; } + if (xf86ReturnOptValBool(pVoo->Options, OPTION_PASS_THROUGH, FALSE)) + pVoo->PassThrough = 1; + if (xf86ReturnOptValBool(pVoo->Options, OPTION_NOACCEL, FALSE)) { pVoo->ShadowFB = 1; pVoo->Accel = 0; @@ -544,6 +549,7 @@ VoodooPreInit(ScrnInfoPtr pScrn, int flags) } /* Set the current mode to the first in the list */ + xf86SetCrtcForModes(pScrn, 0); pScrn->currentMode = pScrn->modes; /* Do some checking, we will not support a virtual framebuffer larger than @@ -914,8 +920,10 @@ VoodooRestore(ScrnInfoPtr pScrn, Bool Closing) pVoo = VoodooPTR(pScrn); pVoo->Blanked = TRUE; - if (!Closing || !(pVoo->OnAtExit)) - VoodooBlank(pVoo); + if (!Closing) + VoodooBlank(pVoo); + if (Closing && pVoo->PassThrough) + VoodooRestorePassThrough(pVoo); } static void diff --git a/src/voodoo_hardware.c b/src/voodoo_hardware.c index 35e656f..d988b33 100644 --- a/src/voodoo_hardware.c +++ b/src/voodoo_hardware.c @@ -685,6 +685,17 @@ int VoodooHardwareInit(VoodooPtr pVoo) } /* + * Voodoo exit logic + */ + +void VoodooRestorePassThrough(VoodooPtr pVoo) +{ + pci_enable(pVoo, 1, 0, 0); + mmio32_w(pVoo, 0x210, 0); + pci_enable(pVoo, 0, 0, 1); +} + +/* * Copiers for Voodoo1 * * Voodoo1 has no CPU to screen blit, and also lacks SGRAM fill @@ -969,6 +980,9 @@ static void Voodoo2SetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop, unsigned int planemask) { VoodooPtr pVoo = VoodooPTR(pScrn); + if (debug) + ErrorF("Setup for solid fill colour %04X, rop %d, Mask %04X.\n", + color, rop, planemask); Voodoo2Setup2D(pVoo); mmio32_w_chuck(pVoo, 0x2EC, ropxlate[rop]); /* rop */ mmio32_w_chuck(pVoo, 0x2F0, color); /* fg color */ @@ -979,6 +993,8 @@ static void Voodoo2SubsequentSolidFillRect(ScrnInfoPtr pScrn, int x, int y, int w, int h) { VoodooPtr pVoo = VoodooPTR(pScrn); + if (debug) + ErrorF("Fill (%d, %d) for (%d, %d)\n", x, y, w, h); wait_idle(pVoo); mmio32_w_chuck(pVoo, 0x2E4, (y<<16) | x); /* Dst x,y */ /* Set size and fire */ commit c15d43dd0c74e4406c80c0cf0491003128d05fe9 Author: Adam Jackson <a...@redhat.com> Date: Fri Aug 15 15:56:01 2008 -0400 Don't bother including xf86DDC.h 3dfx kit only gained DDC support with the Voodoo Banshee, this driver only covers the Voodoo 1 and 2. diff --git a/src/voodoo_dga.c b/src/voodoo_dga.c index a8cb708..9d088a7 100644 --- a/src/voodoo_dga.c +++ b/src/voodoo_dga.c @@ -47,7 +47,6 @@ #include "xf86cmap.h" #include "shadowfb.h" #include "vgaHW.h" -#include "xf86DDC.h" #include "xf86RAC.h" #include "xf86Resources.h" #include "compiler.h" diff --git a/src/voodoo_driver.c b/src/voodoo_driver.c index 28a6654..dc2176a 100644 --- a/src/voodoo_driver.c +++ b/src/voodoo_driver.c @@ -56,7 +56,6 @@ #include "xf86cmap.h" #include "shadowfb.h" #include "vgaHW.h" -#include "xf86DDC.h" #include "xf86RAC.h" #include "xf86Resources.h" #include "compiler.h" diff --git a/src/voodoo_hardware.c b/src/voodoo_hardware.c index 852a5b2..35e656f 100644 --- a/src/voodoo_hardware.c +++ b/src/voodoo_hardware.c @@ -48,7 +48,6 @@ #include "xf86cmap.h" #include "shadowfb.h" #include "vgaHW.h" -#include "xf86DDC.h" #include "xf86RAC.h" #include "xf86Resources.h" #include "xaa.h" commit ed2d5eccbaeb07841911bbe86b57970bf7a22ab9 Author: Adam Jackson <a...@redhat.com> Date: Fri Aug 15 14:09:05 2008 -0400 Uninclude xf86Version.h diff --git a/src/voodoo_dga.c b/src/voodoo_dga.c index 6f1f925..a8cb708 100644 --- a/src/voodoo_dga.c +++ b/src/voodoo_dga.c @@ -42,7 +42,6 @@ #include "micmap.h" #include "xf86.h" #include "xf86_OSproc.h" -#include "xf86Version.h" #include "xf86PciInfo.h" #include "xf86Pci.h" #include "xf86cmap.h" diff --git a/src/voodoo_hardware.c b/src/voodoo_hardware.c index 1469939..852a5b2 100644 --- a/src/voodoo_hardware.c +++ b/src/voodoo_hardware.c @@ -43,7 +43,6 @@ #include "micmap.h" #include "xf86.h" #include "xf86_OSproc.h" -#include "xf86Version.h" #include "xf86PciInfo.h" #include "xf86Pci.h" #include "xf86cmap.h" commit 04d408fbbe95464ddbb2c6b4501d8ca788b212bb Author: Adam Jackson <a...@redhat.com> Date: Fri Aug 15 14:01:18 2008 -0400 xf86Version -> xorgVersion diff --git a/src/voodoo_driver.c b/src/voodoo_driver.c index f2f6c3a..28a6654 100644 --- a/src/voodoo_driver.c +++ b/src/voodoo_driver.c @@ -50,7 +50,7 @@ #include "mipointer.h" #include "xf86.h" #include "xf86_OSproc.h" -#include "xf86Version.h" +#include "xorgVersion.h" #include "xf86PciInfo.h" #include "xf86Pci.h" #include "xf86cmap.h" @@ -163,7 +163,7 @@ static XF86ModuleVersionInfo voodooVersRec = MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, - XF86_VERSION_CURRENT, + XORG_VERSION_CURRENT, VOODOO_MAJOR_VERSION, VOODOO_MINOR_VERSION, VOODOO_PATCHLEVEL, ABI_CLASS_VIDEODRV, /* This is a video driver */ ABI_VIDEODRV_VERSION, commit 1a9402d40bb14b9101d80757544ca681980b320b Author: Paulo Cesar Pereira de Andrade <p...@mandriva.com.br> Date: Wed Mar 12 18:10:53 2008 -0300 Compile warning fixes. Also rename macro name in voodoo_pcirename.h. diff --git a/src/voodoo_driver.c b/src/voodoo_driver.c index 5ad741e..f2f6c3a 100644 --- a/src/voodoo_driver.c +++ b/src/voodoo_driver.c @@ -47,6 +47,7 @@ #include "fb.h" #include "mibank.h" #include "micmap.h" +#include "mipointer.h" #include "xf86.h" #include "xf86_OSproc.h" #include "xf86Version.h" diff --git a/src/voodoo_hardware.c b/src/voodoo_hardware.c index 82efaf3..1469939 100644 --- a/src/voodoo_hardware.c +++ b/src/voodoo_hardware.c @@ -65,6 +65,24 @@ #include "mipict.h" #include "dixstruct.h" +#include <unistd.h> + + +#if 0 +static void VoodooReadWriteBank(ScreenPtr pScreen, int bank); +#endif +static Bool VoodooSetupForCPUToScreenAlphaTexture(ScrnInfoPtr pScrn, int op, + CARD16 red, CARD16 green, CARD16 blue, CARD16 alpha, int alphaType, + CARD8 *alphaPtr, int alphaPitch, int width, int height, int flags); +static void VoodooSubsequentCPUToScreenAlphaTexture(ScrnInfoPtr pScrn, + int dstx, int dsty, int srcx, int srcy, int width, int height); +static Bool VoodooSetupForCPUToScreenTexture(ScrnInfoPtr pScrn, int op, + int texType, CARD8 *texPtr, int texPitch, int width, int height, + int flags); +static void VoodooSubsequentCPUToScreenTexture(ScrnInfoPtr pScrn, + int dstx, int dsty, int srcx, int srcy, int width, int height); + + static int debug = 0; /* @@ -814,7 +832,8 @@ void VoodooWriteBank(ScreenPtr pScreen, int bank) mmio32_w(pVoo, 0x114, pVoo->lfbMode); } -void VoodooReadWriteBank(ScreenPtr pScreen, int bank) +#if 0 +static void VoodooReadWriteBank(ScreenPtr pScreen, int bank) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; VoodooPtr pVoo = VoodooPTR(pScrn); @@ -832,6 +851,7 @@ void VoodooReadWriteBank(ScreenPtr pScreen, int bank) } mmio32_w(pVoo, 0x114, pVoo->lfbMode); } +#endif /* * We normally want to load all four rop variants at once so @@ -1183,9 +1203,9 @@ static void Voodoo2DisableClipping(ScrnInfoPtr pScrn) */ -Bool VoodooSetupForCPUToScreenAlphaTexture(ScrnInfoPtr pScrn, int op, CARD16 red, - CARD16 green, CARD16 blue, CARD16 alpha, int alphaType, CARD8 *alphaPtr, - int alphaPitch, int width, int height, int flags) +static Bool VoodooSetupForCPUToScreenAlphaTexture(ScrnInfoPtr pScrn, int op, + CARD16 red, CARD16 green, CARD16 blue, CARD16 alpha, int alphaType, + CARD8 *alphaPtr, int alphaPitch, int width, int height, int flags) { VoodooPtr pVoo = VoodooPTR(pScrn); @@ -1210,7 +1230,8 @@ Bool VoodooSetupForCPUToScreenAlphaTexture(ScrnInfoPtr pScrn, int op, CARD16 red return TRUE; } -void VoodooSubsequentCPUToScreenAlphaTexture(ScrnInfoPtr pScrn, int dstx, int dsty, int srcx, int srcy, int width, int height) +static void VoodooSubsequentCPUToScreenAlphaTexture(ScrnInfoPtr pScrn, + int dstx, int dsty, int srcx, int srcy, int width, int height) { VoodooPtr pVoo = VoodooPTR(pScrn); /* 32bit LFB write mode */ @@ -1258,8 +1279,9 @@ void VoodooSubsequentCPUToScreenAlphaTexture(ScrnInfoPtr pScrn, int dstx, int ds mmio32_w(pVoo, 0x10C, 0); } -Bool VoodooSetupForCPUToScreenTexture(ScrnInfoPtr pScrn, int op, int texType, - CARD8 *texPtr, int texPitch, int width, int height, int flags) +static Bool VoodooSetupForCPUToScreenTexture(ScrnInfoPtr pScrn, int op, + int texType, CARD8 *texPtr, int texPitch, int width, int height, + int flags) { VoodooPtr pVoo = VoodooPTR(pScrn); @@ -1283,7 +1305,8 @@ Bool VoodooSetupForCPUToScreenTexture(ScrnInfoPtr pScrn, int op, int texType, return TRUE; } -void VoodooSubsequentCPUToScreenTexture(ScrnInfoPtr pScrn, int dstx, int dsty, int srcx, int srcy, int width, int height) +static void VoodooSubsequentCPUToScreenTexture(ScrnInfoPtr pScrn, + int dstx, int dsty, int srcx, int srcy, int width, int height) { VoodooPtr pVoo = VoodooPTR(pScrn); /* 32bit LFB write mode */ diff --git a/src/voodoo_pcirename.h b/src/voodoo_pcirename.h index c93988a..de113b9 100644 --- a/src/voodoo_pcirename.h +++ b/src/voodoo_pcirename.h @@ -26,8 +26,8 @@ * library. The main purpose being to facilitate source code compatibility. */ -#ifndef TRIDENTPCIRENAME_H -#define TRIDENTPCIRENAME_H +#ifndef VOODOOPCIRENAME_H +#define VOODOOPCIRENAME_H enum region_type { REGION_MEM, @@ -119,4 +119,4 @@ typedef struct pci_device *pciVideoPtr; #endif /* XSERVER_LIBPCIACCESS */ -#endif /* TRIDENTPCIRENAME_H */ +#endif /* VOODOOPCIRENAME_H */ -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org