Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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