[CMAKE]
[reactos.git] / drivers / video / miniport / xboxvmp / xboxvmp.h
1 /*
2 * ReactOS Xbox miniport video driver
3 * Copyright (C) 2004 Gé van Geldorp
4 *
5 * Based on VBE miniport video driver
6 * Copyright (C) 2004 Filip Navara
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22
23 #pragma once
24
25 /* INCLUDES *******************************************************************/
26
27 #include "ntdef.h"
28 #define PAGE_SIZE 4096
29 #include "dderror.h"
30 #include "devioctl.h"
31 #include "miniport.h"
32 #include "ntddvdeo.h"
33 #include "video.h"
34
35 /* FIXME: NDK not compatible with miniport drivers */
36 #define SystemBasicInformation 0
37 typedef struct _SYSTEM_BASIC_INFORMATION
38 {
39 ULONG Reserved;
40 ULONG TimerResolution;
41 ULONG PageSize;
42 ULONG NumberOfPhysicalPages;
43 ULONG LowestPhysicalPageNumber;
44 ULONG HighestPhysicalPageNumber;
45 ULONG AllocationGranularity;
46 ULONG MinimumUserModeAddress;
47 ULONG MaximumUserModeAddress;
48 KAFFINITY ActiveProcessorsAffinityMask;
49 CCHAR NumberOfProcessors;
50 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
51
52 LONG
53 __stdcall
54 ZwQuerySystemInformation(
55 IN ULONG SystemInformationClass,
56 OUT PVOID SystemInformation,
57 IN ULONG Length,
58 OUT PULONG ResultLength
59 );
60
61 typedef struct
62 {
63 PHYSICAL_ADDRESS PhysControlStart;
64 ULONG ControlLength;
65 PVOID VirtControlStart;
66 PHYSICAL_ADDRESS PhysFrameBufferStart;
67 } XBOXVMP_DEVICE_EXTENSION, *PXBOXVMP_DEVICE_EXTENSION;
68
69 VP_STATUS NTAPI
70 XboxVmpFindAdapter(
71 IN PVOID HwDeviceExtension,
72 IN PVOID HwContext,
73 IN PWSTR ArgumentString,
74 IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo,
75 OUT PUCHAR Again);
76
77 BOOLEAN NTAPI
78 XboxVmpInitialize(PVOID HwDeviceExtension);
79
80 BOOLEAN NTAPI
81 XboxVmpStartIO(
82 PVOID HwDeviceExtension,
83 PVIDEO_REQUEST_PACKET RequestPacket);
84
85 BOOLEAN NTAPI
86 XboxVmpResetHw(
87 PVOID DeviceExtension,
88 ULONG Columns,
89 ULONG Rows);
90
91 VP_STATUS NTAPI
92 XboxVmpGetPowerState(
93 PVOID HwDeviceExtension,
94 ULONG HwId,
95 PVIDEO_POWER_MANAGEMENT VideoPowerControl);
96
97 VP_STATUS NTAPI
98 XboxVmpSetPowerState(
99 PVOID HwDeviceExtension,
100 ULONG HwId,
101 PVIDEO_POWER_MANAGEMENT VideoPowerControl);
102
103 BOOLEAN FASTCALL
104 XboxVmpSetCurrentMode(
105 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
106 PVIDEO_MODE RequestedMode,
107 PSTATUS_BLOCK StatusBlock);
108
109 BOOLEAN FASTCALL
110 XboxVmpResetDevice(
111 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
112 PSTATUS_BLOCK StatusBlock);
113
114 BOOLEAN FASTCALL
115 XboxVmpMapVideoMemory(
116 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
117 PVIDEO_MEMORY RequestedAddress,
118 PVIDEO_MEMORY_INFORMATION MapInformation,
119 PSTATUS_BLOCK StatusBlock);
120
121 BOOLEAN FASTCALL
122 XboxVmpUnmapVideoMemory(
123 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
124 PVIDEO_MEMORY VideoMemory,
125 PSTATUS_BLOCK StatusBlock);
126
127 BOOLEAN FASTCALL
128 XboxVmpQueryNumAvailModes(
129 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
130 PVIDEO_NUM_MODES Modes,
131 PSTATUS_BLOCK StatusBlock);
132
133 BOOLEAN FASTCALL
134 XboxVmpQueryAvailModes(
135 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
136 PVIDEO_MODE_INFORMATION ReturnedModes,
137 PSTATUS_BLOCK StatusBlock);
138
139 BOOLEAN FASTCALL
140 XboxVmpQueryCurrentMode(
141 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
142 PVIDEO_MODE_INFORMATION VideoModeInfo,
143 PSTATUS_BLOCK StatusBlock);
144
145 BOOLEAN FASTCALL
146 XboxVmpSetColorRegisters(
147 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
148 PVIDEO_CLUT ColorLookUpTable,
149 PSTATUS_BLOCK StatusBlock);
150
151 /* EOF */