]> git.lizzy.rs Git - plan9front.git/blob - sys/man/3/vga
ssh: document thumbfile options
[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 3dfx ,
87 .BR ark200pv ,
88 .BR clgd542x ,
89 .BR clgd546x ,
90 .BR ct65545 ,
91 .BR cyber938x ,
92 .BR et4000 ,
93 .BR geode ,
94 .BR hiqvideo ,
95 .BR i81x ,
96 .BR igfx ,
97 .BR mach64xx ,
98 .BR mga2164w ,
99 .BR mga4xx ,
100 .BR neomagic ,
101 .BR nvidia ,
102 .BR radeon ,
103 .BR s3 ,
104 .BR t2r4
105 and
106 .BR vmware .
107 .IP
108 Note that this list does not indicate the full set of VGA chips
109 supported. For example,
110 .B s3
111 includes the 86C801/5, 86C928, Vision864, and Vision964.
112 It is the job of
113 .IR vga (8)
114 to recognize which particular chip is being used and to initialize it
115 appropriately.
116 .TP
117 .BI hwgc " gc"
118 Set the type of hardware graphics cursor being used.
119 .I Gc
120 is one of
121 .BR soft ,
122 .BR 3dfxhwgc ,
123 .BR ark200pvhwgc ,
124 .BR bt485hwgc ,
125 .BR clgd542xhwgc ,
126 .BR clgd546xhwgc ,
127 .BR ct65545hwgc ,
128 .BR cyber938xhwgc ,
129 .BR et4000hwgc ,
130 .BR geodehwgc ,
131 .BR hiqvideohwgc ,
132 .BR i81xhwgc ,
133 .BR igfxhwgc ,
134 .BR mga2164whwgc ,
135 .BR mach64xxhwgc ,
136 .BR neomagichwgc ,
137 .BR nvidiahwgc ,
138 .BR radeonhwgc ,
139 .BR rgb524hwgc ,
140 .BR s3hwgc ,
141 .BR t2r4hwgc ,
142 .BR tvp3020hwgc ,
143 .BR tvp3026hwgc
144 and
145 .BR vmwarehwgc .
146 A value of
147 .B off
148 disables the cursor.
149 .TP
150 .BI palettedepth " d"
151 Set the number of bits of precision used by the 
152 VGA palette to 
153 .IR d ,
154 which must be either 
155 .B 6
156 or
157 .BR 8 .
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 softscreen " mode"
173 Depending on whether
174 .I mode
175 is 
176 .B on
177 or
178 .BR off ,
179 enable or disable shadow framebuffer to reduce
180 slow bus reads. Enabling
181 .BI softscreen
182 disables hardware acceleration. The default setting is
183 .BR off
184 except for the
185 .BR vesa
186 driver. 
187 .TP
188 .BI hwblank " mode"
189 Depending on whether
190 .I mode
191 is
192 .B on
193 or
194 .BR off ,
195 enable or disable the use of DPMS blanking
196 (see
197 .IR mouse (3)).
198 .TP
199 .BI linear " size align"
200 Use a linear screen aperture of size
201 .I size
202 aligned on an
203 .IR align -byte
204 boundary.
205 .TP
206 .B drawinit
207 Initialize the graphics hardware.
208 This must be sent after setting the
209 .BR type .
210 .PP
211 Reading
212 .B vgactl
213 returns the current settings, one per line.
214 .PP
215 Some VGA cards support overlay graphics.
216 Writing strings to
217 .B vgaovlctl
218 configures such cards.
219 The following are valid overlay control commands:
220 .TP
221 .BI openctl
222 opens the overlay device.
223 .TP
224 .BI configure " w h format"
225 allocates resources inside the driver to support an overlay area
226 of width
227 .I w
228 and height
229 .I h
230 pixels.  Currently, the only supported
231 .I format
232 is
233 .B YUYV
234 packed.
235 In
236 .B YUYV
237 two pixels are encoded by their separate Y values
238 and their combined U and V values.
239 The size of the two pixels is 32 bits.
240 .TP
241 .BI enable " x y w h"
242 enables drawing data on the display through the overlay mode.  The data
243 is drawn at position
244 .IR x , y
245 and has a width and height of
246 .IR w , h
247 respectively.
248 .TP
249 .BI closectl
250 terminates overlay control.
251 .PP
252 Overlay data can be written to
253 .BR vgaovl .
254 .SH EXAMPLES
255 The following disables hardware acceleration.
256 .IP
257 .EX
258 echo hwaccel off > /dev/vgactl
259 .EE
260 .SH SOURCE
261 .B /sys/src/9/pc/devvga.c
262 .SH SEE ALSO
263 .IR arch (3),
264 .IR vga (8)
265 .SH BUGS
266 The hardware graphics cursor on the
267 .B et4000
268 does not work in 2x8-bit mode.