1
0

vga 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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 s3 ,
  95. and
  96. .BR t2r4 .
  97. .IP
  98. Note that this list does not indicate the full set of VGA chips
  99. supported. For example,
  100. .B s3
  101. includes the 86C801/5, 86C928, Vision864, and Vision964.
  102. It is the job of
  103. .IR vga (8)
  104. to recognize which particular chip is being used and to initialize it
  105. appropriately.
  106. .TP
  107. .BI hwgc " gc"
  108. Set the type of hardware graphics cursor being used.
  109. .I Gc
  110. is one of
  111. .BR ark200pvhwgc ,
  112. .BR bt485hwgc ,
  113. .BR clgd542xhwgc ,
  114. .BR clgd546xhwgc ,
  115. .BR ct65545hwgc ,
  116. .BR cyber938xhwgc ,
  117. .BR hiqvideohwgc ,
  118. .BR mach64xxhwgc ,
  119. .BR mga2164whwgc ,
  120. .BR neomagichwgc ,
  121. .BR rgb524hwgc ,
  122. .BR s3hwgc ,
  123. .BR t2r4hwgc ,
  124. .BR tvp3020hwgc ,
  125. and
  126. .BR tvp3026hwgc .
  127. A value of
  128. .B off
  129. disables the cursor.
  130. There is no software cursor.
  131. .TP
  132. .BI palettedepth " d"
  133. Set the number of bits of precision used by the
  134. VGA palette to
  135. .IR d ,
  136. which must be either
  137. .B 6
  138. or
  139. .BR 8 .
  140. .TP
  141. .B blank
  142. Blank the screen.
  143. This consists of setting the hardware
  144. color map to all black as well as, on some controllers, setting the
  145. VGA hsync and vsync signals so as to turn off
  146. VESA DPMS-compliant monitors.
  147. The screen also blanks after 30 minutes of inactivity.
  148. The screen can be unblanked by moving the mouse.
  149. .TP
  150. .BI blanktime " minutes"
  151. Set the timeout before the
  152. screen blanks; the default is 30 minutes.
  153. If
  154. .I minutes
  155. is zero, blanking is disabled.
  156. .TP
  157. .BI hwaccel " mode"
  158. Depending on whether
  159. .I mode
  160. is
  161. .B on
  162. or
  163. .BR off ,
  164. enable or disable whether hardware acceleration
  165. (currently for rectangle filling and moving)
  166. used by the graphics engine.
  167. The default setting is
  168. .BR on .
  169. .TP
  170. .BI hwblank " mode"
  171. Depending on whether
  172. .I mode
  173. is
  174. .B on
  175. or
  176. .BR off ,
  177. enable or disable the use of DPMS blanking
  178. (see
  179. .B blank
  180. above).
  181. .TP
  182. .BI linear " size align"
  183. Use a linear screen aperture of size
  184. .I size
  185. aligned on an
  186. .IR align -byte
  187. boundary.
  188. .TP
  189. .B drawinit
  190. Initialize the graphics hardware.
  191. This must be sent after setting the
  192. .BR type .
  193. .PP
  194. Reading
  195. .B vgactl
  196. returns the current settings, one per line.
  197. .PP
  198. Some VGA cards support overlay graphics.
  199. Writing strings to
  200. .B vgaovlctl
  201. configures such cards.
  202. The following are valid overlay control commands:
  203. .TP
  204. .BI openctl
  205. opens the overlay device.
  206. .TP
  207. .BI configure " w h format"
  208. allocates resources inside the driver to support an overlay area
  209. of width
  210. .I w
  211. and height
  212. .I h
  213. pixels. Currently, the only supported
  214. .I format
  215. is
  216. .B YUYV
  217. packed.
  218. In
  219. .B YUYV
  220. two pixels are encoded by their separate Y values
  221. and their combined U and V values.
  222. The size of the two pixels is 32 bits.
  223. .TP
  224. .BI enable " x y w h"
  225. enables drawing data on the display through the overlay mode. The data
  226. is drawn at position
  227. .IR x , y
  228. and has a width and height of
  229. .IR w , h
  230. respectively.
  231. .TP
  232. .BI closectl
  233. terminates overlay control.
  234. .PP
  235. Overlay data can be written to
  236. .BR vgaovl .
  237. .SH EXAMPLES
  238. The following disables hardware acceleration.
  239. .IP
  240. .EX
  241. echo hwaccel off > /dev/vgactl
  242. .EE
  243. .SH SOURCE
  244. .B /sys/src/9/pc/devvga.c
  245. .SH SEE ALSO
  246. .IR arch (3),
  247. .IR vga (8)
  248. .SH BUGS
  249. The hardware graphics cursor on the
  250. .B et4000
  251. does not work in 2x8-bit mode.