NAME
vga – VGA controller device

SYNOPSIS
bind #v /dev
/dev/vgactl

DESCRIPTION
The VGA device allows configuration of a graphics controller on a PC. Vgactl allows control over higher–level settings such as display height, width, depth, controller and hardware–cursor type. Along with the I/O–port registers provided by arch(3), it is used to implement configuration and setup of VGA controller cards. This is usually performed by vga(8).

Writing strings to vgactl configures the VGA device. The following are valid commands.
size XxYxZ chan
Set the size of the screen image to be X pixels wide and Y pixels high. Each pixel is Z bits as specified by chan, whose format is described in image(6).
actualsize XxY
Set the physical size of the display to be X pixels wide by Y pixels high. This message is optional; it is used to accommodate displays that require the in–memory screen image to have certain alignment properties. For example, a 1400x1050 screen with a 1408x1050 in–memory image will use size 1408x1050 but actualsize 1400x1050.
tilt value
Set the tilt of the screen, altering the screen's orientation. The value can be one of: none, left, inverted and right.
type ctlr
Set the type of VGA controller being used. Ctlr is one of 3dfx, ark200pv, clgd542x, clgd546x, ct65545, cyber938x, et4000, geode, hiqvideo, i81x, igfx, mach64xx, mga2164w, mga4xx, neomagic, nvidia, radeon, s3, t2r4 and vmware.
Note that this list does not indicate the full set of VGA chips supported. For example, s3 includes the 86C801/5, 86C928, Vision864, and Vision964. It is the job of vga(8) to recognize which particular chip is being used and to initialize it appropriately.
hwgc gc
Set the type of hardware graphics cursor being used. Gc is one of soft, 3dfxhwgc, ark200pvhwgc, bt485hwgc, clgd542xhwgc, clgd546xhwgc, ct65545hwgc, cyber938xhwgc, et4000hwgc, geodehwgc, hiqvideohwgc, i81xhwgc, igfxhwgc, mga2164whwgc, mach64xxhwgc, neomagichwgc, nvidiahwgc, radeonhwgc, rgb524hwgc, s3hwgc, t2r4hwgc, tvp3020hwgc, tvp3026hwgc and vmwarehwgc. A value of off disables the cursor.
palettedepth d
Set the number of bits of precision used by the VGA palette to d, which must be either 6 or 8.
hwaccel mode
Depending on whether mode is on or off, enable or disable whether hardware acceleration (currently for rectangle filling and moving) used by the graphics engine. The default setting is on.
softscreen mode
Depending on whether mode is on or off, enable or disable shadow framebuffer to reduce slow bus reads. Enabling softscreen disables hardware acceleration. The default setting is off except for the vesa driver.
hwblank mode
Depending on whether mode is on or off, enable or disable the use of DPMS blanking (see mouse(3)).
linear size align
Use a linear screen aperture of size size aligned on an align–byte boundary.
drawinit
Initialize the graphics hardware. This must be sent after setting the type.

Reading vgactl returns the current settings, one per line.

EXAMPLES
The following disables hardware acceleration.
echo hwaccel off > /dev/vgactl

SOURCE
/sys/src/9/pc/devvga.c

SEE ALSO
arch(3), vga(8)

BUGS
The hardware graphics cursor on the et4000 does not work in 2x8–bit mode.