]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/agp.4
This commit was generated by cvs2svn to compensate for changes in r152390,
[FreeBSD/FreeBSD.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 October 5, 2001
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 .Bl -bullet -offset indent -compact
41 .It
42 Ali M1541 host-to-AGP bridge
43 .It
44 .\" 761 not in -stable
45 AMD 751 and 761 host-to-AGP bridges
46 .It
47 Intel i820, i840, i845, i850, and i860 host-to-AGP bridge
48 .It
49 Intel i810, i810-DC100, i810E, and i815 SVGA controllers
50 .It
51 Intel 82443GX host-to-AGP bridge
52 .It
53 SiS 5591 host-to-AGP bridge
54 .El
55 .Pp
56 The most common application of
57 .Nm
58 is for running
59 .Xr XFree86 1
60 on the Intel i81x controllers.
61 .Sh IOCTLS
62 The following
63 .Xr ioctl 2
64 operations can be performed on
65 .Pa /dev/agpgart ,
66 which are defined in
67 .In sys/agpio.h :
68 .Bl -tag -width indent
69 .It Dv AGPIOC_INFO
70 Returns state of the
71 .Nm
72 system.
73 The result is a pointer to the following structure:
74 .Bd -literal
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           */
84 } agp_info;
85 .Ed
86 .It Dv AGPIOC_ACQUIRE
87 Acquire control of the AGP chipset for use by this client.
88 Returns
89 .Er EBUSY
90 if the AGP chipset is already acquired by another client.
91 .It Dv AGPIOC_RELEASE
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.
95 .It Dv AGPIOC_SETUP
96 Enable the AGP hardware with the relevant mode.
97 This
98 .Xr ioctl 2
99 takes the following structure:
100 .Bd -literal
101 typedef struct _agp_setup {
102         u_int32_t agp_mode;   /* mode info of bridge */
103 } agp_setup;
104 .Ed
105 .Pp
106 The mode bits are defined in
107 .In sys/agpio.h .
108 .It Dv AGPIOC_ALLOCATE
109 Allocate physical memory suitable for mapping into the AGP aperture.
110 This
111 .Xr ioctl 2
112 takes the following structure:
113 .Bd -literal
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
121                                * table)                       */
122 } agp_allocate;
123 .Ed
124 .Pp
125 Returns a handle to the allocated memory.
126 .It Dv AGPIOC_DEALLOCATE
127 Free the previously allocated memory associated with the handle passed.
128 .It Dv AGPIOC_BIND
129 Bind the allocated memory at given offset with the AGP aperture.
130 Returns
131 .Er EINVAL
132 if the memory is already bound or the offset is not at AGP page boundary.
133 This
134 .Xr ioctl 2
135 takes the following structure:
136 .Bd -literal
137 typedef struct _agp_bind {
138         int key;         /* tag of allocation            */
139         off_t pg_start;  /* starting page to populate    */
140 } agp_bind;
141 .Ed
142 .Pp
143 The tag of allocation is the handle returned by
144 .Dv AGPIOC_ALLOCATE .
145 .It Dv AGPIOC_UNBIND
146 Unbind memory from the AGP aperture.
147 Returns
148 .Er EINVAL
149 if the memory is not bound.
150 This
151 .Xr ioctl 2
152 takes the following structure:
153 .Bd -literal
154 typedef struct _agp_unbind {
155         int key;                /* tag of allocation         */
156         u_int32_t priority;     /* priority for paging out   */
157 } agp_unbind;
158 .Ed
159 .El
160 .Sh FILES
161 .Bl -tag -width ".Pa /dev/agpgart" -compact
162 .It Pa /dev/agpgart
163 AGP device node.
164 .El
165 .Sh SEE ALSO
166 .Xr X 7 Pq Pa ports/x11/xorg
167 .Sh HISTORY
168 The
169 .Nm
170 driver first appeared in
171 .Fx 4.1 .