Move MS DDK files to DDK
[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 #include "video.h"
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 #define VIDEO_AGP_RATE_1X 0x00000001
37 #define VIDEO_AGP_RATE_2X 0x00000002
38 #define VIDEO_AGP_RATE_4X 0x00000004
39 #define VIDEO_AGP_RATE_8X 0x00000008
40
41 typedef enum _VIDEO_PORT_CACHE_TYPE {
42 VpNonCached = 0,
43 VpWriteCombined,
44 VpCached
45 } VIDEO_PORT_CACHE_TYPE;
46
47 typedef BOOLEAN
48 (DDKAPI *PAGP_COMMIT_PHYSICAL)(
49 IN PVOID HwDeviceExtension,
50 IN PVOID PhysicalReserveContext,
51 IN ULONG Pages,
52 IN ULONG Offset);
53
54 typedef PVOID
55 (DDKAPI *PAGP_COMMIT_VIRTUAL)(
56 IN PVOID HwDeviceExtension,
57 IN PVOID VirtualReserveContext,
58 IN ULONG Pages,
59 IN ULONG Offset);
60
61 typedef VOID
62 (DDKAPI *PAGP_FREE_PHYSICAL)(
63 IN PVOID HwDeviceExtension,
64 IN PVOID PhysicalReserveContext,
65 IN ULONG Pages,
66 IN ULONG Offset);
67
68 typedef VOID
69 (DDKAPI *PAGP_FREE_VIRTUAL)(
70 IN PVOID HwDeviceExtension,
71 IN PVOID VirtualReserveContext,
72 IN ULONG Pages,
73 IN ULONG Offset);
74
75 typedef VOID
76 (DDKAPI *PAGP_RELEASE_PHYSICAL)(
77 IN PVOID HwDeviceExtension,
78 IN PVOID PhysicalReserveContext);
79
80 typedef VOID
81 (DDKAPI *PAGP_RELEASE_VIRTUAL)(
82 IN PVOID HwDeviceExtension,
83 IN PVOID VirtualReserveContext);
84
85 typedef PHYSICAL_ADDRESS
86 (DDKAPI *PAGP_RESERVE_PHYSICAL)(
87 IN PVOID HwDeviceExtension,
88 IN ULONG Pages,
89 IN VIDEO_PORT_CACHE_TYPE Caching,
90 OUT PVOID *PhysicalReserveContext);
91
92 typedef PVOID
93 (DDKAPI *PAGP_RESERVE_VIRTUAL)(
94 IN PVOID HwDeviceExtension,
95 IN HANDLE ProcessHandle,
96 IN PVOID PhysicalReserveContext,
97 OUT PVOID *VirtualReserveContext);
98
99 typedef BOOLEAN
100 (DDKAPI *PAGP_SET_RATE)(
101 IN PVOID HwDeviceExtension,
102 IN ULONG AgpRate);
103
104 typedef struct _VIDEO_PORT_AGP_SERVICES {
105 PAGP_RESERVE_PHYSICAL AgpReservePhysical;
106 PAGP_RELEASE_PHYSICAL AgpReleasePhysical;
107 PAGP_COMMIT_PHYSICAL AgpCommitPhysical;
108 PAGP_FREE_PHYSICAL AgpFreePhysical;
109 PAGP_RESERVE_VIRTUAL AgpReserveVirtual;
110 PAGP_RELEASE_VIRTUAL AgpReleaseVirtual;
111 PAGP_COMMIT_VIRTUAL AgpCommitVirtual;
112 PAGP_FREE_VIRTUAL AgpFreeVirtual;
113 ULONGLONG AllocationLimit;
114 } VIDEO_PORT_AGP_SERVICES, *PVIDEO_PORT_AGP_SERVICES;
115
116 VPAPI
117 BOOLEAN
118 DDKAPI
119 VideoPortGetAgpServices(
120 IN PVOID HwDeviceExtension,
121 IN PVIDEO_PORT_AGP_SERVICES AgpServices);
122
123 #ifdef __cplusplus
124 }
125 #endif
126
127 #endif /* __VIDEOAGP_H */