brintos

brintos / linux-shallow public Read only

0
0
Text · 6.5 KiB · f890a4f Raw
191 lines · plain
1===============2What is vesafb?3===============4 5This is a generic driver for a graphic framebuffer on intel boxes.6 7The idea is simple:  Turn on graphics mode at boot time with the help8of the BIOS, and use this as framebuffer device /dev/fb0, like the m68k9(and other) ports do.10 11This means we decide at boot time whenever we want to run in text or12graphics mode.  Switching mode later on (in protected mode) is13impossible; BIOS calls work in real mode only.  VESA BIOS Extensions14Version 2.0 are required, because we need a linear frame buffer.15 16Advantages:17 18 * It provides a nice large console (128 cols + 48 lines with 1024x768)19   without using tiny, unreadable fonts.20 * You can run XF68_FBDev on top of /dev/fb0 (=> non-accelerated X1121   support for every VBE 2.0 compliant graphics board).22 * Most important: boot logo :-)23 24Disadvantages:25 26 * graphic mode is slower than text mode...27 28 29How to use it?30==============31 32Switching modes is done using the vga=... boot parameter.  Read33Documentation/admin-guide/svga.rst for details.34 35You should compile in both vgacon (for text mode) and vesafb (for36graphics mode). Which of them takes over the console depends on37whenever the specified mode is text or graphics.38 39The graphic modes are NOT in the list which you get if you boot with40vga=ask and hit return. The mode you wish to use is derived from the41VESA mode number. Here are those VESA mode numbers:42 43====== =======  =======  ======== =========44colors 640x480  800x600  1024x768 1280x102445====== =======  =======  ======== =========46256    0x101    0x103    0x105    0x1074732k    0x110    0x113    0x116    0x1194864k    0x111    0x114    0x117    0x11A4916M    0x112    0x115    0x118    0x11B50====== =======  =======  ======== =========51 52 53The video mode number of the Linux kernel is the VESA mode number plus540x200:55 56 Linux_kernel_mode_number = VESA_mode_number + 0x20057 58So the table for the Kernel mode numbers are:59 60====== =======  =======  ======== =========61colors 640x480  800x600  1024x768 1280x102462====== =======  =======  ======== =========63256    0x301    0x303    0x305    0x3076432k    0x310    0x313    0x316    0x3196564k    0x311    0x314    0x317    0x31A6616M    0x312    0x315    0x318    0x31B67====== =======  =======  ======== =========68 69To enable one of those modes you have to specify "vga=ask" in the70lilo.conf file and rerun LILO. Then you can type in the desired71mode at the "vga=ask" prompt. For example if you like to use721024x768x256 colors you have to say "305" at this prompt.73 74If this does not work, this might be because your BIOS does not support75linear framebuffers or because it does not support this mode at all.76Even if your board does, it might be the BIOS which does not.  VESA BIOS77Extensions v2.0 are required, 1.2 is NOT sufficient.  You will get a78"bad mode number" message if something goes wrong.79 801. Note: LILO cannot handle hex, for booting directly with81   "vga=mode-number" you have to transform the numbers to decimal.822. Note: Some newer versions of LILO appear to work with those hex values,83   if you set the 0x in front of the numbers.84 85X1186===87 88XF68_FBDev should work just fine, but it is non-accelerated.  Running89another (accelerated) X-Server like XF86_SVGA might or might not work.90It depends on X-Server and graphics board.91 92The X-Server must restore the video mode correctly, else you end up93with a broken console (and vesafb cannot do anything about this).94 95 96Refresh rates97=============98 99There is no way to change the vesafb video mode and/or timings after100booting linux.  If you are not happy with the 60 Hz refresh rate, you101have these options:102 103 * configure and load the DOS-Tools for the graphics board (if104   available) and boot linux with loadlin.105 * use a native driver (matroxfb/atyfb) instead if vesafb.  If none106   is available, write a new one!107 * VBE 3.0 might work too.  I have neither a gfx board with VBE 3.0108   support nor the specs, so I have not checked this yet.109 110 111Configuration112=============113 114The VESA BIOS provides protected mode interface for changing115some parameters.  vesafb can use it for palette changes and116to pan the display.  It is turned off by default because it117seems not to work with some BIOS versions, but there are options118to turn it on.119 120You can pass options to vesafb using "video=vesafb:option" on121the kernel command line.  Multiple options should be separated122by comma, like this: "video=vesafb:ypan,inverse"123 124Accepted options:125 126inverse	use inverse color map127 128========= ======================================================================129ypan	  enable display panning using the VESA protected mode130          interface.  The visible screen is just a window of the131          video memory, console scrolling is done by changing the132          start of the window.133 134          pro:135 136                * scrolling (fullscreen) is fast, because there is137		  no need to copy around data.138 139          kontra:140 141		* scrolling only parts of the screen causes some142		  ugly flicker effects (boot logo flickers for143		  example).144 145ywrap	  Same as ypan, but assumes your gfx board can wrap-around146          the video memory (i.e. starts reading from top if it147          reaches the end of video memory).  Faster than ypan.148 149redraw	  Scroll by redrawing the affected part of the screen, this150          is the safe (and slow) default.151 152 153vgapal	  Use the standard vga registers for palette changes.154          This is the default.155pmipal    Use the protected mode interface for palette changes.156 157mtrr:n	  Setup memory type range registers for the vesafb framebuffer158          where n:159 160              - 0 - disabled (equivalent to nomtrr) (default)161              - 1 - uncachable162              - 2 - write-back163              - 3 - write-combining164              - 4 - write-through165 166          If you see the following in dmesg, choose the type that matches the167          old one. In this example, use "mtrr:2".168...169mtrr:     type mismatch for e0000000,8000000 old: write-back new:170	  write-combining171...172 173nomtrr    disable mtrr174 175vremap:n176          Remap 'n' MiB of video RAM. If 0 or not specified, remap memory177          according to video mode. (2.5.66 patch/idea by Antonino Daplas178          reversed to give override possibility (allocate more fb memory179          than the kernel would) to 2.4 by tmb@iki.fi)180 181vtotal:n  If the video BIOS of your card incorrectly determines the total182          amount of video RAM, use this option to override the BIOS (in MiB).183========= ======================================================================184 185Have fun!186 187Gerd Knorr <kraxel@goldbach.in-berlin.de>188 189Minor (mostly typo) changes190by Nico Schmoigl <schmoigl@rumms.uni-mannheim.de>191