1 [This file is cloned from VesaFB. Thanks go to Gerd Knorr]
6 This is a driver for a graphic framebuffer for Matrox devices on
7 Alpha, Intel and PPC boxes.
11 * It provides a nice large console (128 cols + 48 lines with 1024x768)
12 without using tiny, unreadable fonts.
13 * You can run XF68_FBDev on top of /dev/fb0
14 * Most important: boot logo :-)
18 * graphic mode is slower than text mode... but you should not notice
19 if you use same resolution as you used in textmode.
25 Switching modes is done using the video=matrox:vesa:... boot parameter
26 or using `fbset' program.
28 If you want, for example, enable a resolution of 1280x1024x24bpp you should
29 pass to the kernel this command line: "video=matrox:vesa:0x1BB".
30 Note that the same line, if 'appended' as a lilo parameter in lilo.conf will
31 read "video=matrox:vesa:443" because lilo pass integer parameters as decimal
32 numbers to the kernel.
34 You should compile in both vgacon (to boot if you remove you Matrox from
35 box) and matroxfb (for graphics mode). You should not compile-in vesafb
36 unless you have primary display on non-Matrox VBE2.0 device (see
37 Documentation/vesafb.txt for details).
39 Currently supported video modes are (through vesa:... interface, PowerMac
40 has [as addon] compatibility code):
45 bpp | 640x400 640x480 768x576 800x600 960x720
46 ----+--------------------------------------------
48 8 | 0x100 0x101 0x180 0x103 0x188
49 15 | 0x110 0x181 0x113 0x189
50 16 | 0x111 0x182 0x114 0x18A
51 24 | 0x1B2 0x184 0x1B5 0x18C
52 32 | 0x112 0x183 0x115 0x18B
55 [Graphic modes (continued)]
57 bpp | 1024x768 1152x864 1280x1024 1408x1056 1600x1200
58 ----+------------------------------------------------
60 8 | 0x105 0x190 0x107 0x198 0x11C
61 15 | 0x116 0x191 0x119 0x199 0x11D
62 16 | 0x117 0x192 0x11A 0x19A 0x11E
63 24 | 0x1B8 0x194 0x1BB 0x19C 0x1BF
64 32 | 0x118 0x193 0x11B 0x19B
69 text | 640x400 640x480 1056x344 1056x400 1056x480
70 -----+------------------------------------------------
71 8x8 | 0x1C0 0x108 0x10A 0x10B 0x10C
74 You can enter these number either hexadecimal (leading `0x') or decimal
75 (0x100 = 256). You can also use value + 512 to achieve compatibility
76 with your old number passed to vesafb.
78 Non-listed number can be achieved by more complicated command-line, for
79 example 1600x1200x32bpp can be specified by `video=matrox:vesa:0x11C,depth:32'.
85 XF68_FBDev should work just fine, but it is non-accelerated. On non-intel
86 architectures there are some glitches for 24bpp videomodes. 8, 16 and 32bpp
89 Running another (accelerated) X-Server like XF86_SVGA works too. But (at least)
90 XFree servers have big troubles in multihead configurations (even on first
91 head, not even talking about second).
97 Driver contains SVGALib compatibility code. It is turned on by choosing textual
98 mode for console. You can do it at boot time by using videomode
99 2,3,7,0x108-0x10C or 0x1C0. At runtime, `fbset -depth 0' does this work.
100 Unfortunately, after SVGALib application exits, screen contents is corrupted.
101 Switching to another console and back fixes it. I hope that it is SVGALib's
102 problem and not mine, but I'm not sure.
108 You can pass kernel command line options to vesafb with
109 `video=matrox:option1,option2:value2,option3' (multiple options should be
110 separated by comma, values are separated from options by `:').
113 mem:X - size of memory (X can be in megabytes, kilobytes or bytes)
114 You can only decrease value determined by driver because of
115 it always probe for memory. Default is to use whole detected
116 memory usable for on-screen display (i.e. max. 8 MB).
117 disabled - do not load driver; you can use also `off', but `disabled'
119 enabled - load driver, if you have `video=matrox:disabled' in LILO
120 configuration, you can override it by this (you cannot override
121 `off'). It is default.
122 noaccel - do not use acceleration engine. It does not work on Alphas.
123 accel - use acceleration engine. It is default.
124 nopan - create initial consoles with vyres = yres, thus disabling virtual
126 pan - create initial consoles as tall as possible (vyres = memory/vxres).
128 nopciretry - disable PCI retries. It is needed for some broken chipsets,
129 it is autodetected for intel's 82437. In this case device does
130 not comply to PCI 2.1 specs (it will not guarantee that every
131 transaction terminate with success or retry in 32 PCLK).
132 pciretry - enable PCI retries. It is default, except for intel's 82437.
133 novga - disables VGA I/O ports. It is default if BIOS did not enable device.
134 You should not use this option, some boards then do not restart
136 vga - preserve state of VGA I/O ports. It is default. Driver does not
137 enable VGA I/O if BIOS did not it (it is not safe to enable it in
139 nobios - disables BIOS ROM. It is default if BIOS did not enable BIOS itself.
140 You should not use this option, some boards then do not restart
142 bios - preserve state of BIOS ROM. It is default. Driver does not enable
143 BIOS if BIOS was not enabled before.
144 noinit - tells driver, that devices were already initialized. You should use
145 it if you have G100 and/or if driver cannot detect memory, you see
146 strange pattern on screen and so on. Devices not enabled by BIOS
147 are still initialized. It is default.
148 init - driver initializes every device it knows about.
149 nomtrr - disables write combining on frame buffer. This slows down driver but
150 there is reported minor incompatibility between GUS DMA and XFree
151 under high loads if write combining is enabled (sound dropouts).
152 mtrr - enables write combining on frame buffer. It speeds up video accesses
153 much. It is default. You must have MTRR support enabled in kernel
154 and your CPU must have MTRR (f.e. Pentium II have them).
155 sgram - tells to driver that you have G200 with SGRAM memory. It has no
156 effect without `init'.
157 sdram - tells to driver that you have G200 with SDRAM memory.
159 inv24 - change timings parameters for 24bpp modes on Millenium and
160 Millenium II. Specify this if you see strange color shadows around
162 noinv24 - use standard timings. It is the default.
163 inverse - invert colors on screen (for LCD displays)
164 noinverse - show true colors on screen. It is default.
165 dev:X - bind driver to device X. Driver numbers device from 0 up to N,
166 where device 0 is first `known' device found, 1 second and so on.
167 lspci lists devices in this order.
168 Default is `every' known device for driver with multihead support
169 and first working device (usually dev:0) for driver without
171 nohwcursor - disables hardware cursor (use software cursor instead).
172 hwcursor - enables hardware cursor. It is default. If you are using
173 non-accelerated mode (`noaccel' or `fbset -accel false'), software
174 cursor is used (except for text mode).
175 noblink - disables cursor blinking. Cursor in text mode always blinks (hw
177 blink - enables cursor blinking. It is default.
178 nofastfont - disables fastfont feature. It is default.
179 fastfont:X - enables fastfont feature. X specifies size of memory reserved for
180 font data, it must be >= (fontwidth*fontheight*chars_in_font)/8.
181 It is faster on Gx00 series, but slower on older cards.
182 grayscale - enable grayscale summing. It works in PSEUDOCOLOR modes (text,
183 4bpp, 8bpp). In DIRECTCOLOR modes it is limited to characters
184 displayed through putc/putcs. Direct accesses to framebuffer
186 nograyscale - disable grayscale summing. It is default.
187 cross4MB - enables that pixel line can cross 4MB boundary. It is default for
189 nocross4MB - pixel line must not cross 4MB boundary. It is default for
190 Millenium I or II, because of these devices have hardware
191 limitations which do not allow this. But this option is
192 incompatible with some (if not all yet released) versions of
194 vesa:X - selects startup videomode. X is number from 0 to 0x1FF, see table
195 above for detailed explanation. Default is 640x480x8bpp if driver
196 has 8bpp support. Otherwise first available of 640x350x4bpp,
197 640x480x15bpp, 640x480x24bpp, 640x480x32bpp or 80x25 text
198 (80x25 text is always available).
200 If you are not satisfied with videomode selected by `vesa' option, you
201 can modify it with these options:
203 xres:X - horizontal resolution, in pixels. Default is derived from `vesa'
205 yres:X - vertical resolution, in pixel lines. Default is derived from `vesa'
207 upper:X - top boundary: lines between end of VSYNC pulse and start of first
208 pixel line of picture. Default is derived from `vesa' option.
209 lower:X - bottom boundary: lines between end of picture and start of VSYNC
210 pulse. Default is derived from `vesa' option.
211 vslen:X - length of VSYNC pulse, in lines. Default is derived from `vesa'
213 left:X - left boundary: pixels between end of HSYNC pulse and first pixel.
214 Default is derived from `vesa' option.
215 right:X - right boundary: pixels between end of picture and start of HSYNC
216 pulse. Default is derived from `vesa' option.
217 hslen:X - length of HSYNC pulse, in pixels. Default is derived from `vesa'
219 pixclock:X - dotclocks, in ps (picoseconds). Default is derived from `vesa'
220 option and from `fh' and `fv' options.
221 sync:X - sync. pulse - bit 0 inverts HSYNC polarity, bit 1 VSYNC polarity.
222 If bit 3 (value 0x08) is set, composite sync instead of HSYNC is
223 generated. If bit 5 (value 0x20) is set, sync on green is turned on.
224 Do not forget that if you want sync on green, you also probably
226 Default depends on `vesa'.
227 depth:X - Bits per pixel: 0=text, 4,8,15,16,24 or 32. Default depends on
230 If you know capabilities of your monitor, you can specify some (or all) of
231 `pixclk', `fh' and `fv'. In this case, `pixclock' is computed so that
232 pixclock <= maxclk, real_fh <= fh and real_fv <= fv.
234 maxclk:X - maximum dotclock. X can be specified in MHz, kHz or Hz. Default is
236 fh:X - maximum horizontal synchronization frequency. X can be specified
237 in kHz or Hz. Default is `don't care'.
238 fv:X - maximum vertical frequency. X must be specified in Hz. Default is
239 70 for modes derived from `vesa' with yres <= 400, 60Hz for
246 There are known and unknown bugs, features and misfeatures.
247 Currently there are following known bugs:
248 + SVGALib does not restore screen on exit
249 + generic fbcon-cfbX procedures do not work on Alphas. Due to this,
250 `noaccel' (and cfb4 accel) driver does not work on Alpha. So everyone
251 with access to /dev/fb* on Alpha can hang machine (you should restrict
252 access to /dev/fb* - everyone with access to this device can destroy
253 your monitor, believe me...).
254 + 24bpp does not support correctly XF-FBDev on big-endian architectures.
255 + interlaced text mode is not supported; it looks like hardware limitation,
257 + G200 SGRAM/SDRAM is not autodetected.
259 And following misfeatures:
260 + SVGALib does not restore screen on exit.
261 + pixclock for text modes is limited by hardware to
263 66 MHz on Millennium I
264 60 MHz on Millennium II
265 Because I have no access to other devices, I do not know specific
266 frequencies for them. So driver does not check this and allows you to
267 set frequency higher that this. It causes sparks, black holes and other
268 pretty effects on screen. Device was not destroyed during tests. :-)
269 + my Millennium G200 oscillator has frequency range from 35 MHz to 380 MHz
270 (and it works with 8bpp on about 320 MHz dotclocks (and changed mclk)).
271 But Matrox says on product sheet that VCO limit is 50-250 MHz, so I believe
272 them (maybe that chip overheats, but it has a very big cooler (G100 has
273 none), so it should work).
274 + special mixed video/graphics videomodes of Mystique and Gx00 - 2G8V16 and
275 G16V16 are not supported
276 + color keying is not supported
277 + feature connector of Mystique and Gx00 is set to VGA mode (it is disabled
279 + DCC (monitor detection) protocol is not implemented
280 + some check for input values are not so strict how it should be (you can
281 specify vslen=4000 and so on).
283 And following features:
284 + 4bpp is available only on Millennium I and Millennium II. It is hardware
286 + current fbset is not able to set 15bpp videomode: you must specify
287 depth==16 and green.length==5. fbset does not allow you to set
289 + text mode uses 6 bit VGA palette instead of 8 bit (one of 262144 colors
290 instead of one of 16M colors). It is due to hardware limitation of
291 Millennium I/II and SVGALib compatibility.
296 It is time to redraw whole screen 1000 times in 1024x768, 60Hz. It is
297 time for draw 6144000 characters on screen through /dev/vcsa
298 (for 32bpp it is about 3GB of data (exactly 3000 MB); for 8x16 font in
299 16 seconds, i.e. 187 MBps).
300 Times were obtained from one older version of driver, now they are about 3%
301 faster, it is kernel-space only time on P-II/350 MHz, Millennium I in 33 MHz
302 PCI slot, G200 in AGP 2x slot. I did not test vgacon.
306 Millennium I G200 Millennium I G200
307 8bpp 16.42 9.54 12.33 9.13
308 16bpp 21.00 15.70 19.11 15.02
309 24bpp 36.66 36.66 35.00 35.00
310 32bpp 35.00 30.00 33.85 28.66
314 Millennium I G200 Millennium I G200 Millennium I G200
315 8bpp 7.79 7.24 13.55 7.78 30.00 21.01
316 16bpp 9.13 7.78 16.16 7.78 30.00 21.01
317 24bpp 14.17 10.72 18.69 10.24 34.99 21.01
318 32bpp 16.15 16.16 18.73 13.09 34.99 21.01
322 Millennium I G200 Millennium I G200 Millennium I G200
323 8bpp 8.41 6.01 6.54 4.37 16.00 10.51
324 16bpp 9.54 9.12 8.76 6.17 17.52 14.01
325 24bpp 15.00 12.36 11.67 10.00 22.01 18.32
326 32bpp 16.18 18.29* 12.71 12.74 24.44 21.00
334 * Yes, it is slower than Millennium I.
336 Petr Vandrovec <vandrove@vc.cvut.cz>