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:
41 .Bl -tag -width "NVIDIA:" -compact
43 M1541, M1621 and M1671 host to AGP bridges
45 751, 761 and 762 host to AGP bridges
47 RS100, RS200, RS250 and RS300 AGP bridges
49 i820, i840, i845, i850, and i860 host to AGP bridges
51 i810, i810-DC100, i810E, i815, 830M, 845G, 845M, 852GM, 852GME, 855GM, 855GME, 865G, 915G and 915GM SVGA controllers
53 82443BX, 82443GX, 82443LX, 82815, 82820, 82830, 82840, 82845, 82845G, 82850, 82855, 82855GM, 82860, 82865, 82875P, E7205 and E7505 host to AGP bridges
55 nForce and nForce2 AGP controllers
57 530, 540, 550, 620, 630, 645, 645DX, 648, 650, 651, 655, 661, 730, 735, 740, 741, 745, 746, 760 and 5591 host to AGP bridges
59 3296, 82C597, 82C598, 82C691, 82C694X, 82C8363, 8235, 8237, 8361, 8367, 8371, 8377, 8501, 8601, 862x, 8633, 8653, 8703, 8753, 8754, 8763, 8783, KT880, PM800, PM880, PN800, PN880, PT880, XM266 and XN266 host to PCI bridges
62 The most common application of
66 on the Intel i81x controllers.
70 operations can be performed on
74 .Bl -tag -width indent
79 The result is a pointer to the following structure:
81 typedef struct _agp_info {
82 agp_version version; /* version of the driver */
83 u_int32_t bridge_id; /* bridge vendor/device */
84 u_int32_t agp_mode; /* mode info of bridge */
85 off_t aper_base; /* base of aperture */
86 size_t aper_size; /* size of aperture */
87 size_t pg_total; /* max pages (swap + system) */
88 size_t pg_system; /* max pages (system) */
89 size_t pg_used; /* current pages used */
93 Acquire control of the AGP chipset for use by this client.
96 if the AGP chipset is already acquired by another client.
98 Release control of the AGP chipset.
99 This does not unbind or free any allocated memory, which is the
100 responsibility of the client to handle if necessary.
102 Enable the AGP hardware with the relevant mode.
105 takes the following structure:
107 typedef struct _agp_setup {
108 u_int32_t agp_mode; /* mode info of bridge */
112 The mode bits are defined in
114 .It Dv AGPIOC_ALLOCATE
115 Allocate physical memory suitable for mapping into the AGP aperture.
118 takes the following structure:
120 typedef struct _agp_allocate {
121 int key; /* tag of allocation */
122 size_t pg_count; /* number of pages */
123 u_int32_t type; /* 0 == normal, other devspec */
124 u_int32_t physical; /* device specific (some devices
125 * need a phys address of the
126 * actual page behind the gatt
131 Returns a handle to the allocated memory.
132 .It Dv AGPIOC_DEALLOCATE
133 Free the previously allocated memory associated with the handle passed.
135 Bind the allocated memory at given offset with the AGP aperture.
138 if the memory is already bound or the offset is not at AGP page boundary.
141 takes the following structure:
143 typedef struct _agp_bind {
144 int key; /* tag of allocation */
145 off_t pg_start; /* starting page to populate */
149 The tag of allocation is the handle returned by
150 .Dv AGPIOC_ALLOCATE .
152 Unbind memory from the AGP aperture.
155 if the memory is not bound.
158 takes the following structure:
160 typedef struct _agp_unbind {
161 int key; /* tag of allocation */
162 u_int32_t priority; /* priority for paging out */
167 .Bl -tag -width ".Pa /dev/agpgart" -compact
172 .Xr X 7 Pq Pa ports/x11/xorg
176 driver first appeared in