2001-10-05 06:08:22 +00:00
|
|
|
.\" Copyright (c) 2001 Yar Tikhiy
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2006-02-17 06:29:51 +00:00
|
|
|
.Dd February 17, 2006
|
2001-10-05 08:12:03 +00:00
|
|
|
.Dt AGP 4
|
2001-10-05 06:08:22 +00:00
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm agp
|
|
|
|
.Nd "generic interface to the Accelerated Graphics Port (AGP)"
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Cd "device agp"
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
driver provides uniform, abstract methods for controlling
|
|
|
|
the following devices:
|
2005-12-20 21:40:25 +00:00
|
|
|
.Pp
|
|
|
|
.Bl -tag -width "NVIDIA:" -compact
|
|
|
|
.It Ali:
|
|
|
|
M1541, M1621 and M1671 host to AGP bridges
|
|
|
|
.It AMD:
|
|
|
|
751, 761 and 762 host to AGP bridges
|
|
|
|
.It ATI:
|
|
|
|
RS100, RS200, RS250 and RS300 AGP bridges
|
|
|
|
.It Intel:
|
|
|
|
i820, i840, i845, i850, and i860 host to AGP bridges
|
|
|
|
.It Intel:
|
|
|
|
i810, i810-DC100, i810E, i815, 830M, 845G, 852GM, 852GME, 855GM, 855GME, 865G, 915G and 915GM SVGA controllers
|
|
|
|
.It Intel:
|
2006-02-17 06:29:51 +00:00
|
|
|
82443BX, 82443GX, 82443LX, 82815, 82820, 82830, 82840, 82845, 82845G, 82850, 82855, 82855GM, 82860, 82865, 82875P, E7205 and E7505 host to AGP bridges
|
2005-12-20 21:40:25 +00:00
|
|
|
.It NVIDIA:
|
|
|
|
nForce and nForce2 AGP controllers
|
|
|
|
.It SiS:
|
|
|
|
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
|
|
|
|
.It VIA:
|
|
|
|
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
|
2001-10-05 06:08:22 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The most common application of
|
|
|
|
.Nm
|
|
|
|
is for running
|
2005-12-20 21:40:25 +00:00
|
|
|
.Xr X 7
|
2001-10-05 06:08:22 +00:00
|
|
|
on the Intel i81x controllers.
|
2003-05-12 21:34:29 +00:00
|
|
|
.Sh IOCTLS
|
|
|
|
The following
|
|
|
|
.Xr ioctl 2
|
|
|
|
operations can be performed on
|
|
|
|
.Pa /dev/agpgart ,
|
|
|
|
which are defined in
|
2003-09-08 19:57:22 +00:00
|
|
|
.In sys/agpio.h :
|
2003-05-20 22:06:43 +00:00
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Dv AGPIOC_INFO
|
2003-05-12 21:34:29 +00:00
|
|
|
Returns state of the
|
|
|
|
.Nm
|
|
|
|
system.
|
|
|
|
The result is a pointer to the following structure:
|
|
|
|
.Bd -literal
|
|
|
|
typedef struct _agp_info {
|
|
|
|
agp_version version; /* version of the driver */
|
|
|
|
u_int32_t bridge_id; /* bridge vendor/device */
|
|
|
|
u_int32_t agp_mode; /* mode info of bridge */
|
|
|
|
off_t aper_base; /* base of aperture */
|
|
|
|
size_t aper_size; /* size of aperture */
|
|
|
|
size_t pg_total; /* max pages (swap + system) */
|
|
|
|
size_t pg_system; /* max pages (system) */
|
|
|
|
size_t pg_used; /* current pages used */
|
|
|
|
} agp_info;
|
|
|
|
.Ed
|
2003-05-20 22:06:43 +00:00
|
|
|
.It Dv AGPIOC_ACQUIRE
|
2003-05-12 21:34:29 +00:00
|
|
|
Acquire control of the AGP chipset for use by this client.
|
|
|
|
Returns
|
|
|
|
.Er EBUSY
|
|
|
|
if the AGP chipset is already acquired by another client.
|
2003-05-20 22:06:43 +00:00
|
|
|
.It Dv AGPIOC_RELEASE
|
2003-05-12 21:34:29 +00:00
|
|
|
Release control of the AGP chipset.
|
|
|
|
This does not unbind or free any allocated memory, which is the
|
|
|
|
responsibility of the client to handle if necessary.
|
2003-05-20 22:06:43 +00:00
|
|
|
.It Dv AGPIOC_SETUP
|
2003-05-12 21:34:29 +00:00
|
|
|
Enable the AGP hardware with the relevant mode.
|
|
|
|
This
|
|
|
|
.Xr ioctl 2
|
|
|
|
takes the following structure:
|
|
|
|
.Bd -literal
|
|
|
|
typedef struct _agp_setup {
|
|
|
|
u_int32_t agp_mode; /* mode info of bridge */
|
|
|
|
} agp_setup;
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
The mode bits are defined in
|
2003-09-08 19:57:22 +00:00
|
|
|
.In sys/agpio.h .
|
2003-05-20 22:06:43 +00:00
|
|
|
.It Dv AGPIOC_ALLOCATE
|
2003-05-12 21:34:29 +00:00
|
|
|
Allocate physical memory suitable for mapping into the AGP aperture.
|
|
|
|
This
|
|
|
|
.Xr ioctl 2
|
|
|
|
takes the following structure:
|
|
|
|
.Bd -literal
|
|
|
|
typedef struct _agp_allocate {
|
|
|
|
int key; /* tag of allocation */
|
|
|
|
size_t pg_count; /* number of pages */
|
|
|
|
u_int32_t type; /* 0 == normal, other devspec */
|
2003-05-20 22:06:43 +00:00
|
|
|
u_int32_t physical; /* device specific (some devices
|
|
|
|
* need a phys address of the
|
2003-05-12 21:34:29 +00:00
|
|
|
* actual page behind the gatt
|
|
|
|
* table) */
|
|
|
|
} agp_allocate;
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
Returns a handle to the allocated memory.
|
2003-05-20 22:06:43 +00:00
|
|
|
.It Dv AGPIOC_DEALLOCATE
|
2003-05-12 21:34:29 +00:00
|
|
|
Free the previously allocated memory associated with the handle passed.
|
2003-05-20 22:06:43 +00:00
|
|
|
.It Dv AGPIOC_BIND
|
2003-05-12 21:34:29 +00:00
|
|
|
Bind the allocated memory at given offset with the AGP aperture.
|
|
|
|
Returns
|
|
|
|
.Er EINVAL
|
|
|
|
if the memory is already bound or the offset is not at AGP page boundary.
|
|
|
|
This
|
|
|
|
.Xr ioctl 2
|
|
|
|
takes the following structure:
|
|
|
|
.Bd -literal
|
|
|
|
typedef struct _agp_bind {
|
|
|
|
int key; /* tag of allocation */
|
|
|
|
off_t pg_start; /* starting page to populate */
|
|
|
|
} agp_bind;
|
|
|
|
.Ed
|
|
|
|
.Pp
|
2003-05-20 22:06:43 +00:00
|
|
|
The tag of allocation is the handle returned by
|
|
|
|
.Dv AGPIOC_ALLOCATE .
|
|
|
|
.It Dv AGPIOC_UNBIND
|
2003-05-12 21:34:29 +00:00
|
|
|
Unbind memory from the AGP aperture.
|
|
|
|
Returns
|
|
|
|
.Er EINVAL
|
|
|
|
if the memory is not bound.
|
|
|
|
This
|
2003-05-20 22:06:43 +00:00
|
|
|
.Xr ioctl 2
|
2003-05-12 21:34:29 +00:00
|
|
|
takes the following structure:
|
|
|
|
.Bd -literal
|
|
|
|
typedef struct _agp_unbind {
|
|
|
|
int key; /* tag of allocation */
|
|
|
|
u_int32_t priority; /* priority for paging out */
|
|
|
|
} agp_unbind;
|
|
|
|
.Ed
|
2003-05-20 22:06:43 +00:00
|
|
|
.El
|
2001-10-05 06:08:22 +00:00
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width ".Pa /dev/agpgart" -compact
|
|
|
|
.It Pa /dev/agpgart
|
2001-10-12 10:09:36 +00:00
|
|
|
AGP device node.
|
2001-10-05 06:08:22 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
2005-07-14 20:29:08 +00:00
|
|
|
.Xr X 7 Pq Pa ports/x11/xorg
|
2001-10-05 06:08:22 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
driver first appeared in
|
|
|
|
.Fx 4.1 .
|