Ok, I'm attaching a better version of the previous patch, including a fix that makes the boot logo appear correctly. I'm still trying to sort out the hardware cursor.
-- Derrik Pates [EMAIL PROTECTED] [EMAIL PROTECTED]
--- linux/drivers/video/tdfxfb.c.old 2002-12-14 12:42:10.000000000 -0500 +++ linux/drivers/video/tdfxfb.c 2002-12-14 19:54:45.000000000 -0500 @@ -762,7 +762,12 @@ tdfx_outl(SRCXY, 0); tdfx_outl(DSTXY, xx | (yy << 16)); tdfx_outl(COMMAND_2D, COMMAND_2D_H2S_BITBLT | (ROP_COPY << 24)); +#if defined(__BIG_ENDIAN) + /* Add the bit to automatically reorder bytes on BE systems. -- dpates */ + tdfx_outl(SRCFORMAT, 0x500000); +#elif defined(__LITTLE_ENDIAN) tdfx_outl(SRCFORMAT, 0x400000); +#endif tdfx_outl(DSTFORMAT, fmt); tdfx_outl(DSTSIZE, fontwidth(p) | (fontheight(p) << 16)); i=fontheight(p); @@ -820,7 +825,12 @@ tdfx_outl(COMMAND_3D, COMMAND_3D_NOP); tdfx_outl(COLORFORE, fgx); tdfx_outl(COLORBACK, bgx); +#if defined(__BIG_ENDIAN) + /* Add the bit to automatically reorder bytes for BE systems. -- dpates */ + tdfx_outl(SRCFORMAT, 0x500000); +#elif defined(__LITTLE_ENDIAN) tdfx_outl(SRCFORMAT, 0x400000); +#endif tdfx_outl(DSTFORMAT, fmt); tdfx_outl(DSTSIZE, w | (h << 16)); tdfx_outl(SRCXY, 0); @@ -1620,10 +1630,6 @@ v.blue.length = 5; break; case 24: - v.red.offset=16; - v.green.offset=8; - v.blue.offset=0; - v.red.length = v.green.length = v.blue.length = 8; case 32: v.red.offset = 16; v.green.offset = 8; @@ -1672,7 +1678,7 @@ fix->line_length = par->lpitch; fix->visual = (par->bpp == 8) ? FB_VISUAL_PSEUDOCOLOR - : FB_VISUAL_DIRECTCOLOR; + : FB_VISUAL_TRUECOLOR; fix->xpanstep = 0; fix->ypanstep = nopan ? 0 : 1; @@ -1951,6 +1957,10 @@ return -ENXIO; } + /* make sure PCI resource 2 (IO port range) is turned on. of course, if + * this is on a secondary PCI bus (where the IO range isn't at the + * global 0-offset point), things _will_ break. */ + pci_enable_device_bars (pdev, 1<<2); fb_info.iobase = pci_resource_start (pdev, 2); printk("fb: %s memory = %ldK\n", name, fb_info.bufbase_size >> 10);