vesafb.txt 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. What is vesafb?
  2. ===============
  3. This is a generic driver for a graphic framebuffer on intel boxes.
  4. The idea is simple: Turn on graphics mode at boot time with the help
  5. of the BIOS, and use this as framebuffer device /dev/fb0, like the m68k
  6. (and other) ports do.
  7. This means we decide at boot time whenever we want to run in text or
  8. graphics mode. Switching mode later on (in protected mode) is
  9. impossible; BIOS calls work in real mode only. VESA BIOS Extensions
  10. Version 2.0 are required, because we need a linear frame buffer.
  11. Advantages:
  12. * It provides a nice large console (128 cols + 48 lines with 1024x768)
  13. without using tiny, unreadable fonts.
  14. * You can run XF68_FBDev on top of /dev/fb0 (=> non-accelerated X11
  15. support for every VBE 2.0 compliant graphics board).
  16. * Most important: boot logo :-)
  17. Disadvantages:
  18. * graphic mode is slower than text mode...
  19. How to use it?
  20. ==============
  21. Switching modes is done using the vga=... boot parameter. Read
  22. Documentation/svga.txt for details.
  23. You should compile in both vgacon (for text mode) and vesafb (for
  24. graphics mode). Which of them takes over the console depends on
  25. whenever the specified mode is text or graphics.
  26. The graphic modes are NOT in the list which you get if you boot with
  27. vga=ask and hit return. The mode you wish to use is derived from the
  28. VESA mode number. Here are those VESA mode numbers:
  29. | 640x480 800x600 1024x768 1280x1024
  30. ----+-------------------------------------
  31. 256 | 0x101 0x103 0x105 0x107
  32. 32k | 0x110 0x113 0x116 0x119
  33. 64k | 0x111 0x114 0x117 0x11A
  34. 16M | 0x112 0x115 0x118 0x11B
  35. The video mode number of the Linux kernel is the VESA mode number plus
  36. 0x200.
  37. Linux_kernel_mode_number = VESA_mode_number + 0x200
  38. So the table for the Kernel mode numbers are:
  39. | 640x480 800x600 1024x768 1280x1024
  40. ----+-------------------------------------
  41. 256 | 0x301 0x303 0x305 0x307
  42. 32k | 0x310 0x313 0x316 0x319
  43. 64k | 0x311 0x314 0x317 0x31A
  44. 16M | 0x312 0x315 0x318 0x31B
  45. To enable one of those modes you have to specify "vga=ask" in the
  46. lilo.conf file and rerun LILO. Then you can type in the desired
  47. mode at the "vga=ask" prompt. For example if you like to use
  48. 1024x768x256 colors you have to say "305" at this prompt.
  49. If this does not work, this might be because your BIOS does not support
  50. linear framebuffers or because it does not support this mode at all.
  51. Even if your board does, it might be the BIOS which does not. VESA BIOS
  52. Extensions v2.0 are required, 1.2 is NOT sufficient. You will get a
  53. "bad mode number" message if something goes wrong.
  54. 1. Note: LILO cannot handle hex, for booting directly with
  55. "vga=mode-number" you have to transform the numbers to decimal.
  56. 2. Note: Some newer versions of LILO appear to work with those hex values,
  57. if you set the 0x in front of the numbers.
  58. X11
  59. ===
  60. XF68_FBDev should work just fine, but it is non-accelerated. Running
  61. another (accelerated) X-Server like XF86_SVGA might or might not work.
  62. It depends on X-Server and graphics board.
  63. The X-Server must restore the video mode correctly, else you end up
  64. with a broken console (and vesafb cannot do anything about this).
  65. Refresh rates
  66. =============
  67. There is no way to change the vesafb video mode and/or timings after
  68. booting linux. If you are not happy with the 60 Hz refresh rate, you
  69. have these options:
  70. * configure and load the DOS-Tools for the graphics board (if
  71. available) and boot linux with loadlin.
  72. * use a native driver (matroxfb/atyfb) instead if vesafb. If none
  73. is available, write a new one!
  74. * VBE 3.0 might work too. I have neither a gfx board with VBE 3.0
  75. support nor the specs, so I have not checked this yet.
  76. Configuration
  77. =============
  78. The VESA BIOS provides protected mode interface for changing
  79. some parameters. vesafb can use it for palette changes and
  80. to pan the display. It is turned off by default because it
  81. seems not to work with some BIOS versions, but there are options
  82. to turn it on.
  83. You can pass options to vesafb using "video=vesafb:option" on
  84. the kernel command line. Multiple options should be separated
  85. by comma, like this: "video=vesafb:ypan,invers"
  86. Accepted options:
  87. invers no comment...
  88. ypan enable display panning using the VESA protected mode
  89. interface. The visible screen is just a window of the
  90. video memory, console scrolling is done by changing the
  91. start of the window.
  92. pro: * scrolling (fullscreen) is fast, because there is
  93. no need to copy around data.
  94. * You'll get scrollback (the Shift-PgUp thing),
  95. the video memory can be used as scrollback buffer
  96. kontra: * scrolling only parts of the screen causes some
  97. ugly flicker effects (boot logo flickers for
  98. example).
  99. ywrap Same as ypan, but assumes your gfx board can wrap-around
  100. the video memory (i.e. starts reading from top if it
  101. reaches the end of video memory). Faster than ypan.
  102. redraw scroll by redrawing the affected part of the screen, this
  103. is the safe (and slow) default.
  104. vgapal Use the standard vga registers for palette changes.
  105. This is the default.
  106. pmipal Use the protected mode interface for palette changes.
  107. mtrr:n setup memory type range registers for the vesafb framebuffer
  108. where n:
  109. 0 - disabled (equivalent to nomtrr) (default)
  110. 1 - uncachable
  111. 2 - write-back
  112. 3 - write-combining
  113. 4 - write-through
  114. If you see the following in dmesg, choose the type that matches the
  115. old one. In this example, use "mtrr:2".
  116. ...
  117. mtrr: type mismatch for e0000000,8000000 old: write-back new: write-combining
  118. ...
  119. nomtrr disable mtrr
  120. vremap:n
  121. remap 'n' MiB of video RAM. If 0 or not specified, remap memory
  122. according to video mode. (2.5.66 patch/idea by Antonino Daplas
  123. reversed to give override possibility (allocate more fb memory
  124. than the kernel would) to 2.4 by tmb@iki.fi)
  125. vtotal:n
  126. if the video BIOS of your card incorrectly determines the total
  127. amount of video RAM, use this option to override the BIOS (in MiB).
  128. Have fun!
  129. Gerd
  130. --
  131. Gerd Knorr <kraxel@goldbach.in-berlin.de>
  132. Minor (mostly typo) changes
  133. by Nico Schmoigl <schmoigl@rumms.uni-mannheim.de>