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