diff options
author | Dimitry Andric <dim@cvs.openbsd.org> | 2006-03-16 21:24:34 +0000 |
---|---|---|
committer | Dimitry Andric <dim@cvs.openbsd.org> | 2006-03-16 21:24:34 +0000 |
commit | da285bc6b71fef2b05d915d3b4855a0ad1255b2a (patch) | |
tree | 0f6399bc8108d40ce5da49531025a6b8b724773b /share | |
parent | a718f058bcda11840a050764487ac0849cd03446 (diff) |
Document the APGIOC_XXX ioctls and associated structures.
ok matthieu@
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man4/vga.4 | 107 |
1 files changed, 103 insertions, 4 deletions
diff --git a/share/man/man4/vga.4 b/share/man/man4/vga.4 index c0c81b2a805..c0edf28a23e 100644 --- a/share/man/man4/vga.4 +++ b/share/man/man4/vga.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: vga.4,v 1.10 2005/05/04 05:05:32 jaredy Exp $ +.\" $OpenBSD: vga.4,v 1.11 2006/03/16 21:24:33 dim Exp $ .\" $NetBSD: vga.4,v 1.2.4.1 2000/08/09 07:48:40 drochner Exp $ .\" .\" Copyright (c) 1999, 2000 @@ -120,12 +120,110 @@ This is only useful with the screen types; a font containing the ASCII range of characters must be available too on this screen. .Pp +.Sh AGP SUPPORT .Ic option PCIAGP -enables support for the AGP GART programming through +enables support for programming the AGP GART through .Xr ioctl 2 , -for use by +which is used by .Xr Xorg 1 on some architectures. +.Pp +The following +.Xr ioctl 2 +operations can be performed on +.Pa /dev/ttyC0 , +which are defined in +.In sys/agpio.h : +.Bl -tag -width indent +.It Dv AGPIOC_INFO +Returns information about the AGP subsystem. +The result is a pointer to the following structure: +.Bd -literal +typedef struct _agp_info { + agp_version version; /* version of driver (unused) */ + 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 +.It 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. +.It 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. +.It 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 +.In sys/agpio.h . +.It 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. +.It Dv AGPIOC_DEALLOCATE +Free the previously allocated memory associated with the handle passed. +.It 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 tag of allocation is the handle returned by +.Dv AGPIOC_ALLOCATE . +.It Dv AGPIOC_UNBIND +Unbind memory from the AGP aperture. +Returns +.Er EINVAL +if the memory is not bound. +This +.Xr ioctl 2 +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 +.El .Sh SEE ALSO .Xr intro 4 , .Xr isa 4 , @@ -134,7 +232,8 @@ on some architectures. .Xr wscons 4 , .Xr wsdisplay 4 , .Xr wsconscfg 8 , -.Xr wsfontload 8 +.Xr wsfontload 8 , +.Xr ioctl 2 .Sh BUGS Only a subset of the possible text modes is supported. .Pp |