1
/* $XdotOrg: xserver/xorg/hw/xfree86/os-support/solaris/agpgart.h,v 1.2 2005/07/01 22:43:25 daniels Exp $ */
3
* AGPGART module version 0.99
4
* Copyright (C) 1999 Jeff Hartmann
5
* Copyright (C) 1999 Precision Insight, Inc.
6
* Copyright (C) 1999 Xi Graphics, Inc.
8
* Permission is hereby granted, free of charge, to any person obtaining a
9
* copy of this software and associated documentation files (the "Software"),
10
* to deal in the Software without restriction, including without limitation
11
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
12
* and/or sell copies of the Software, and to permit persons to whom the
13
* Software is furnished to do so, subject to the following conditions:
15
* The above copyright notice and this permission notice shall be included
16
* in all copies or substantial portions of the Software.
18
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21
* JEFF HARTMANN, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
22
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
23
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
24
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
29
* Permission is hereby granted, free of charge, to any person obtaining a
30
* copy of this software and associated documentation files (the
31
* "Software"), to deal in the Software without restriction, including
32
* without limitation the rights to use, copy, modify, merge, publish,
33
* distribute, and/or sell copies of the Software, and to permit persons
34
* to whom the Software is furnished to do so, provided that the above
35
* copyright notice(s) and this permission notice appear in all copies of
36
* the Software and that both the above copyright notice(s) and this
37
* permission notice appear in supporting documentation.
39
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
40
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
41
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
42
* OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
43
* HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
44
* INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
45
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
46
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
47
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
49
* Except as contained in this notice, the name of a copyright holder
50
* shall not be used in advertising or otherwise to promote the sale, use
51
* or other dealings in this Software without prior written authorization
52
* of the copyright holder.
58
#pragma ident "@(#)agpgart.h 1.1 05/04/04 SMI"
60
typedef struct _agp_version {
65
typedef struct _agp_info {
66
agp_version_t agpi_version;
67
uint32_t agpi_devid; /* bridge vendor + device */
68
uint32_t agpi_mode; /* mode of bridge */
69
ulong_t agpi_aperbase; /* base of aperture */
70
size_t agpi_apersize; /* aperture range size */
71
uint32_t agpi_pgtotal; /* max number of pages in aperture */
72
uint32_t agpi_pgsystem; /* same as pg_total */
73
uint32_t agpi_pgused; /* NUMBER of currently used pages */
76
typedef struct _agp_setup {
80
typedef struct _agp_allocate {
82
uint32_t agpa_pgcount;
84
uint32_t agpa_physical; /* for i810/830 driver */
87
typedef struct _agp_bind {
89
uint32_t agpb_pgstart;
92
typedef struct _agp_unbind {
94
uint32_t agpu_pri; /* no use in solaris */
97
#define AGPIOC_BASE 'G'
98
#define AGPIOC_INFO _IOR(AGPIOC_BASE, 0, 100)
99
#define AGPIOC_ACQUIRE _IO(AGPIOC_BASE, 1)
100
#define AGPIOC_RELEASE _IO(AGPIOC_BASE, 2)
101
#define AGPIOC_SETUP _IOW(AGPIOC_BASE, 3, agp_setup_t)
102
#define AGPIOC_ALLOCATE _IOWR(AGPIOC_BASE, 4, agp_allocate_t)
103
#define AGPIOC_DEALLOCATE _IOW(AGPIOC_BASE, 5, int)
104
#define AGPIOC_BIND _IOW(AGPIOC_BASE, 6, agp_bind_t)
105
#define AGPIOC_UNBIND _IOW(AGPIOC_BASE, 7, agp_unbind_t)
107
#define AGP_DEVICE "/dev/agpgart"
109
#endif /* _AGPGART_H */