1*4882a593Smuzhiyun===== 2*4882a593Smuzhiyunsstfb 3*4882a593Smuzhiyun===== 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunIntroduction 6*4882a593Smuzhiyun============ 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunThis is a frame buffer device driver for 3dfx' Voodoo Graphics 9*4882a593Smuzhiyun(aka voodoo 1, aka sst1) and Voodoo² (aka Voodoo 2, aka CVG) based 10*4882a593Smuzhiyunvideo boards. It's highly experimental code, but is guaranteed to work 11*4882a593Smuzhiyunon my computer, with my "Maxi Gamer 3D" and "Maxi Gamer 3d²" boards, 12*4882a593Smuzhiyunand with me "between chair and keyboard". Some people tested other 13*4882a593Smuzhiyuncombinations and it seems that it works. 14*4882a593SmuzhiyunThe main page is located at <http://sstfb.sourceforge.net>, and if 15*4882a593Smuzhiyunyou want the latest version, check out the CVS, as the driver is a work 16*4882a593Smuzhiyunin progress, I feel uncomfortable with releasing tarballs of something 17*4882a593Smuzhiyunnot completely working...Don't worry, it's still more than usable 18*4882a593Smuzhiyun(I eat my own dog food) 19*4882a593Smuzhiyun 20*4882a593SmuzhiyunPlease read the Bug section, and report any success or failure to me 21*4882a593Smuzhiyun(Ghozlane Toumi <gtoumi@laposte.net>). 22*4882a593SmuzhiyunBTW, If you have only one monitor , and you don't feel like playing 23*4882a593Smuzhiyunwith the vga passthrou cable, I can only suggest borrowing a screen 24*4882a593Smuzhiyunsomewhere... 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun 27*4882a593SmuzhiyunInstallation 28*4882a593Smuzhiyun============ 29*4882a593Smuzhiyun 30*4882a593SmuzhiyunThis driver (should) work on ix86, with "late" 2.2.x kernel (tested 31*4882a593Smuzhiyunwith x = 19) and "recent" 2.4.x kernel, as a module or compiled in. 32*4882a593SmuzhiyunIt has been included in mainstream kernel since the infamous 2.4.10. 33*4882a593SmuzhiyunYou can apply the patches found in `sstfb/kernel/*-2.{2|4}.x.patch`, 34*4882a593Smuzhiyunand copy sstfb.c to linux/drivers/video/, or apply a single patch, 35*4882a593Smuzhiyun`sstfb/patch-2.{2|4}.x-sstfb-yymmdd` to your linux source tree. 36*4882a593Smuzhiyun 37*4882a593SmuzhiyunThen configure your kernel as usual: choose "m" or "y" to 3Dfx Voodoo 38*4882a593SmuzhiyunGraphics in section "console". Compile, install, have fun... and please 39*4882a593Smuzhiyundrop me a report :) 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun 42*4882a593SmuzhiyunModule Usage 43*4882a593Smuzhiyun============ 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun.. warning:: 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun #. You should read completely this section before issuing any command. 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun #. If you have only one monitor to play with, once you insmod the 50*4882a593Smuzhiyun module, the 3dfx takes control of the output, so you'll have to 51*4882a593Smuzhiyun plug the monitor to the "normal" video board in order to issue 52*4882a593Smuzhiyun the commands, or you can blindly use sst_dbg_vgapass 53*4882a593Smuzhiyun in the tools directory (See Tools). The latest solution is pass the 54*4882a593Smuzhiyun parameter vgapass=1 when insmodding the driver. (See Kernel/Modules 55*4882a593Smuzhiyun Options) 56*4882a593Smuzhiyun 57*4882a593SmuzhiyunModule insertion 58*4882a593Smuzhiyun---------------- 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun #. insmod sstfb.o 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun you should see some strange output from the board: 63*4882a593Smuzhiyun a big blue square, a green and a red small squares and a vertical 64*4882a593Smuzhiyun white rectangle. why? the function's name is self-explanatory: 65*4882a593Smuzhiyun "sstfb_test()"... 66*4882a593Smuzhiyun (if you don't have a second monitor, you'll have to plug your monitor 67*4882a593Smuzhiyun directly to the 2D videocard to see what you're typing) 68*4882a593Smuzhiyun 69*4882a593Smuzhiyun #. con2fb /dev/fbx /dev/ttyx 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun bind a tty to the new frame buffer. if you already have a frame 72*4882a593Smuzhiyun buffer driver, the voodoo fb will likely be /dev/fb1. if not, 73*4882a593Smuzhiyun the device will be /dev/fb0. You can check this by doing a 74*4882a593Smuzhiyun cat /proc/fb. You can find a copy of con2fb in tools/ directory. 75*4882a593Smuzhiyun if you don't have another fb device, this step is superfluous, 76*4882a593Smuzhiyun as the console subsystem automagicaly binds ttys to the fb. 77*4882a593Smuzhiyun #. switch to the virtual console you just mapped. "tadaaa" ... 78*4882a593Smuzhiyun 79*4882a593SmuzhiyunModule removal 80*4882a593Smuzhiyun-------------- 81*4882a593Smuzhiyun 82*4882a593Smuzhiyun #. con2fb /dev/fbx /dev/ttyx 83*4882a593Smuzhiyun 84*4882a593Smuzhiyun bind the tty to the old frame buffer so the module can be removed. 85*4882a593Smuzhiyun (how does it work with vgacon ? short answer : it doesn't work) 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun #. rmmod sstfb 88*4882a593Smuzhiyun 89*4882a593Smuzhiyun 90*4882a593SmuzhiyunKernel/Modules Options 91*4882a593Smuzhiyun---------------------- 92*4882a593Smuzhiyun 93*4882a593SmuzhiyunYou can pass some options to the sstfb module, and via the kernel 94*4882a593Smuzhiyuncommand line when the driver is compiled in: 95*4882a593Smuzhiyunfor module : insmod sstfb.o option1=value1 option2=value2 ... 96*4882a593Smuzhiyunin kernel : video=sstfb:option1,option2:value2,option3 ... 97*4882a593Smuzhiyun 98*4882a593Smuzhiyunsstfb supports the following options: 99*4882a593Smuzhiyun 100*4882a593Smuzhiyun=============== =============== =============================================== 101*4882a593SmuzhiyunModule Kernel Description 102*4882a593Smuzhiyun=============== =============== =============================================== 103*4882a593Smuzhiyunvgapass=0 vganopass Enable or disable VGA passthrou cable. 104*4882a593Smuzhiyunvgapass=1 vgapass When enabled, the monitor will get the signal 105*4882a593Smuzhiyun from the VGA board and not from the voodoo. 106*4882a593Smuzhiyun 107*4882a593Smuzhiyun Default: nopass 108*4882a593Smuzhiyun 109*4882a593Smuzhiyunmem=x mem:x Force frame buffer memory in MiB 110*4882a593Smuzhiyun allowed values: 0, 1, 2, 4. 111*4882a593Smuzhiyun 112*4882a593Smuzhiyun Default: 0 (= autodetect) 113*4882a593Smuzhiyun 114*4882a593Smuzhiyuninverse=1 inverse Supposed to enable inverse console. 115*4882a593Smuzhiyun doesn't work yet... 116*4882a593Smuzhiyun 117*4882a593Smuzhiyunclipping=1 clipping Enable or disable clipping. 118*4882a593Smuzhiyunclipping=0 noclipping With clipping enabled, all offscreen 119*4882a593Smuzhiyun reads and writes are discarded. 120*4882a593Smuzhiyun 121*4882a593Smuzhiyun Default: enable clipping. 122*4882a593Smuzhiyun 123*4882a593Smuzhiyungfxclk=x gfxclk:x Force graphic clock frequency (in MHz). 124*4882a593Smuzhiyun Be careful with this option, it may be 125*4882a593Smuzhiyun DANGEROUS. 126*4882a593Smuzhiyun 127*4882a593Smuzhiyun Default: auto 128*4882a593Smuzhiyun 129*4882a593Smuzhiyun - 50Mhz for Voodoo 1, 130*4882a593Smuzhiyun - 75MHz for Voodoo 2. 131*4882a593Smuzhiyun 132*4882a593Smuzhiyunslowpci=1 fastpci Enable or disable fast PCI read/writes. 133*4882a593Smuzhiyunslowpci=1 slowpci Default : fastpci 134*4882a593Smuzhiyun 135*4882a593Smuzhiyundev=x dev:x Attach the driver to device number x. 136*4882a593Smuzhiyun 0 is the first compatible board (in 137*4882a593Smuzhiyun lspci order) 138*4882a593Smuzhiyun=============== =============== =============================================== 139*4882a593Smuzhiyun 140*4882a593SmuzhiyunTools 141*4882a593Smuzhiyun===== 142*4882a593Smuzhiyun 143*4882a593SmuzhiyunThese tools are mostly for debugging purposes, but you can 144*4882a593Smuzhiyunfind some of these interesting: 145*4882a593Smuzhiyun 146*4882a593Smuzhiyun- `con2fb`, maps a tty to a fbramebuffer:: 147*4882a593Smuzhiyun 148*4882a593Smuzhiyun con2fb /dev/fb1 /dev/tty5 149*4882a593Smuzhiyun 150*4882a593Smuzhiyun- `sst_dbg_vgapass`, changes vga passthrou. You have to recompile the 151*4882a593Smuzhiyun driver with SST_DEBUG and SST_DEBUG_IOCTL set to 1:: 152*4882a593Smuzhiyun 153*4882a593Smuzhiyun sst_dbg_vgapass /dev/fb1 1 (enables vga cable) 154*4882a593Smuzhiyun sst_dbg_vgapass /dev/fb1 0 (disables vga cable) 155*4882a593Smuzhiyun 156*4882a593Smuzhiyun- `glide_reset`, resets the voodoo using glide 157*4882a593Smuzhiyun use this after rmmoding sstfb, if the module refuses to 158*4882a593Smuzhiyun reinsert. 159*4882a593Smuzhiyun 160*4882a593SmuzhiyunBugs 161*4882a593Smuzhiyun==== 162*4882a593Smuzhiyun 163*4882a593Smuzhiyun- DO NOT use glide while the sstfb module is in, you'll most likely 164*4882a593Smuzhiyun hang your computer. 165*4882a593Smuzhiyun- If you see some artefacts (pixels not cleaning and stuff like that), 166*4882a593Smuzhiyun try turning off clipping (clipping=0), and/or using slowpci 167*4882a593Smuzhiyun- the driver don't detect the 4Mb frame buffer voodoos, it seems that 168*4882a593Smuzhiyun the 2 last Mbs wrap around. looking into that . 169*4882a593Smuzhiyun- The driver is 16 bpp only, 24/32 won't work. 170*4882a593Smuzhiyun- The driver is not your_favorite_toy-safe. this includes SMP... 171*4882a593Smuzhiyun 172*4882a593Smuzhiyun [Actually from inspection it seems to be safe - Alan] 173*4882a593Smuzhiyun 174*4882a593Smuzhiyun- When using XFree86 FBdev (X over fbdev) you may see strange color 175*4882a593Smuzhiyun patterns at the border of your windows (the pixels lose the lowest 176*4882a593Smuzhiyun byte -> basically the blue component and some of the green). I'm unable 177*4882a593Smuzhiyun to reproduce this with XFree86-3.3, but one of the testers has this 178*4882a593Smuzhiyun problem with XFree86-4. Apparently recent Xfree86-4.x solve this 179*4882a593Smuzhiyun problem. 180*4882a593Smuzhiyun- I didn't really test changing the palette, so you may find some weird 181*4882a593Smuzhiyun things when playing with that. 182*4882a593Smuzhiyun- Sometimes the driver will not recognise the DAC, and the 183*4882a593Smuzhiyun initialisation will fail. This is specifically true for 184*4882a593Smuzhiyun voodoo 2 boards, but it should be solved in recent versions. Please 185*4882a593Smuzhiyun contact me. 186*4882a593Smuzhiyun- The 24/32 is not likely to work anytime soon, knowing that the 187*4882a593Smuzhiyun hardware does ... unusual things in 24/32 bpp. 188*4882a593Smuzhiyun 189*4882a593SmuzhiyunTodo 190*4882a593Smuzhiyun==== 191*4882a593Smuzhiyun 192*4882a593Smuzhiyun- Get rid of the previous paragraph. 193*4882a593Smuzhiyun- Buy more coffee. 194*4882a593Smuzhiyun- test/port to other arch. 195*4882a593Smuzhiyun- try to add panning using tweeks with front and back buffer . 196*4882a593Smuzhiyun- try to implement accel on voodoo2, this board can actually do a 197*4882a593Smuzhiyun lot in 2D even if it was sold as a 3D only board ... 198*4882a593Smuzhiyun 199*4882a593SmuzhiyunGhozlane Toumi <gtoumi@laposte.net> 200*4882a593Smuzhiyun 201*4882a593Smuzhiyun 202*4882a593SmuzhiyunDate: 2002/05/09 20:11:45 203*4882a593Smuzhiyun 204*4882a593Smuzhiyunhttp://sstfb.sourceforge.net/README 205