VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h@ 2982

Last change on this file since 2982 was 2981, checked in by vboxsync, 18 years ago

InnoTek -> innotek: all the headers and comments.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.5 KB
Line 
1/** @file
2 * VirtualBox Video miniport driver
3 *
4 * Copyright (C) 2006-2007 innotek GmbH
5 *
6 * This file is part of VirtualBox Open Source Edition (OSE), as
7 * available from http://www.virtualbox.org. This file is free software;
8 * you can redistribute it and/or modify it under the terms of the GNU
9 * General Public License as published by the Free Software Foundation,
10 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
11 * distribution. VirtualBox OSE is distributed in the hope that it will
12 * be useful, but WITHOUT ANY WARRANTY of any kind.
13 *
14 * If you received this file as part of a commercial VirtualBox
15 * distribution, then only the terms of your commercial VirtualBox
16 * license agreement apply instead of the previous paragraph.
17 *
18 */
19
20#ifndef VBOXVIDEO_H
21#define VBOXVIDEO_H
22
23#include <VBox/cdefs.h>
24#include <VBox/types.h>
25#include <iprt/assert.h>
26
27__BEGIN_DECLS
28#include "dderror.h"
29#include "devioctl.h"
30#include "miniport.h"
31#include "ntddvdeo.h"
32#include "video.h"
33__END_DECLS
34
35
36#define VBE_DISPI_IOPORT_INDEX 0x01CE
37#define VBE_DISPI_IOPORT_DATA 0x01CF
38#define VBE_DISPI_INDEX_ID 0x0
39#define VBE_DISPI_INDEX_XRES 0x1
40#define VBE_DISPI_INDEX_YRES 0x2
41#define VBE_DISPI_INDEX_BPP 0x3
42#define VBE_DISPI_INDEX_ENABLE 0x4
43#define VBE_DISPI_INDEX_VIRT_WIDTH 0x6
44#define VBE_DISPI_INDEX_VIRT_HEIGHT 0x7
45#define VBE_DISPI_INDEX_CMONITORS 0xa
46#define VBE_DISPI_ID2 0xB0C2
47#define VBE_DISPI_DISABLED 0x00
48#define VBE_DISPI_ENABLED 0x01
49#define VBE_DISPI_LFB_ENABLED 0x40
50#define VBE_DISPI_LFB_PHYSICAL_ADDRESS 0xE0000000
51#define VBE_DISPI_TOTAL_VIDEO_MEMORY_MB 4
52#define VBE_DISPI_TOTAL_VIDEO_MEMORY_KB (VBE_DISPI_TOTAL_VIDEO_MEMORY_MB * 1024)
53#define VBE_DISPI_TOTAL_VIDEO_MEMORY_BYTES (VBE_DISPI_TOTAL_VIDEO_MEMORY_KB * 1024)
54
55typedef struct
56{
57 // Saved information about video modes
58 ULONG CurrentMode;
59
60 /* Pointer to preallocated generic request structure for VMMDevReq_VideoAccelFlush.
61 * Allocated when VBVA status is changed. Deallocated on HwReset.
62 */
63 void *pvReqFlush;
64
65 ULONG iDevice; /* Device index (0 for primary) */
66 PVOID pvPrimaryExt; /* Pointer to primary device extension */
67 BOOLEAN bEnabled; /* Device enabled flag */
68} DEVICE_EXTENSION, *PDEVICE_EXTENSION;
69
70extern "C"
71{
72
73__BEGIN_DECLS
74ULONG DriverEntry(IN PVOID Context1, IN PVOID Context2);
75__END_DECLS
76
77VP_STATUS VBoxVideoFindAdapter(
78 IN PVOID HwDeviceExtension,
79 IN PVOID HwContext,
80 IN PWSTR ArgumentString,
81 IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo,
82 OUT PUCHAR Again);
83
84BOOLEAN VBoxVideoInitialize(PVOID HwDeviceExtension);
85
86BOOLEAN VBoxVideoStartIO(
87 PVOID HwDeviceExtension,
88 PVIDEO_REQUEST_PACKET RequestPacket);
89
90BOOLEAN VBoxVideoResetHW(
91 PVOID HwDeviceExtension,
92 ULONG Columns,
93 ULONG Rows);
94
95VP_STATUS VBoxVideoGetPowerState(
96 PVOID HwDeviceExtension,
97 ULONG HwId,
98 PVIDEO_POWER_MANAGEMENT VideoPowerControl);
99
100VP_STATUS VBoxVideoSetPowerState(
101 PVOID HwDeviceExtension,
102 ULONG HwId,
103 PVIDEO_POWER_MANAGEMENT VideoPowerControl);
104
105BOOLEAN FASTCALL VBoxVideoSetCurrentMode(
106 PDEVICE_EXTENSION DeviceExtension,
107 PVIDEO_MODE RequestedMode,
108 PSTATUS_BLOCK StatusBlock);
109
110BOOLEAN FASTCALL VBoxVideoResetDevice(
111 PDEVICE_EXTENSION DeviceExtension,
112 PSTATUS_BLOCK StatusBlock);
113
114BOOLEAN FASTCALL VBoxVideoMapVideoMemory(
115 PDEVICE_EXTENSION DeviceExtension,
116 PVIDEO_MEMORY RequestedAddress,
117 PVIDEO_MEMORY_INFORMATION MapInformation,
118 PSTATUS_BLOCK StatusBlock);
119
120BOOLEAN FASTCALL VBoxVideoUnmapVideoMemory(
121 PDEVICE_EXTENSION DeviceExtension,
122 PVIDEO_MEMORY VideoMemory,
123 PSTATUS_BLOCK StatusBlock);
124
125BOOLEAN FASTCALL VBoxVideoQueryNumAvailModes(
126 PDEVICE_EXTENSION DeviceExtension,
127 PVIDEO_NUM_MODES Modes,
128 PSTATUS_BLOCK StatusBlock);
129
130BOOLEAN FASTCALL VBoxVideoQueryAvailModes(
131 PDEVICE_EXTENSION DeviceExtension,
132 PVIDEO_MODE_INFORMATION ReturnedModes,
133 PSTATUS_BLOCK StatusBlock);
134
135BOOLEAN FASTCALL VBoxVideoQueryCurrentMode(
136 PDEVICE_EXTENSION DeviceExtension,
137 PVIDEO_MODE_INFORMATION VideoModeInfo,
138 PSTATUS_BLOCK StatusBlock);
139
140BOOLEAN FASTCALL VBoxVideoSetColorRegisters(
141 PDEVICE_EXTENSION DeviceExtension,
142 PVIDEO_CLUT ColorLookUpTable,
143 PSTATUS_BLOCK StatusBlock);
144
145VP_STATUS VBoxVideoGetChildDescriptor(
146 PVOID HwDeviceExtension,
147 PVIDEO_CHILD_ENUM_INFO ChildEnumInfo,
148 PVIDEO_CHILD_TYPE VideoChildType,
149 PUCHAR pChildDescriptor,
150 PULONG pUId,
151 PULONG pUnused);
152
153} /* extern "C" */
154
155#endif /* VBOXVIDEO_H */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette