diff -uNr linux/drivers/video.orig/Config.in linux/drivers/video/Config.in --- linux/drivers/video.orig/Config.in Thu Dec 28 17:26:31 2000 +++ linux/drivers/video/Config.in Thu Nov 30 16:36:41 2000 @@ -95,6 +95,7 @@ bool ' Multihead support' CONFIG_FB_MATROX_MULTIHEAD fi tristate 'ATI Rage128 display support' CONFIG_FB_ATY128 + tristate '3dfx display support' CONFIG_FB_TDFX fi fi if [ "$ARCH" = "sparc" -o "$ARCH" = "sparc64" ]; then diff -uNr linux/drivers/video.orig/Makefile linux/drivers/video/Makefile --- linux/drivers/video.orig/Makefile Thu Dec 28 17:26:31 2000 +++ linux/drivers/video/Makefile Mon Dec 18 21:19:39 2000 @@ -101,11 +101,15 @@ endif ifeq ($(CONFIG_FB_ATY),y) -L_OBJS += atyfb.o +L_OBJS += atyfb.o macmodes.o endif ifeq ($(CONFIG_FB_ATY128),y) L_OBJS += aty128fb.o +endif + +ifeq ($(CONFIG_FB_TDFX),y) + L_OBJS += tdfxfb.o endif ifeq ($(CONFIG_FB_IGA),y) diff -uNr linux/drivers/video.orig/fbmem.c linux/drivers/video/fbmem.c --- linux/drivers/video.orig/fbmem.c Thu Dec 28 17:26:31 2000 +++ linux/drivers/video/fbmem.c Thu Nov 30 16:37:50 2000 @@ -70,6 +70,8 @@ extern void atyfb_setup(char *options, int *ints); extern void aty128fb_init(void); extern void aty128fb_setup(char *options, int *ints); +extern void tdfxfb_init(void); +extern void tdfxfb_setup(char *options, int *ints); extern void igafb_init(void); extern void igafb_setup(char *options, int *ints); extern void imsttfb_init(void); @@ -149,6 +151,9 @@ #endif #ifdef CONFIG_FB_ATY128 { "aty128fb", aty128fb_init, aty128fb_setup }, +#endif +#ifdef CONFIG_FB_TDFX + { "tdfx", tdfxfb_init, tdfxfb_setup }, #endif #ifdef CONFIG_FB_IGA { "igafb", igafb_init, igafb_setup }, diff -uNr linux/drivers/video.orig/tdfxfb.c linux/driver/video/tdfxfb.c --- linux/drivers/video.orig/tdfxfb.c Wed Dec 31 19:00:00 1969 +++ linux/drivers/video/tdfxfb.c Mon Dec 18 16:41:25 2000 @@ -0,0 +1,2522 @@ +/* + * + * tdfxfb.c + * + * Author: Hannu Mallat + * + * Copyright © 1999 Hannu Mallat + * All rights reserved + * + * Created : Thu Sep 23 18:17:43 1999, hmallat + * Last modified: Tue Nov 2 21:19:47 1999, hmallat + * + * Lots of the information here comes from the Daryll Strauss' Banshee + * patches to the XF86 server, and the rest comes from the 3dfx + * Banshee specification. I'm very much indebted to Daryll for his + * work on the X server. + * + * Voodoo3 support was contributed Harold Oga. Lots of additions + * (proper acceleration, 24 bpp, hardware cursor) and bug fixes by Attila + * Kesmarki. Thanks guys! + * + * While I _am_ grateful to 3Dfx for releasing the specs for Banshee, + * I do wish the next version is a bit more complete. Without the XF86 + * patches I couldn't have gotten even this far... for instance, the + * extensions to the VGA register set go completely unmentioned in the + * spec! Also, lots of references are made to the 'SST core', but no + * spec is publicly available, AFAIK. + * + * The structure of this driver comes pretty much from the Permedia + * driver by Ilario Nardinocchi, which in turn is based on skeletonfb. + * + * TODO: + * - support for 16/32 bpp needs fixing (funky bootup penguin) + * - multihead support (basically need to support an array of fb_infos) + * - banshee and voodoo3 now supported -- any others? afaik, the original + * voodoo was a 3d-only card, so we won't consider that. what about + * voodoo2? + * - support other architectures (PPC, Alpha); does the fact that the VGA + * core can be accessed only thru I/O (not memory mapped) complicate + * things? + * + * Version history: + * + * 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), + * and my changes to get rid of hardcoded + * VGA i/o register locations (uses PCI + * configuration info now) + * 0.1.2 (released 1999-10-19) added Attila Kesmarki's bug fixes and + * improvements + * 0.1.1 (released 1999-10-07) added Voodoo3 support by Harold Oga. + * 0.1.0 (released 1999-10-06) initial version + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifdef CONFIG_MTRR +#include +#endif + +#include