vga 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. .TH VGA 3
  2. .SH NAME
  3. vga \- VGA controller device
  4. .SH SYNOPSIS
  5. .nf
  6. .B bind #v /dev
  7. .B /dev/vgactl
  8. .B /dev/vgaovlctl
  9. .B /dev/vgaovl
  10. .fi
  11. .SH DESCRIPTION
  12. The VGA device allows configuration of a graphics controller
  13. on a PC.
  14. .B Vgactl
  15. allows control over higher-level settings such as display height, width, depth,
  16. controller and hardware-cursor type.
  17. Along with the I/O-port registers
  18. provided by
  19. .IR arch (3),
  20. it is used to implement configuration and setup of VGA controller cards.
  21. This is usually performed by
  22. .IR vga (8).
  23. .PP
  24. Writing strings to
  25. .B vgactl
  26. configures the VGA device.
  27. The following are valid commands.
  28. .TP
  29. .BI size " X" x Y x "Z chan"
  30. Set the size of the screen image to be
  31. .I X
  32. pixels wide
  33. and
  34. .I Y
  35. pixels high.
  36. Each pixel is
  37. .I Z
  38. bits as specified by
  39. .IR chan ,
  40. whose format is described in
  41. .IR image (6).
  42. .TP
  43. .BI actualsize " X" x Y
  44. Set the physical size of the display to be
  45. .I X
  46. pixels wide by
  47. .I Y
  48. pixels high.
  49. This message is optional;
  50. it is used to implement panning and to accommodate
  51. displays that require the in-memory screen image
  52. to have certain alignment properties.
  53. For example, a 1400x1050 screen with a 1408x1050 in-memory image
  54. will use
  55. .B "size 1408x1050
  56. but
  57. .BR "actualsize 1400x1050" .
  58. .TP
  59. .BI panning " mode"
  60. Depending on whether
  61. .I mode
  62. is
  63. .B on
  64. or
  65. .BR off ,
  66. enable or disable panning in a virtual screen.
  67. If panning is on and the screen's
  68. .B size
  69. is larger than its
  70. .BR actualsize ,
  71. the displayed portion of the screen will pan to follow the mouse.
  72. Setting the panning mode after the first attach of the
  73. .B #i
  74. driver has no effect.
  75. .TP
  76. .BI type " ctlr"
  77. Set the type of VGA controller being used.
  78. .I Ctlr
  79. is one of
  80. .BR ark200pv ,
  81. .BR clgd542x ,
  82. .BR clgd546x ,
  83. .BR ct65545 ,
  84. .BR cyber938x ,
  85. .BR hiqvideo ,
  86. .BR mach64xx ,
  87. .BR mga2164w ,
  88. .BR neomagic ,
  89. .BR s3 ,
  90. and
  91. .BR t2r4 .
  92. .IP
  93. Note that this list does not indicate the full set of VGA chips
  94. supported. For example,
  95. .B s3
  96. includes the 86C801/5, 86C928, Vision864, and Vision964.
  97. It is the job of
  98. .IR vga (8)
  99. to recognize which particular chip is being used and to initialize it
  100. appropriately.
  101. .TP
  102. .BI hwgc " gc"
  103. Set the type of hardware graphics cursor being used.
  104. .I Gc
  105. is one of
  106. .BR ark200pvhwgc ,
  107. .BR bt485hwgc ,
  108. .BR clgd542xhwgc ,
  109. .BR clgd546xhwgc ,
  110. .BR ct65545hwgc ,
  111. .BR cyber938xhwgc ,
  112. .BR hiqvideohwgc ,
  113. .BR mach64xxhwgc ,
  114. .BR mga2164whwgc ,
  115. .BR neomagichwgc ,
  116. .BR rgb524hwgc ,
  117. .BR s3hwgc ,
  118. .BR t2r4hwgc ,
  119. .BR tvp3020hwgc ,
  120. and
  121. .BR tvp3026hwgc .
  122. A value of
  123. .B off
  124. disables the cursor.
  125. There is no software cursor.
  126. .TP
  127. .BI palettedepth " d"
  128. Set the number of bits of precision used by the
  129. VGA palette to
  130. .IR d ,
  131. which must be either
  132. .B 6
  133. or
  134. .BR 8 .
  135. .TP
  136. .B blank
  137. Blank the screen.
  138. This consists of setting the hardware
  139. color map to all black as well as, on some controllers, setting the
  140. VGA hsync and vsync signals so as to turn off
  141. VESA DPMS-compliant monitors.
  142. The screen also blanks after 30 minutes of inactivity.
  143. The screen can be unblanked by moving the mouse.
  144. .TP
  145. .BI blanktime " minutes"
  146. Set the timeout before the
  147. screen blanks; the default is 30 minutes.
  148. If
  149. .I minutes
  150. is zero, blanking is disabled.
  151. .TP
  152. .BI hwaccel " mode"
  153. Depending on whether
  154. .I mode
  155. is
  156. .B on
  157. or
  158. .BR off ,
  159. enable or disable whether hardware acceleration
  160. (currently for rectangle filling and moving)
  161. used by the graphics engine.
  162. The default setting is
  163. .BR on .
  164. .TP
  165. .BI hwblank " mode"
  166. Depending on whether
  167. .I mode
  168. is
  169. .B on
  170. or
  171. .BR off ,
  172. enable or disable the use of DPMS blanking
  173. (see
  174. .B blank
  175. above).
  176. .TP
  177. .BI linear " size align"
  178. Use a linear screen aperture of size
  179. .I size
  180. aligned on an
  181. .IR align -byte
  182. boundary.
  183. .TP
  184. .B drawinit
  185. Initialize the graphics hardware.
  186. This must be sent after setting the
  187. .BR type .
  188. .PP
  189. Reading
  190. .B vgactl
  191. returns the current settings, one per line.
  192. .PP
  193. Some VGA cards support overlay graphics.
  194. Writing strings to
  195. .B vgaovlctl
  196. configures such cards.
  197. The following are valid overlay control commands:
  198. .TP
  199. .BI openctl
  200. opens the overlay device.
  201. .TP
  202. .BI configure " w h format"
  203. allocates resources inside the driver to support an overlay area
  204. of width
  205. .I w
  206. and height
  207. .I h
  208. pixels. Currently, the only supported
  209. .I format
  210. is
  211. .B YUYV
  212. packed.
  213. In
  214. .B YUYV
  215. two pixels are encoded by their separate Y values
  216. and their combined U and V values.
  217. The size of the two pixels is 32 bits.
  218. .TP
  219. .BI enable " x y w h"
  220. enables drawing data on the display through the overlay mode. The data
  221. is drawn at position
  222. .IR x , y
  223. and has a width and height of
  224. .IR w , h
  225. respectively.
  226. .TP
  227. .BI closectl
  228. terminates overlay control.
  229. .PP
  230. Overlay data can be written to
  231. .BR vgaovl .
  232. .SH EXAMPLES
  233. The following disables hardware acceleration.
  234. .IP
  235. .EX
  236. echo hwaccel off > /dev/vgactl
  237. .EE
  238. .SH SOURCE
  239. .B /sys/src/9/pc/devvga.c
  240. .SH SEE ALSO
  241. .IR arch (3),
  242. .IR vga (8)
  243. .SH BUGS
  244. The hardware graphics cursor on the
  245. .B et4000
  246. does not work in 2x8-bit mode.