1
0

vga 4.9 KB

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