usage 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. CyBlaFB is a framebuffer driver for the Cyberblade/i1 graphics core integrated
  2. into the VIA Apollo PLE133 (aka vt8601) south bridge. It is developed and
  3. tested using a VIA EPIA 5000 board.
  4. Cyblafb - compiled into the kernel or as a module?
  5. ==================================================
  6. You might compile cyblafb either as a module or compile it permanently into the
  7. kernel.
  8. Unless you have a real reason to do so you should not compile both vesafb and
  9. cyblafb permanently into the kernel. It's possible and it helps during the
  10. developement cycle, but it's useless and will at least block some otherwise
  11. usefull memory for ordinary users.
  12. Selecting Modes
  13. ===============
  14. Startup Mode
  15. ============
  16. First of all, you might use the "vga=???" boot parameter as it is
  17. documented in vesafb.txt and svga.txt. Cyblafb will detect the video
  18. mode selected and will use the geometry and timings found by
  19. inspecting the hardware registers.
  20. video=cyblafb vga=0x317
  21. Alternatively you might use a combination of the mode, ref and bpp
  22. parameters. If you compiled the driver into the kernel, add something
  23. like this to the kernel command line:
  24. video=cyblafb:1280x1024,bpp=16,ref=50 ...
  25. If you compiled the driver as a module, the same mode would be
  26. selected by the following command:
  27. modprobe cyblafb mode=1280x1024 bpp=16 ref=50 ...
  28. None of the modes possible to select as startup modes are affected by
  29. the problems described at the end of the next subsection.
  30. For all startup modes cyblafb chooses a virtual x resolution of 2048,
  31. the only exception is mode 1280x1024 in combination with 32 bpp. This
  32. allows ywrap scrolling for all those modes if rotation is 0 or 2, and
  33. also fast scrolling if rotation is 1 or 3. The default virtual y reso-
  34. lution is 4096 for bpp == 8, 2048 for bpp==16 and 1024 for bpp == 32,
  35. again with the only exception of 1280x1024 at 32 bpp.
  36. Please do set your video memory size to 8 Mb in the Bios setup. Other
  37. values will work, but performace is decreased for a lot of modes.
  38. Mode changes using fbset
  39. ========================
  40. You might use fbset to change the video mode, see "man fbset". Cyblafb
  41. generally does assume that you know what you are doing. But it does
  42. some checks, especially those that are needed to prevent you from
  43. damaging your hardware.
  44. - only 8, 16, 24 and 32 bpp video modes are accepted
  45. - interlaced video modes are not accepted
  46. - double scan video modes are not accepted
  47. - if a flat panel is found, cyblafb does not allow you
  48. to program a resolution higher than the physical
  49. resolution of the flat panel monitor
  50. - cyblafb does not allow vclk to exceed 230 MHz. As 32 bpp
  51. and (currently) 24 bit modes use a doubled vclk internally,
  52. the dotclock limit as seen by fbset is 115 MHz for those
  53. modes and 230 MHz for 8 and 16 bpp modes.
  54. - cyblafb will allow you to select very high resolutions as
  55. long as the hardware can be programmed to these modes. The
  56. documented limit 1600x1200 is not enforced, but don't expect
  57. perfect signal quality.
  58. Any request that violates the rules given above will be either changed
  59. to something the hardware supports or an error value will be returned.
  60. If you program a virtual y resolution higher than the hardware limit,
  61. cyblafb will silently decrease that value to the highest possible
  62. value. The same is true for a virtual x resolution that is not
  63. supported by the hardware. Cyblafb tries to adapt vyres first because
  64. vxres decides if ywrap scrolling is possible or not.
  65. Attempts to disable acceleration are ignored, I believe that this is
  66. safe.
  67. Some video modes that should work do not work as expected. If you use
  68. the standard fb.modes, fbset 640x480-60 will program that mode, but
  69. you will see a vertical area, about two characters wide, with only
  70. much darker characters than the other characters on the screen.
  71. Cyblafb does allow that mode to be set, as it does not violate the
  72. official specifications. It would need a lot of code to reliably sort
  73. out all invalid modes, playing around with the margin values will
  74. give a valid mode quickly. And if cyblafb would detect such an invalid
  75. mode, should it silently alter the requested values or should it
  76. report an error? Both options have some pros and cons. As stated
  77. above, none of the startup modes are affected, and if you set
  78. verbosity to 1 or higher, cyblafb will print the fbset command that
  79. would be needed to program that mode using fbset.
  80. Other Parameters
  81. ================
  82. crt don't autodetect, assume monitor connected to
  83. standard VGA connector
  84. fp don't autodetect, assume flat panel display
  85. connected to flat panel monitor interface
  86. nativex inform driver about native x resolution of
  87. flat panel monitor connected to special
  88. interface (should be autodetected)
  89. stretch stretch image to adapt low resolution modes to
  90. higer resolutions of flat panel monitors
  91. connected to special interface
  92. center center image to adapt low resolution modes to
  93. higer resolutions of flat panel monitors
  94. connected to special interface
  95. memsize use if autodetected memsize is wrong ...
  96. should never be necessary
  97. nopcirr disable PCI read retry
  98. nopciwr disable PCI write retry
  99. nopcirb disable PCI read bursts
  100. nopciwb disable PCI write bursts
  101. bpp bpp for specified modes
  102. valid values: 8 || 16 || 24 || 32
  103. ref refresh rate for specified mode
  104. valid values: 50 <= ref <= 85
  105. mode 640x480 or 800x600 or 1024x768 or 1280x1024
  106. if not specified, the startup mode will be detected
  107. and used, so you might also use the vga=??? parameter
  108. described in vesafb.txt. If you do not specify a mode,
  109. bpp and ref parameters are ignored.
  110. verbosity 0 is the default, increase to at least 2 for every
  111. bug report!
  112. Development hints
  113. =================
  114. It's much faster do compile a module and to load the new version after
  115. unloading the old module than to compile a new kernel and to reboot. So if you
  116. try to work on cyblafb, it might be a good idea to use cyblafb as a module.
  117. In real life, fast often means dangerous, and that's also the case here. If
  118. you introduce a serious bug when cyblafb is compiled into the kernel, the
  119. kernel will lock or oops with a high probability before the file system is
  120. mounted, and the danger for your data is low. If you load a broken own version
  121. of cyblafb on a running system, the danger for the integrity of the file
  122. system is much higher as you might need a hard reset afterwards. Decide
  123. yourself.
  124. Module unloading, the vfb method
  125. ================================
  126. If you want to unload/reload cyblafb using the virtual framebuffer, you need
  127. to enable vfb support in the kernel first. After that, load the modules as
  128. shown below:
  129. modprobe vfb vfb_enable=1
  130. modprobe fbcon
  131. modprobe cyblafb
  132. fbset -fb /dev/fb1 1280x1024-60 -vyres 2662
  133. con2fb /dev/fb1 /dev/tty1
  134. ...
  135. If you now made some changes to cyblafb and want to reload it, you might do it
  136. as show below:
  137. con2fb /dev/fb0 /dev/tty1
  138. ...
  139. rmmod cyblafb
  140. modprobe cyblafb
  141. con2fb /dev/fb1 /dev/tty1
  142. ...
  143. Of course, you might choose another mode, and most certainly you also want to
  144. map some other /dev/tty* to the real framebuffer device. You might also choose
  145. to compile fbcon as a kernel module or place it permanently in the kernel.
  146. I do not know of any way to unload fbcon, and fbcon will prevent the
  147. framebuffer device loaded first from unloading. [If there is a way, then
  148. please add a description here!]
  149. Module unloading, the vesafb method
  150. ===================================
  151. Configure the kernel:
  152. <*> Support for frame buffer devices
  153. [*] VESA VGA graphics support
  154. <M> Cyberblade/i1 support
  155. Add e.g. "video=vesafb:ypan vga=0x307" to the kernel parameters. The ypan
  156. parameter is important, choose any vga parameter you like as long as it is
  157. a graphics mode.
  158. After booting, load cyblafb without any mode and bpp parameter and assign
  159. cyblafb to individual ttys using con2fb, e.g.:
  160. modprobe cyblafb
  161. con2fb /dev/fb1 /dev/tty1
  162. Unloading cyblafb works without problems after you assign vesafb to all
  163. ttys again, e.g.:
  164. con2fb /dev/fb0 /dev/tty1
  165. rmmod cyblafb