Linux Framebuffer Driver for the 3DLabs Permedia3 chipset.

ATTENTION : Ni mon employeur, ni aucun organisme de tutelle de l'Irisa ne pourra être tenu pour responsable des propos, informations ou logiciels diffusés ici sous ma seule responsabilité.

WARNING: This is a private page. Those pages and the informations and softwares they contain are my own and do not express the opinion of the Irisa.

Author

Romain Dolbeau

Status

This driver is still very experimental :

I'm looking for success/failure reports & beta-testers, please contact me if you have a permedia3 board (and linux of course)

How to use

You will need kernel version 2.2.18, 2.2.19, or a recent 2.4.x (likely >= 2.4.2, nothing earlier has been tested). Assuming LINUXSRC is the path to the top of your linux kernel source tree:

  1. put the files pm3fb.h and pm3fb.c in $LINUXSRC/driver/video
  2. patch linux-2.2.18 (or 2.2.19 or 2.4.x) with the included patch: cd $LINUXSRC ; patch -p1 < linux-2.2.18-pm3.patch or cd $LINUXSRC ; patch -p1 < linux-2.2.19-pm3.patch or cd $LINUXSRC ; patch -p1 < linux-2.4.x-pm3.patch
  3. add the driver to your kernel (you'll need CONFIG_EXPERIMENTAL and CONFIG_PCI)
  4. compile, install, reboot - and enjoy if hell doesn't break loose.

Depth, BitsPerPixel and fbset

There's a little bit of confusion on the proper use of some terms in this page and in the fbset software. Unfortunately, fbset -depth X should really be fbset -bpp X as it means set the framebuffer to that number of bits per pixels in memory, or more . For TrueColor mode, there's an option -rgba R,G,B,A to give the number of significant bits for each color component. So to get Depth 15 in 16 BitsPerPixels, i.e 5 bits for each of red, green and blue plus a spare bit, one should use: fbset -depth 16 -rgba 5,5,5,1.

At the moment, if you use fbset -depth 15, pm3fb will also use RGB 5551 and 16bpp but I'm not sure it's the right behavior. fbset -depth 16 will default to RGB 565.

Options (kernel)

All options are of the form <option_name>:[<board_number>:]<options_parameters> Brackets mean the board number (internally used to represent each board, from 0 on) is "optional" Note that for PCIID the board number is mandatory (it defaults to 0 for all other options). Options are separated by a comma ","

exemple: video=pm3fb,mode:640x480-60,pciid:0:1:2:3 will use board at PCIID 1:2:3 with mode 640x480 @ 60 Hz as board #0

note: Apparently kernel 2.4.x need to use "video=pm3fb:" instead of "video=pm3fb," ; colons instead of comma.

note: internal board number must be allocated in order, without hole ; card number #2 will be used only if card #0 and card #1 are.

note 2: Except for off, each option apply to one board ; for instance, pm3fb,font:VGA8x8 will change font for board 0 but not for board 1.

Options (module)

Options names are the same, but the syntax is different; you must use:

<option_name>=<value_board0>[,<value_board1>[,<value_board2>[...]]]

Options are separated by space. boolean option (noaccel, disable) use '0' (default) or '1' as value.

example: mode=800x600-75,640x480-60 disable=0,1 pciid=0:14:0,0:16:0 will use PCI:0:14:0 as enabled board 0 in 800x600-75, and PCI:0:16:0 as disabled board 1 in 640x480-60.

Known Bugs & workaround

Thanks to the help of Sven Luther, the only known bug has been fixed. Depth switching between 8bpp and 16/32bpp now works.

The original description of this bug was:

The only known bug at the moment relate to depth switching: when going from an 8 bit VT to a 16 or 32 bit VT (using fbset -depth 32 on the current VT or switching among previously-set VT), the colormap is totally wrong. Colormap is restored by going back-and-forth to XFree86 4.x (when using the glint driver). A known workaround involve patching the kernel, but that may broke other fbgen-dependant video drivers:

In the file linux/drivers/video/fbgen.c, there is a function fbgen_switch(). You need to remove the call to fbgen_install_cmap() near the bottom of the function (second-to-last statement). This patch is not included in the distributed linux patch: as said before, it might break other video drivers.

Also, this fix does not work the first time if you boot in 8 bit depth, you need to use the XFree86 trick to get a first working 16/32 VT (if you boot in 16/32bpp this is OK by default).

Todo

Tools

Warning: those are crude tools, to be used by programmer. If you don't know how to use the output they produce, don't use it.

More Links

Changelog

Fri Jun 15 13:53:01 CEST 2001, v 1.4.3: Removed warnings, depth 15 support, add 'depth' option.

Thu Jun 14 10:13:52 MET DST 2001, v 1.4.2: Fixed depth switching bug, preliminary 15bpp (RGB5551) support.

Thu Apr 12 11:16:45 MET DST 2001, v 1.4.1B: Doc updates.

Fri Apr 6 11:12:53 MET DST 2001, v 1.4.1: Configure.help, minor cleanup

Thu Mar 29 10:56:50 MET DST 2001, v 1.4.0: Module & module options support (note: linux patch changed, 2.2.19 added).

Thu Mar 15 15:30:31 MET 2001, v 1.3.2: Fixed mirroring bug on little-endian.

Wed Mar 14 21:25:54 CET 2001, v 1.3.1: Fixed bug in BlockMove (_bmov).

Tue Mar 13 10:53:19 MET 2001, v 1.3.0: Character drawing hardware support (in all width between 1 and 16), fixes.

Thu Mar 8 10:20:16 MET 2001, v 1.2.2: Better J2000 support, "font:" option.

Tue Mar 6 21:25:04 CET 2001, v 1.2.1: Better acceleration support.

Mon Mar 5 21:54:17 CET 2001, v 1.2.0: Partial acceleration support (clear & bmove)

Mon Mar 5 12:52:15 CET 2001, v 1.1.3: Big pan_display fix.

Sun Mar 4 22:21:50 CET 2001, v 1.1.2: (numerous) bug fixes.

Fri Mar 2 15:54:07 CET 2001, v 1.1.1: Might have Appian J2000 support, resource mangement in 2.4

Wed Feb 28 18:21:35 CET 2001, v 1.1.0: Might have multiple boards support (added, but not yest tested)

Tue Feb 27 17:31:12 CET 2001, v 1.0.6: fixes boot-time mode select, add more default mode

Tue Feb 27 14:01:36 CET 2001, v 1.0.5: fixes (1.0.4 was broken for 2.2), cleaning up

Mon Feb 26 23:17:36 CET 2001, v 1.0.4: preliminary 2.4.x support, dropped (useless on pm3) partial product, more OF fix

Mon Feb 26 20:59:05 CET 2001, v 1.0.3: No more shadow register (and wasted memory), endianess fix, use OF-preset resolution by default

Wed Feb 21 22:09:30 CET 2001, v 1.0.2: Code cleaning for future multiboard support, better OF support, bugs fix

Wed Feb 21 19:58:56 CET 2001, v 1.0.1: OpenFirmware support, fixed memory detection, better debug support, code cleaning

Wed Feb 21 14:47:06 CET 2001, v 1.0.0: First working version


Romain Dolbeau
Last modified: Fri Jun 15 13:53:14 CEST 2001