VirtualBox

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

Last change on this file since 3539 was 3153, checked in by vboxsync, 17 years ago

Multimonitor support.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.8 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/* The VBOX interface id. Indicates support for VBE_DISPI_INDEX_CMONITORS. */
48#define VBE_DISPI_ID_VBOX_VIDEO 0xBE00
49#define VBE_DISPI_DISABLED 0x00
50#define VBE_DISPI_ENABLED 0x01
51#define VBE_DISPI_LFB_ENABLED 0x40
52#define VBE_DISPI_LFB_PHYSICAL_ADDRESS 0xE0000000
53#define VBE_DISPI_TOTAL_VIDEO_MEMORY_MB 4
54#define VBE_DISPI_TOTAL_VIDEO_MEMORY_KB (VBE_DISPI_TOTAL_VIDEO_MEMORY_MB * 1024)
55#define VBE_DISPI_TOTAL_VIDEO_MEMORY_BYTES (VBE_DISPI_TOTAL_VIDEO_MEMORY_KB * 1024)
56
57typedef struct
58{
59 // Saved information about video modes
60 ULONG CurrentMode;
61
62 /* Pointer to preallocated generic request structure for VMMDevReq_VideoAccelFlush.
63 * Allocated when VBVA status is changed. Deallocated on HwReset.
64 */
65 void *pvReqFlush;
66
67 ULONG iDevice; /* Device index (0 for primary) */
68 PVOID pvPrimaryExt; /* Pointer to primary device extension */
69 BOOLEAN bEnabled; /* Device enabled flag */
70
71 ULONG ulFrameBufferOffset;
72 ULONG ulMaxFrameBufferSize;
73
74 BOOLEAN bDualViewSupported;
75
76 PVOID AdapterInformation;
77
78 ULONG ulVbvaEnabled;
79} DEVICE_EXTENSION, *PDEVICE_EXTENSION;
80
81extern "C"
82{
83
84__BEGIN_DECLS
85ULONG DriverEntry(IN PVOID Context1, IN PVOID Context2);
86__END_DECLS
87
88VP_STATUS VBoxVideoFindAdapter(
89 IN PVOID HwDeviceExtension,
90 IN PVOID HwContext,
91 IN PWSTR ArgumentString,
92 IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo,
93 OUT PUCHAR Again);
94
95BOOLEAN VBoxVideoInitialize(PVOID HwDeviceExtension);
96
97BOOLEAN VBoxVideoStartIO(
98 PVOID HwDeviceExtension,
99 PVIDEO_REQUEST_PACKET RequestPacket);
100
101BOOLEAN VBoxVideoResetHW(
102 PVOID HwDeviceExtension,
103 ULONG Columns,
104 ULONG Rows);
105
106VP_STATUS VBoxVideoGetPowerState(
107 PVOID HwDeviceExtension,
108 ULONG HwId,
109 PVIDEO_POWER_MANAGEMENT VideoPowerControl);
110
111VP_STATUS VBoxVideoSetPowerState(
112 PVOID HwDeviceExtension,
113 ULONG HwId,
114 PVIDEO_POWER_MANAGEMENT VideoPowerControl);
115
116BOOLEAN FASTCALL VBoxVideoSetCurrentMode(
117 PDEVICE_EXTENSION DeviceExtension,
118 PVIDEO_MODE RequestedMode,
119 PSTATUS_BLOCK StatusBlock);
120
121BOOLEAN FASTCALL VBoxVideoResetDevice(
122 PDEVICE_EXTENSION DeviceExtension,
123 PSTATUS_BLOCK StatusBlock);
124
125BOOLEAN FASTCALL VBoxVideoMapVideoMemory(
126 PDEVICE_EXTENSION DeviceExtension,
127 PVIDEO_MEMORY RequestedAddress,
128 PVIDEO_MEMORY_INFORMATION MapInformation,
129 PSTATUS_BLOCK StatusBlock);
130
131BOOLEAN FASTCALL VBoxVideoUnmapVideoMemory(
132 PDEVICE_EXTENSION DeviceExtension,
133 PVIDEO_MEMORY VideoMemory,
134 PSTATUS_BLOCK StatusBlock);
135
136BOOLEAN FASTCALL VBoxVideoQueryNumAvailModes(
137 PDEVICE_EXTENSION DeviceExtension,
138 PVIDEO_NUM_MODES Modes,
139 PSTATUS_BLOCK StatusBlock);
140
141BOOLEAN FASTCALL VBoxVideoQueryAvailModes(
142 PDEVICE_EXTENSION DeviceExtension,
143 PVIDEO_MODE_INFORMATION ReturnedModes,
144 PSTATUS_BLOCK StatusBlock);
145
146BOOLEAN FASTCALL VBoxVideoQueryCurrentMode(
147 PDEVICE_EXTENSION DeviceExtension,
148 PVIDEO_MODE_INFORMATION VideoModeInfo,
149 PSTATUS_BLOCK StatusBlock);
150
151BOOLEAN FASTCALL VBoxVideoSetColorRegisters(
152 PDEVICE_EXTENSION DeviceExtension,
153 PVIDEO_CLUT ColorLookUpTable,
154 PSTATUS_BLOCK StatusBlock);
155
156VP_STATUS VBoxVideoGetChildDescriptor(
157 PVOID HwDeviceExtension,
158 PVIDEO_CHILD_ENUM_INFO ChildEnumInfo,
159 PVIDEO_CHILD_TYPE VideoChildType,
160 PUCHAR pChildDescriptor,
161 PULONG pUId,
162 PULONG pUnused);
163
164} /* extern "C" */
165
166#endif /* VBOXVIDEO_H */
Note: See TracBrowser for help on using the repository browser.

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