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