Copy w32api 2.5 to trunk
[reactos.git] / reactos / w32api / include / ddk / videoagp.h
1 /*
2 * videoagp.h
3 *
4 * Video miniport AGP interface
5 *
6 * This file is part of the w32api package.
7 *
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 */
22
23 #ifndef __VIDEOAGP_H
24 #define __VIDEOAGP_H
25
26 #if __GNUC__ >=3
27 #pragma GCC system_header
28 #endif
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #pragma pack(push,4)
35
36 #include "ntddk.h"
37 #include "video.h"
38
39
40 #define VIDEO_AGP_RATE_1X 0x00000001
41 #define VIDEO_AGP_RATE_2X 0x00000002
42 #define VIDEO_AGP_RATE_4X 0x00000004
43 #define VIDEO_AGP_RATE_8X 0x00000008
44
45 typedef enum _VIDEO_PORT_CACHE_TYPE {
46 VpNonCached = 0,
47 VpWriteCombined,
48 VpCached
49 } VIDEO_PORT_CACHE_TYPE;
50
51 typedef BOOLEAN DDKAPI
52 (*PAGP_COMMIT_PHYSICAL)(
53 IN PVOID HwDeviceExtension,
54 IN PVOID PhysicalReserveContext,
55 IN ULONG Pages,
56 IN ULONG Offset);
57
58 typedef PVOID DDKAPI
59 (*PAGP_COMMIT_VIRTUAL)(
60 IN PVOID HwDeviceExtension,
61 IN PVOID VirtualReserveContext,
62 IN ULONG Pages,
63 IN ULONG Offset);
64
65 typedef VOID DDKAPI
66 (*PAGP_FREE_PHYSICAL)(
67 IN PVOID HwDeviceExtension,
68 IN PVOID PhysicalReserveContext,
69 IN ULONG Pages,
70 IN ULONG Offset);
71
72 typedef VOID DDKAPI
73 (*PAGP_FREE_VIRTUAL)(
74 IN PVOID HwDeviceExtension,
75 IN PVOID VirtualReserveContext,
76 IN ULONG Pages,
77 IN ULONG Offset);
78
79 typedef VOID DDKAPI
80 (*PAGP_RELEASE_PHYSICAL)(
81 IN PVOID HwDeviceExtension,
82 IN PVOID PhysicalReserveContext);
83
84 typedef VOID DDKAPI
85 (*PAGP_RELEASE_VIRTUAL)(
86 IN PVOID HwDeviceExtension,
87 IN PVOID VirtualReserveContext);
88
89 typedef PHYSICAL_ADDRESS DDKAPI
90 (*PAGP_RESERVE_PHYSICAL)(
91 IN PVOID HwDeviceExtension,
92 IN ULONG Pages,
93 IN VIDEO_PORT_CACHE_TYPE Caching,
94 OUT PVOID *PhysicalReserveContext);
95
96 typedef PVOID DDKAPI
97 (*PAGP_RESERVE_VIRTUAL)(
98 IN PVOID HwDeviceExtension,
99 IN HANDLE ProcessHandle,
100 IN PVOID PhysicalReserveContext,
101 OUT PVOID *VirtualReserveContext);
102
103 typedef BOOLEAN DDKAPI
104 (*PAGP_SET_RATE)(
105 IN PVOID HwDeviceExtension,
106 IN ULONG AgpRate);
107
108 typedef struct _VIDEO_PORT_AGP_SERVICES {
109 PAGP_RESERVE_PHYSICAL AgpReservePhysical;
110 PAGP_RELEASE_PHYSICAL AgpReleasePhysical;
111 PAGP_COMMIT_PHYSICAL AgpCommitPhysical;
112 PAGP_FREE_PHYSICAL AgpFreePhysical;
113 PAGP_RESERVE_VIRTUAL AgpReserveVirtual;
114 PAGP_RELEASE_VIRTUAL AgpReleaseVirtual;
115 PAGP_COMMIT_VIRTUAL AgpCommitVirtual;
116 PAGP_FREE_VIRTUAL AgpFreeVirtual;
117 ULONGLONG AllocationLimit;
118 } VIDEO_PORT_AGP_SERVICES, *PVIDEO_PORT_AGP_SERVICES;
119
120 VPAPI
121 BOOLEAN
122 DDKAPI
123 VideoPortGetAgpServices(
124 IN PVOID HwDeviceExtension,
125 IN PVIDEO_PORT_AGP_SERVICES AgpServices);
126
127 #pragma pack(pop)
128
129 #ifdef __cplusplus
130 }
131 #endif
132
133 #endif /* __VIDEOAGP_H */