]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - share/man/man4/agp.4
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / share / man / man4 / agp.4
1 .\" Copyright (c) 2001 Yar Tikhiy
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
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.
12 .\"
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
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd November 28, 2007
28 .Dt AGP 4
29 .Os
30 .Sh NAME
31 .Nm agp
32 .Nd "generic interface to the Accelerated Graphics Port (AGP)"
33 .Sh SYNOPSIS
34 .Cd "device agp"
35 .Sh DESCRIPTION
36 The
37 .Nm
38 driver provides uniform, abstract methods for controlling
39 the following devices:
40 .Pp
41 .Bl -tag -width "NVIDIA:" -compact
42 .It Ali:
43 M1541, M1621 and M1671 host to AGP bridges
44 .It AMD:
45 751, 761 and 762 host to AGP bridges
46 .It ATI:
47 RS100, RS200, RS250 and RS300 AGP bridges
48 .It Intel:
49 i820, i840, i845, i850, and i860 host to AGP bridges
50 .It Intel:
51 i810, i810-DC100, i810E, i815, 830M, 845G, 845M, 852GM, 852GME, 855GM, 855GME, 865G, 915G and 915GM SVGA controllers
52 .It Intel:
53 82443BX, 82443GX, 82443LX, 82815, 82820, 82830, 82840, 82845, 82845G, 82850, 82855, 82855GM, 82860, 82865, 82875P, E7205 and E7505 host to AGP bridges
54 .It NVIDIA:
55 nForce and nForce2 AGP controllers
56 .It SiS:
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
58 .It VIA:
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
60 .El
61 .Pp
62 The most common application of
63 .Nm
64 is for running
65 .Xr X 7
66 on the Intel i81x controllers.
67 .Sh IOCTLS
68 The following
69 .Xr ioctl 2
70 operations can be performed on
71 .Pa /dev/agpgart ,
72 which are defined in
73 .In sys/agpio.h :
74 .Bl -tag -width indent
75 .It Dv AGPIOC_INFO
76 Returns state of the
77 .Nm
78 system.
79 The result is a pointer to the following structure:
80 .Bd -literal
81 typedef struct _agp_info {
82         agp_version version;  /* version of the driver        */
83         uint32_t bridge_id;   /* bridge vendor/device         */
84         uint32_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           */
90 } agp_info;
91 .Ed
92 .It Dv AGPIOC_ACQUIRE
93 Acquire control of the AGP chipset for use by this client.
94 Returns
95 .Er EBUSY
96 if the AGP chipset is already acquired by another client.
97 .It Dv AGPIOC_RELEASE
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.
101 .It Dv AGPIOC_SETUP
102 Enable the AGP hardware with the relevant mode.
103 This
104 .Xr ioctl 2
105 takes the following structure:
106 .Bd -literal
107 typedef struct _agp_setup {
108         uint32_t agp_mode;    /* mode info of bridge */
109 } agp_setup;
110 .Ed
111 .Pp
112 The mode bits are defined in
113 .In sys/agpio.h .
114 .It Dv AGPIOC_ALLOCATE
115 Allocate physical memory suitable for mapping into the AGP aperture.
116 This
117 .Xr ioctl 2
118 takes the following structure:
119 .Bd -literal
120 typedef struct _agp_allocate {
121         int key;              /* tag of allocation            */
122         size_t pg_count;      /* number of pages              */
123         uint32_t type;        /* 0 == normal, other devspec   */
124         uint32_t physical;    /* device specific (some devices
125                                * need a phys address of the
126                                * actual page behind the gatt
127                                * table)                       */
128 } agp_allocate;
129 .Ed
130 .Pp
131 Returns a handle to the allocated memory.
132 .It Dv AGPIOC_DEALLOCATE
133 Free the previously allocated memory associated with the handle passed.
134 .It Dv AGPIOC_BIND
135 Bind the allocated memory at given offset with the AGP aperture.
136 Returns
137 .Er EINVAL
138 if the memory is already bound or the offset is not at AGP page boundary.
139 This
140 .Xr ioctl 2
141 takes the following structure:
142 .Bd -literal
143 typedef struct _agp_bind {
144         int key;         /* tag of allocation            */
145         off_t pg_start;  /* starting page to populate    */
146 } agp_bind;
147 .Ed
148 .Pp
149 The tag of allocation is the handle returned by
150 .Dv AGPIOC_ALLOCATE .
151 .It Dv AGPIOC_UNBIND
152 Unbind memory from the AGP aperture.
153 Returns
154 .Er EINVAL
155 if the memory is not bound.
156 This
157 .Xr ioctl 2
158 takes the following structure:
159 .Bd -literal
160 typedef struct _agp_unbind {
161         int key;                /* tag of allocation         */
162         uint32_t priority;      /* priority for paging out   */
163 } agp_unbind;
164 .Ed
165 .El
166 .Sh FILES
167 .Bl -tag -width ".Pa /dev/agpgart" -compact
168 .It Pa /dev/agpgart
169 AGP device node.
170 .El
171 .Sh SEE ALSO
172 .Xr X 7 Pq Pa ports/x11/xorg
173 .Sh HISTORY
174 The
175 .Nm
176 driver first appeared in
177 .Fx 4.1 .