diff -ru linux/CREDITS linux.apb/CREDITS --- linux/CREDITS Tue Sep 19 19:47:06 2000 +++ linux.apb/CREDITS Fri Oct 6 00:00:05 2000 @@ -343,6 +343,12 @@ S: Minneapolis, MN 55410 S: USA +N: Aaron Botsis +E: aaron@digitalmafia.org +D: Added voodoo5 support to tdfxfb.c and pci headers +P: 1024D/59E50418 A8AD 6082 14C9 41E0 F86E 8DEE 37F9 C3A6 59E5 0418 +S: USA + N: Marc Boucher E: marc@mbsi.ca P: CA 67 A5 1A 38 CE B6 F2 D5 83 51 03 D2 9C 30 9E CE D2 DD 65 diff -ru linux/drivers/video/tdfxfb.c linux.apb/drivers/video/tdfxfb.c --- linux/drivers/video/tdfxfb.c Mon Jul 24 20:24:26 2000 +++ linux.apb/drivers/video/tdfxfb.c Fri Oct 6 00:26:43 2000 @@ -8,7 +8,7 @@ * All rights reserved * * Created : Thu Sep 23 18:17:43 1999, hmallat - * Last modified: Tue Nov 2 21:19:47 1999, hmallat + * Last modified: Fri Sep 8 00:24:14 2000, abotsis * * Lots of the information here comes from the Daryll Strauss' Banshee * patches to the XF86 server, and the rest comes from the 3dfx @@ -38,9 +38,12 @@ * - support other architectures (PPC, Alpha); does the fact that the VGA * core can be accessed only thru I/O (not memory mapped) complicate * things? + * - add voodoo4 support. The driver might even work as-is. Depends on whether + * or not the pci dev. id is different for voodoo4s. * * Version history: * + * 0.1.4 (released 2000-10-06) added voodoo5 support by Aaron Botsis. * 0.1.3 (released 1999-11-02) added Attila's panning support, code * reorg, hwcursor address page size alignment * (for mmaping both frame buffer and regs), @@ -248,6 +251,8 @@ #define BANSHEE_MAX_PIXCLOCK 270000.0 #define VOODOO3_MAX_PIXCLOCK 300000.0 +#define VOODOO5_MAX_PIXCLOCK 300000.0 + struct banshee_reg { /* VGA rubbish */ @@ -944,7 +949,8 @@ int sgram_p = 0; if(!((fb_info.dev == PCI_DEVICE_ID_3DFX_BANSHEE) || - (fb_info.dev == PCI_DEVICE_ID_3DFX_VOODOO3))) + (fb_info.dev == PCI_DEVICE_ID_3DFX_VOODOO3) || + (fb_info.dev == PCI_DEVICE_ID_3DFX_VOODOO5))) return 0; draminit0 = tdfx_inl(DRAMINIT0); @@ -1463,6 +1469,7 @@ switch(i->dev) { case PCI_DEVICE_ID_3DFX_BANSHEE: case PCI_DEVICE_ID_3DFX_VOODOO3: + case PCI_DEVICE_ID_3DFX_VOODOO5: par->width = (var->xres + 15) & ~15; /* could sometimes be 8 */ par->width_virt = par->width; par->height = var->yres; @@ -1585,11 +1592,17 @@ switch(info->dev) { case PCI_DEVICE_ID_3DFX_BANSHEE: + strcpy(fix->id, "3Dfx Banshee"); + goto CONTINUE; case PCI_DEVICE_ID_3DFX_VOODOO3: - strcpy(fix->id, - info->dev == PCI_DEVICE_ID_3DFX_BANSHEE - ? "3Dfx Banshee" - : "3Dfx Voodoo3"); + strcpy(fix->id, "3Dfx Voodoo3"); + goto CONTINUE; + case PCI_DEVICE_ID_3DFX_VOODOO5: + strcpy(fix->id, "3Dfx Voodoo5"); + goto CONTINUE; + + CONTINUE: + fix->smem_start = info->bufbase_phys; fix->smem_len = info->bufbase_size; fix->mmio_start = info->regbase_phys; @@ -1852,20 +1865,29 @@ int __init tdfxfb_init(void) { struct pci_dev *pdev = NULL; struct fb_var_screeninfo var; + char name[8]; while ((pdev = pci_find_device(PCI_VENDOR_ID_3DFX, PCI_ANY_ID, pdev))) { if(((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY) && ((pdev->device == PCI_DEVICE_ID_3DFX_BANSHEE) || - (pdev->device == PCI_DEVICE_ID_3DFX_VOODOO3))) { - char* name = pdev->device == PCI_DEVICE_ID_3DFX_BANSHEE - ? "Banshee" - : "Voodoo3"; + (pdev->device == PCI_DEVICE_ID_3DFX_VOODOO3) || + (pdev->device == PCI_DEVICE_ID_3DFX_VOODOO5) )) { + switch (pdev->device) { + case PCI_DEVICE_ID_3DFX_BANSHEE: + strcpy(name, "Banshee"); + fb_info.max_pixclock=BANSHEE_MAX_PIXCLOCK; + break; + case PCI_DEVICE_ID_3DFX_VOODOO3: + strcpy(name, "Voodoo3"); + fb_info.max_pixclock=VOODOO3_MAX_PIXCLOCK; + break; + case PCI_DEVICE_ID_3DFX_VOODOO5: + strcpy(name, "Voodoo5"); + fb_info.max_pixclock=VOODOO5_MAX_PIXCLOCK; + break; + } fb_info.dev = pdev->device; - fb_info.max_pixclock = - pdev->device == PCI_DEVICE_ID_3DFX_BANSHEE - ? BANSHEE_MAX_PIXCLOCK - : VOODOO3_MAX_PIXCLOCK; fb_info.regbase_phys = pci_resource_start(pdev, 0); fb_info.regbase_size = 1 << 24; diff -ru linux/include/linux/pci_ids.h linux.apb/include/linux/pci_ids.h --- linux/include/linux/pci_ids.h Wed Sep 27 15:53:52 2000 +++ linux.apb/include/linux/pci_ids.h Thu Oct 5 20:51:48 2000 @@ -939,6 +939,7 @@ #define PCI_DEVICE_ID_3DFX_VOODOO2 0x0002 #define PCI_DEVICE_ID_3DFX_BANSHEE 0x0003 #define PCI_DEVICE_ID_3DFX_VOODOO3 0x0005 +#define PCI_DEVICE_ID_3DFX_VOODOO5 0x0009 #define PCI_VENDOR_ID_SIGMADES 0x1236 #define PCI_DEVICE_ID_SIGMADES_6425 0x6401