Information for Cirrus Chipset Users : Linear addressing and 16bpp/24bpp/32bpp modes
Previous: Mode issues
Next: The ``cl64xx'' Driver

5. Linear addressing and 16bpp/24bpp/32bpp modes

Currently the framebuffer code 16-bit, 24-bit, and 32-bit pixels in the SVGA server requires linear addressing. Option "linear" can be specified in a depth-specific screen section to enable linear addressing; a MemBase setting (in the device section) is probably also required (although they are both automatically selected with PCI cards, like 5446, 546x, and some 543x based cards). There are a number of different card configurations.

If you have a 542x/543x on the ISA bus, and you have 16Mb or more of system memory, linear addressing is impossible. 16bpp is out, sorry. If you have less than 14Mb of memory, you may be able to map the framebuffer at 14Mb, using `MemBase 0x00e00000'. That's five zeros after the `e'. Unfortunately many ISA cards don't support linear addressing.

If you have a 5424/26/28/29 on VESA local bus, the situation is more complicated. There are two different types of cards w.r.t. linear addressing:

You will probably have to rely on trial and error. If you have less than 16Mb memory, the `wrong' membase setting will result in no graphics being displayed, but you can probably exit with ctrl-alt-backspace.

If you have >= 16Mb memory, the first type of card (and even the second type with a stupid VLB motherboard) will result in a crash (probably a spontaneous hard reboot).

It may be possible to find out the type by visual inspection. If the card has a pin at A26, it is likely to map beyond 64Mb. To do this, take the card out. At the VESA local bus pins (this is the smaller strip of connector pins at the non-slot side of the card), consider the right side (this is the side of the board where all the chips are mounted). There are 45 pins here. They are numbered 1 to 45, from the inside (i.e. the one nearest to the card end is 45). Counting from the inside, the 17th pin is probably not present, then there are pins at 18-20. The 21st is A30, the 22nd is A28 and the 23rd is A26. So, if we have no pins at at 21-23, the card doesn't map beyond 64Mb. If there's only a gap of two pins at 21 and 22 (or they are both present) and there's a pin at 23, the card does probably map beyond 64Mb. If there's a little logic near that pin on the card, it's more likely.

With a 543x on the local bus things are simpler (the Cirrus Logic windows drivers use it), but it is not quite without problems.

With a card on the PCI bus, there is a PCI configuration register that holds the framebuffer base address, which is read automatically by the driver if a PCI card is detected. The `scanpci' program can read out the PCI configuration and show the base address.

On the VESA local bus, most 543x cards have a default mapping address of 64Mb, with jumper options for 2048Mb and 32Mb. This is probably described in the documentation that came with the card, or look in the MS-Windows system.ini file (something with linearaddr = <offset in megabytes>). These different settings were added by Cirrus Logic after finding that many VLB motherboard implementations don't implement different address pins. The driver assumes a default of 64Mb if MemBase isn't specified. A few examples for MemBase:

	MemBase	0x02000000	32Mb
	MemBase	0x04000000	64Mb
	MemBase	0x80000000	2048Mb

Finally, for 546X cards, you are in luck: there are no "issues" to worry about. The '6X will always use linear addressing and memory-mapped I/O, and will use the memory addresses up near 4GB. Yay for PCI!

The 16bpp and 32bpp modes are now fully accelerated, thanks to XAA. On more recent chips like the 5436/46 and the 546X, 24bpp is also fully accelerated. So although there are now up to 4 times as many bits to display, the X server shouldn't feel overly sluggish. Note also that the 24bpp and 32bpp modes are only supported on a limited set of cards, and with at least 2Mb of memory.

In the XF86Config "Screen" section, a "Display" subsection must be defined for each depth that you want to run, with separate Modes and virtual screen size. Example (2Mb of video memory):

Section "screen"
    SubSection "Display"
	Depth 8
	Virtual 1280 1024
	ViewPort 0 0
	Modes "640x480" "800x600" "1024x768"
	Option "linear"
    EndSubSection
    SubSection "Display"
	Depth 16
	Virtual 1024 992
	ViewPort 0 0
	Modes "640x480" "800x600" "1024x768"
	Option "linear"
    EndSubSection
    SubSection "Display"
	Depth 32
	Virtual 832 600
	ViewPort 0 0
	Modes "640x480" "800x600"
	Option "linear"
    EndSubSection
EndSection


Information for Cirrus Chipset Users : Linear addressing and 16bpp/24bpp/32bpp modes
Previous: Mode issues
Next: The ``cl64xx'' Driver