1 .\" Copyright (c) 2001 Yar Tikhiy
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd "generic interface to the Accelerated Graphics Port (AGP)"
38 driver provides uniform, abstract methods for controlling
39 the following devices:
40 .Bl -bullet -offset indent -compact
42 Ali M1541 host-to-AGP bridge
44 .\" 761 not in -stable
45 AMD 751 and 761 host-to-AGP bridges
47 Intel i820, i840, i845, i850, and i860 host-to-AGP bridge
49 Intel i810, i810-DC100, i810E, and i815 SVGA controllers
51 Intel 82443GX host-to-AGP bridge
53 SiS 5591 host-to-AGP bridge
56 The most common application of
60 on the Intel i81x controllers.
64 operations can be performed on
68 .Bl -tag -width indent
73 The result is a pointer to the following structure:
75 typedef struct _agp_info {
76 agp_version version; /* version of the driver */
77 u_int32_t bridge_id; /* bridge vendor/device */
78 u_int32_t agp_mode; /* mode info of bridge */
79 off_t aper_base; /* base of aperture */
80 size_t aper_size; /* size of aperture */
81 size_t pg_total; /* max pages (swap + system) */
82 size_t pg_system; /* max pages (system) */
83 size_t pg_used; /* current pages used */
87 Acquire control of the AGP chipset for use by this client.
90 if the AGP chipset is already acquired by another client.
92 Release control of the AGP chipset.
93 This does not unbind or free any allocated memory, which is the
94 responsibility of the client to handle if necessary.
96 Enable the AGP hardware with the relevant mode.
99 takes the following structure:
101 typedef struct _agp_setup {
102 u_int32_t agp_mode; /* mode info of bridge */
106 The mode bits are defined in
108 .It Dv AGPIOC_ALLOCATE
109 Allocate physical memory suitable for mapping into the AGP aperture.
112 takes the following structure:
114 typedef struct _agp_allocate {
115 int key; /* tag of allocation */
116 size_t pg_count; /* number of pages */
117 u_int32_t type; /* 0 == normal, other devspec */
118 u_int32_t physical; /* device specific (some devices
119 * need a phys address of the
120 * actual page behind the gatt
125 Returns a handle to the allocated memory.
126 .It Dv AGPIOC_DEALLOCATE
127 Free the previously allocated memory associated with the handle passed.
129 Bind the allocated memory at given offset with the AGP aperture.
132 if the memory is already bound or the offset is not at AGP page boundary.
135 takes the following structure:
137 typedef struct _agp_bind {
138 int key; /* tag of allocation */
139 off_t pg_start; /* starting page to populate */
143 The tag of allocation is the handle returned by
144 .Dv AGPIOC_ALLOCATE .
146 Unbind memory from the AGP aperture.
149 if the memory is not bound.
152 takes the following structure:
154 typedef struct _agp_unbind {
155 int key; /* tag of allocation */
156 u_int32_t priority; /* priority for paging out */
161 .Bl -tag -width ".Pa /dev/agpgart" -compact
166 .Xr X 7 Pq Pa ports/x11/xorg
170 driver first appeared in