viafb.rst 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. =======================================================
  2. VIA Integration Graphic Chip Console Framebuffer Driver
  3. =======================================================
  4. Platform
  5. --------
  6. The console framebuffer driver is for graphics chips of
  7. VIA UniChrome Family
  8. (CLE266, PM800 / CN400 / CN300,
  9. P4M800CE / P4M800Pro / CN700 / VN800,
  10. CX700 / VX700, K8M890, P4M890,
  11. CN896 / P4M900, VX800, VX855)
  12. Driver features
  13. ---------------
  14. Device: CRT, LCD, DVI
  15. Support viafb_mode::
  16. CRT:
  17. 640x480(60, 75, 85, 100, 120 Hz), 720x480(60 Hz),
  18. 720x576(60 Hz), 800x600(60, 75, 85, 100, 120 Hz),
  19. 848x480(60 Hz), 856x480(60 Hz), 1024x512(60 Hz),
  20. 1024x768(60, 75, 85, 100 Hz), 1152x864(75 Hz),
  21. 1280x768(60 Hz), 1280x960(60 Hz), 1280x1024(60, 75, 85 Hz),
  22. 1440x1050(60 Hz), 1600x1200(60, 75 Hz), 1280x720(60 Hz),
  23. 1920x1080(60 Hz), 1400x1050(60 Hz), 800x480(60 Hz)
  24. color depth: 8 bpp, 16 bpp, 32 bpp supports.
  25. Support 2D hardware accelerator.
  26. Using the viafb module
  27. ----------------------
  28. Start viafb with default settings::
  29. #modprobe viafb
  30. Start viafb with user options::
  31. #modprobe viafb viafb_mode=800x600 viafb_bpp=16 viafb_refresh=60
  32. viafb_active_dev=CRT+DVI viafb_dvi_port=DVP1
  33. viafb_mode1=1024x768 viafb_bpp=16 viafb_refresh1=60
  34. viafb_SAMM_ON=1
  35. viafb_mode:
  36. - 640x480 (default)
  37. - 720x480
  38. - 800x600
  39. - 1024x768
  40. viafb_bpp:
  41. - 8, 16, 32 (default:32)
  42. viafb_refresh:
  43. - 60, 75, 85, 100, 120 (default:60)
  44. viafb_lcd_dsp_method:
  45. - 0 : expansion (default)
  46. - 1 : centering
  47. viafb_lcd_mode:
  48. 0 : LCD panel with LSB data format input (default)
  49. 1 : LCD panel with MSB data format input
  50. viafb_lcd_panel_id:
  51. - 0 : Resolution: 640x480, Channel: single, Dithering: Enable
  52. - 1 : Resolution: 800x600, Channel: single, Dithering: Enable
  53. - 2 : Resolution: 1024x768, Channel: single, Dithering: Enable (default)
  54. - 3 : Resolution: 1280x768, Channel: single, Dithering: Enable
  55. - 4 : Resolution: 1280x1024, Channel: dual, Dithering: Enable
  56. - 5 : Resolution: 1400x1050, Channel: dual, Dithering: Enable
  57. - 6 : Resolution: 1600x1200, Channel: dual, Dithering: Enable
  58. - 8 : Resolution: 800x480, Channel: single, Dithering: Enable
  59. - 9 : Resolution: 1024x768, Channel: dual, Dithering: Enable
  60. - 10: Resolution: 1024x768, Channel: single, Dithering: Disable
  61. - 11: Resolution: 1024x768, Channel: dual, Dithering: Disable
  62. - 12: Resolution: 1280x768, Channel: single, Dithering: Disable
  63. - 13: Resolution: 1280x1024, Channel: dual, Dithering: Disable
  64. - 14: Resolution: 1400x1050, Channel: dual, Dithering: Disable
  65. - 15: Resolution: 1600x1200, Channel: dual, Dithering: Disable
  66. - 16: Resolution: 1366x768, Channel: single, Dithering: Disable
  67. - 17: Resolution: 1024x600, Channel: single, Dithering: Enable
  68. - 18: Resolution: 1280x768, Channel: dual, Dithering: Enable
  69. - 19: Resolution: 1280x800, Channel: single, Dithering: Enable
  70. viafb_accel:
  71. - 0 : No 2D Hardware Acceleration
  72. - 1 : 2D Hardware Acceleration (default)
  73. viafb_SAMM_ON:
  74. - 0 : viafb_SAMM_ON disable (default)
  75. - 1 : viafb_SAMM_ON enable
  76. viafb_mode1: (secondary display device)
  77. - 640x480 (default)
  78. - 720x480
  79. - 800x600
  80. - 1024x768
  81. viafb_bpp1: (secondary display device)
  82. - 8, 16, 32 (default:32)
  83. viafb_refresh1: (secondary display device)
  84. - 60, 75, 85, 100, 120 (default:60)
  85. viafb_active_dev:
  86. This option is used to specify active devices.(CRT, DVI, CRT+LCD...)
  87. DVI stands for DVI or HDMI, E.g., If you want to enable HDMI,
  88. set viafb_active_dev=DVI. In SAMM case, the previous of
  89. viafb_active_dev is primary device, and the following is
  90. secondary device.
  91. For example:
  92. To enable one device, such as DVI only, we can use::
  93. modprobe viafb viafb_active_dev=DVI
  94. To enable two devices, such as CRT+DVI::
  95. modprobe viafb viafb_active_dev=CRT+DVI;
  96. For DuoView case, we can use::
  97. modprobe viafb viafb_active_dev=CRT+DVI
  98. OR::
  99. modprobe viafb viafb_active_dev=DVI+CRT...
  100. For SAMM case:
  101. If CRT is primary and DVI is secondary, we should use::
  102. modprobe viafb viafb_active_dev=CRT+DVI viafb_SAMM_ON=1...
  103. If DVI is primary and CRT is secondary, we should use::
  104. modprobe viafb viafb_active_dev=DVI+CRT viafb_SAMM_ON=1...
  105. viafb_display_hardware_layout:
  106. This option is used to specify display hardware layout for CX700 chip.
  107. - 1 : LCD only
  108. - 2 : DVI only
  109. - 3 : LCD+DVI (default)
  110. - 4 : LCD1+LCD2 (internal + internal)
  111. - 16: LCD1+ExternalLCD2 (internal + external)
  112. viafb_second_size:
  113. This option is used to set second device memory size(MB) in SAMM case.
  114. The minimal size is 16.
  115. viafb_platform_epia_dvi:
  116. This option is used to enable DVI on EPIA - M
  117. - 0 : No DVI on EPIA - M (default)
  118. - 1 : DVI on EPIA - M
  119. viafb_bus_width:
  120. When using 24 - Bit Bus Width Digital Interface,
  121. this option should be set.
  122. - 12: 12-Bit LVDS or 12-Bit TMDS (default)
  123. - 24: 24-Bit LVDS or 24-Bit TMDS
  124. viafb_device_lcd_dualedge:
  125. When using Dual Edge Panel, this option should be set.
  126. - 0 : No Dual Edge Panel (default)
  127. - 1 : Dual Edge Panel
  128. viafb_lcd_port:
  129. This option is used to specify LCD output port,
  130. available values are "DVP0" "DVP1" "DFP_HIGHLOW" "DFP_HIGH" "DFP_LOW".
  131. for external LCD + external DVI on CX700(External LCD is on DVP0),
  132. we should use::
  133. modprobe viafb viafb_lcd_port=DVP0...
  134. Notes:
  135. 1. CRT may not display properly for DuoView CRT & DVI display at
  136. the "640x480" PAL mode with DVI overscan enabled.
  137. 2. SAMM stands for single adapter multi monitors. It is different from
  138. multi-head since SAMM support multi monitor at driver layers, thus fbcon
  139. layer doesn't even know about it; SAMM's second screen doesn't have a
  140. device node file, thus a user mode application can't access it directly.
  141. When SAMM is enabled, viafb_mode and viafb_mode1, viafb_bpp and
  142. viafb_bpp1, viafb_refresh and viafb_refresh1 can be different.
  143. 3. When console is depending on viafbinfo1, dynamically change resolution
  144. and bpp, need to call VIAFB specified ioctl interface VIAFB_SET_DEVICE
  145. instead of calling common ioctl function FBIOPUT_VSCREENINFO since
  146. viafb doesn't support multi-head well, or it will cause screen crush.
  147. Configure viafb with "fbset" tool
  148. ---------------------------------
  149. "fbset" is an inbox utility of Linux.
  150. 1. Inquire current viafb information, type::
  151. # fbset -i
  152. 2. Set various resolutions and viafb_refresh rates::
  153. # fbset <resolution-vertical_sync>
  154. example::
  155. # fbset "1024x768-75"
  156. or::
  157. # fbset -g 1024 768 1024 768 32
  158. Check the file "/etc/fb.modes" to find display modes available.
  159. 3. Set the color depth::
  160. # fbset -depth <value>
  161. example::
  162. # fbset -depth 16
  163. Configure viafb via /proc
  164. -------------------------
  165. The following files exist in /proc/viafb
  166. supported_output_devices
  167. This read-only file contains a full ',' separated list containing all
  168. output devices that could be available on your platform. It is likely
  169. that not all of those have a connector on your hardware but it should
  170. provide a good starting point to figure out which of those names match
  171. a real connector.
  172. Example::
  173. # cat /proc/viafb/supported_output_devices
  174. iga1/output_devices, iga2/output_devices
  175. These two files are readable and writable. iga1 and iga2 are the two
  176. independent units that produce the screen image. Those images can be
  177. forwarded to one or more output devices. Reading those files is a way
  178. to query which output devices are currently used by an iga.
  179. Example::
  180. # cat /proc/viafb/iga1/output_devices
  181. If there are no output devices printed the output of this iga is lost.
  182. This can happen for example if only one (the other) iga is used.
  183. Writing to these files allows adjusting the output devices during
  184. runtime. One can add new devices, remove existing ones or switch
  185. between igas. Essentially you can write a ',' separated list of device
  186. names (or a single one) in the same format as the output to those
  187. files. You can add a '+' or '-' as a prefix allowing simple addition
  188. and removal of devices. So a prefix '+' adds the devices from your list
  189. to the already existing ones, '-' removes the listed devices from the
  190. existing ones and if no prefix is given it replaces all existing ones
  191. with the listed ones. If you remove devices they are expected to turn
  192. off. If you add devices that are already part of the other iga they are
  193. removed there and added to the new one.
  194. Examples:
  195. Add CRT as output device to iga1::
  196. # echo +CRT > /proc/viafb/iga1/output_devices
  197. Remove (turn off) DVP1 and LVDS1 as output devices of iga2::
  198. # echo -DVP1,LVDS1 > /proc/viafb/iga2/output_devices
  199. Replace all iga1 output devices by CRT::
  200. # echo CRT > /proc/viafb/iga1/output_devices
  201. Bootup with viafb
  202. -----------------
  203. Add the following line to your grub.conf::
  204. append = "video=viafb:viafb_mode=1024x768,viafb_bpp=32,viafb_refresh=85"
  205. VIA Framebuffer modes
  206. =====================
  207. .. include:: viafb.modes
  208. :literal: