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