diff options
author | hmp <hmp@FreeBSD.org> | 2003-05-12 21:34:29 +0000 |
---|---|---|
committer | hmp <hmp@FreeBSD.org> | 2003-05-12 21:34:29 +0000 |
commit | 7974b430e94ca1b23450aef0a6ee6516f50d8817 (patch) | |
tree | 3a8961b909deb8b21e8479f09ab79b058ef4d9e2 /share/man | |
parent | 489ad0717953ca505333e51253297407738a7f04 (diff) | |
download | FreeBSD-src-7974b430e94ca1b23450aef0a6ee6516f50d8817.zip FreeBSD-src-7974b430e94ca1b23450aef0a6ee6516f50d8817.tar.gz |
Document ioctl(2) operations of the agp(4) subsystem. The original patch
was obtained from [1], with heavy editing, and ammending text for some of
the ioctls.
All ioctls (in sys/agpio.h) are now documented.
PR: docs/50503
Original patch by: Alex Semenyaka <alexs@snark.ratmir.ru> [1]
Content approved by:
- Eric Anholt <anholt@FreeBSD.ORG>
- Matthew N. Dodd <mdodd@FreeBSD.ORG> (cursory review)
Approved and Reviewed by: des (mentor), re (scottl)
Diffstat (limited to 'share/man')
-rw-r--r-- | share/man/man4/agp.4 | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/share/man/man4/agp.4 b/share/man/man4/agp.4 index 74e9f0f..4041264 100644 --- a/share/man/man4/agp.4 +++ b/share/man/man4/agp.4 @@ -58,6 +58,105 @@ The most common application of is for running .Xr XFree86 1 on the Intel i81x controllers. +.Sh IOCTLS +The following +.Xr ioctl 2 +operations can be performed on +.Pa /dev/agpgart , +which are defined in +.Aq Pa sys/agpio.h : +.Ss Dv AGPIOC_INFO +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 +.Ss Dv AGPIOC_ACQUIRE +Acquire control of the AGP chipset for use by this client. +Returns +.Er EBUSY +if the AGP chipset is already acquired by another client. +.Ss Dv AGPIOC_RELEASE +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. +.Ss Dv AGPIOC_SETUP +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 +.Aq Pa sys/agpio.h . +.Ss Dv AGPIOC_ALLOCATE +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 */ + u_int32_t physical; /* device specific (some devices + * need a phys address of the + * actual page behind the gatt + * table) */ +} agp_allocate; +.Ed +.Pp +Returns a handle to the allocated memory. +.Ss Dv AGPIOC_DEALLOCATE +Free the previously allocated memory associated with the handle passed. +.Ss Dv AGPIOC_BIND +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 +The +.Sq tag of allocation , +is the handle returned by +.Dv AGPIOC_ALLOCATE. +.Ss Dv AGPIOC_UNBIND +Unbind memory from the AGP aperture. +Returns +.Er EINVAL +if the memory is not bound. +This +.Xr ioctl +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 .Sh FILES .Bl -tag -width ".Pa /dev/agpgart" -compact .It Pa /dev/agpgart |