Back to home page

OSCL-LXR

 
 

    


0001 ===============
0002 What is vesafb?
0003 ===============
0004 
0005 This is a generic driver for a graphic framebuffer on intel boxes.
0006 
0007 The idea is simple:  Turn on graphics mode at boot time with the help
0008 of the BIOS, and use this as framebuffer device /dev/fb0, like the m68k
0009 (and other) ports do.
0010 
0011 This means we decide at boot time whenever we want to run in text or
0012 graphics mode.  Switching mode later on (in protected mode) is
0013 impossible; BIOS calls work in real mode only.  VESA BIOS Extensions
0014 Version 2.0 are required, because we need a linear frame buffer.
0015 
0016 Advantages:
0017 
0018  * It provides a nice large console (128 cols + 48 lines with 1024x768)
0019    without using tiny, unreadable fonts.
0020  * You can run XF68_FBDev on top of /dev/fb0 (=> non-accelerated X11
0021    support for every VBE 2.0 compliant graphics board).
0022  * Most important: boot logo :-)
0023 
0024 Disadvantages:
0025 
0026  * graphic mode is slower than text mode...
0027 
0028 
0029 How to use it?
0030 ==============
0031 
0032 Switching modes is done using the vga=... boot parameter.  Read
0033 Documentation/admin-guide/svga.rst for details.
0034 
0035 You should compile in both vgacon (for text mode) and vesafb (for
0036 graphics mode). Which of them takes over the console depends on
0037 whenever the specified mode is text or graphics.
0038 
0039 The graphic modes are NOT in the list which you get if you boot with
0040 vga=ask and hit return. The mode you wish to use is derived from the
0041 VESA mode number. Here are those VESA mode numbers:
0042 
0043 ====== =======  =======  ======== =========
0044 colors 640x480  800x600  1024x768 1280x1024
0045 ====== =======  =======  ======== =========
0046 256    0x101    0x103    0x105    0x107
0047 32k    0x110    0x113    0x116    0x119
0048 64k    0x111    0x114    0x117    0x11A
0049 16M    0x112    0x115    0x118    0x11B
0050 ====== =======  =======  ======== =========
0051 
0052 
0053 The video mode number of the Linux kernel is the VESA mode number plus
0054 0x200:
0055 
0056  Linux_kernel_mode_number = VESA_mode_number + 0x200
0057 
0058 So the table for the Kernel mode numbers are:
0059 
0060 ====== =======  =======  ======== =========
0061 colors 640x480  800x600  1024x768 1280x1024
0062 ====== =======  =======  ======== =========
0063 256    0x301    0x303    0x305    0x307
0064 32k    0x310    0x313    0x316    0x319
0065 64k    0x311    0x314    0x317    0x31A
0066 16M    0x312    0x315    0x318    0x31B
0067 ====== =======  =======  ======== =========
0068 
0069 To enable one of those modes you have to specify "vga=ask" in the
0070 lilo.conf file and rerun LILO. Then you can type in the desired
0071 mode at the "vga=ask" prompt. For example if you like to use
0072 1024x768x256 colors you have to say "305" at this prompt.
0073 
0074 If this does not work, this might be because your BIOS does not support
0075 linear framebuffers or because it does not support this mode at all.
0076 Even if your board does, it might be the BIOS which does not.  VESA BIOS
0077 Extensions v2.0 are required, 1.2 is NOT sufficient.  You will get a
0078 "bad mode number" message if something goes wrong.
0079 
0080 1. Note: LILO cannot handle hex, for booting directly with
0081    "vga=mode-number" you have to transform the numbers to decimal.
0082 2. Note: Some newer versions of LILO appear to work with those hex values,
0083    if you set the 0x in front of the numbers.
0084 
0085 X11
0086 ===
0087 
0088 XF68_FBDev should work just fine, but it is non-accelerated.  Running
0089 another (accelerated) X-Server like XF86_SVGA might or might not work.
0090 It depends on X-Server and graphics board.
0091 
0092 The X-Server must restore the video mode correctly, else you end up
0093 with a broken console (and vesafb cannot do anything about this).
0094 
0095 
0096 Refresh rates
0097 =============
0098 
0099 There is no way to change the vesafb video mode and/or timings after
0100 booting linux.  If you are not happy with the 60 Hz refresh rate, you
0101 have these options:
0102 
0103  * configure and load the DOS-Tools for the graphics board (if
0104    available) and boot linux with loadlin.
0105  * use a native driver (matroxfb/atyfb) instead if vesafb.  If none
0106    is available, write a new one!
0107  * VBE 3.0 might work too.  I have neither a gfx board with VBE 3.0
0108    support nor the specs, so I have not checked this yet.
0109 
0110 
0111 Configuration
0112 =============
0113 
0114 The VESA BIOS provides protected mode interface for changing
0115 some parameters.  vesafb can use it for palette changes and
0116 to pan the display.  It is turned off by default because it
0117 seems not to work with some BIOS versions, but there are options
0118 to turn it on.
0119 
0120 You can pass options to vesafb using "video=vesafb:option" on
0121 the kernel command line.  Multiple options should be separated
0122 by comma, like this: "video=vesafb:ypan,inverse"
0123 
0124 Accepted options:
0125 
0126 inverse use inverse color map
0127 
0128 ========= ======================================================================
0129 ypan      enable display panning using the VESA protected mode
0130           interface.  The visible screen is just a window of the
0131           video memory, console scrolling is done by changing the
0132           start of the window.
0133 
0134           pro:
0135 
0136                 * scrolling (fullscreen) is fast, because there is
0137                   no need to copy around data.
0138 
0139           kontra:
0140 
0141                 * scrolling only parts of the screen causes some
0142                   ugly flicker effects (boot logo flickers for
0143                   example).
0144 
0145 ywrap     Same as ypan, but assumes your gfx board can wrap-around
0146           the video memory (i.e. starts reading from top if it
0147           reaches the end of video memory).  Faster than ypan.
0148 
0149 redraw    Scroll by redrawing the affected part of the screen, this
0150           is the safe (and slow) default.
0151 
0152 
0153 vgapal    Use the standard vga registers for palette changes.
0154           This is the default.
0155 pmipal    Use the protected mode interface for palette changes.
0156 
0157 mtrr:n    Setup memory type range registers for the vesafb framebuffer
0158           where n:
0159 
0160               - 0 - disabled (equivalent to nomtrr) (default)
0161               - 1 - uncachable
0162               - 2 - write-back
0163               - 3 - write-combining
0164               - 4 - write-through
0165 
0166           If you see the following in dmesg, choose the type that matches the
0167           old one. In this example, use "mtrr:2".
0168 ...
0169 mtrr:     type mismatch for e0000000,8000000 old: write-back new:
0170           write-combining
0171 ...
0172 
0173 nomtrr    disable mtrr
0174 
0175 vremap:n
0176           Remap 'n' MiB of video RAM. If 0 or not specified, remap memory
0177           according to video mode. (2.5.66 patch/idea by Antonino Daplas
0178           reversed to give override possibility (allocate more fb memory
0179           than the kernel would) to 2.4 by tmb@iki.fi)
0180 
0181 vtotal:n  If the video BIOS of your card incorrectly determines the total
0182           amount of video RAM, use this option to override the BIOS (in MiB).
0183 ========= ======================================================================
0184 
0185 Have fun!
0186 
0187 Gerd Knorr <kraxel@goldbach.in-berlin.de>
0188 
0189 Minor (mostly typo) changes
0190 by Nico Schmoigl <schmoigl@rumms.uni-mannheim.de>