VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Miniport/vboxioctl.h@ 24709

Last change on this file since 24709 was 22548, checked in by vboxsync, 15 years ago

HGSMI/VBVA use port IO for guest commands in display driver instead of miniport callback.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.6 KB
Line 
1/** @file
2 * VBoxGraphics - VirtualBox Win 2000/XP guest video driver.
3 *
4 * Display driver entry points.
5 */
6
7/*
8 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23#ifndef __VBOXIOCTL__H
24#define __VBOXIOCTL__H
25
26#include <VBox/VMMDev.h>
27#include <VBox/VBoxGuest.h>
28
29#ifdef VBOX_WITH_HGSMI
30#include <VBox/HGSMI/HGSMI.h>
31#include "VBoxHGSMI.h"
32#endif /* VBOX_WITH_HGSMI */
33
34#define IOCTL_VIDEO_INTERPRET_DISPLAY_MEMORY \
35 CTL_CODE(FILE_DEVICE_VIDEO, 0x420, METHOD_BUFFERED, FILE_ANY_ACCESS)
36
37#define IOCTL_VIDEO_QUERY_DISPLAY_INFO \
38 CTL_CODE(FILE_DEVICE_VIDEO, 0x421, METHOD_BUFFERED, FILE_ANY_ACCESS)
39
40/** Called by the display driver when it is ready to
41 * switch to VBVA operation mode.
42 * Successful return means that VBVA can be used and
43 * output buffer contains VBVAENABLERESULT data.
44 * An error means that VBVA can not be used
45 * (disabled or not supported by the host).
46 */
47#define IOCTL_VIDEO_VBVA_ENABLE \
48 CTL_CODE(FILE_DEVICE_VIDEO, 0x400, METHOD_BUFFERED, FILE_ANY_ACCESS)
49
50#ifdef VBOX_WITH_HGSMI
51#define IOCTL_VIDEO_QUERY_HGSMI_INFO \
52 CTL_CODE(FILE_DEVICE_VIDEO, 0x430, METHOD_BUFFERED, FILE_ANY_ACCESS)
53
54#define IOCTL_VIDEO_HGSMI_QUERY_CALLBACKS \
55 CTL_CODE(FILE_DEVICE_VIDEO, 0x431, METHOD_BUFFERED, FILE_ANY_ACCESS)
56
57#define IOCTL_VIDEO_HGSMI_HANDLER_ENABLE \
58 CTL_CODE(FILE_DEVICE_VIDEO, 0x432, METHOD_BUFFERED, FILE_ANY_ACCESS)
59
60#define IOCTL_VIDEO_HGSMI_HANDLER_DISABLE \
61 CTL_CODE(FILE_DEVICE_VIDEO, 0x433, METHOD_BUFFERED, FILE_ANY_ACCESS)
62
63#define IOCTL_VIDEO_HGSMI_QUERY_PORTPROCS \
64 CTL_CODE(FILE_DEVICE_VIDEO, 0x434, METHOD_BUFFERED, FILE_ANY_ACCESS)
65
66#endif /* VBOX_WITH_HGSMI */
67
68#pragma pack(1)
69/**
70 * Data returned by IOCTL_VIDEO_VBVA_ENABLE.
71 *
72 */
73typedef struct _VBVAENABLERESULT
74{
75 /** Pointer to VBVAMemory part of VMMDev memory region. */
76 VBVAMEMORY *pVbvaMemory;
77
78 /** Called to force the host to process VBVA memory,
79 * when there is no more free space in VBVA memory.
80 * Normally this never happens.
81 *
82 * The other purpose is to perform a synchronous command.
83 * But the goal is to have no such commands at all.
84 */
85 DECLR0CALLBACKMEMBER(void, pfnFlush, (void *pvFlush));
86
87 /** Pointer required by the pfnFlush callback. */
88 void *pvFlush;
89
90} VBVAENABLERESULT;
91
92/**
93 * Data returned by IOCTL_VIDEO_QUERY_DISPLAY_INFO.
94 *
95 */
96typedef struct _QUERYDISPLAYINFORESULT
97{
98 /* Device index (0 for primary) */
99 ULONG iDevice;
100
101 /* Size of the display information area. */
102 uint32_t u32DisplayInfoSize;
103} QUERYDISPLAYINFORESULT;
104
105#ifdef VBOX_WITH_HGSMI
106/**
107 * Data returned by IOCTL_VIDEO_QUERY_HGSMI_INFO.
108 *
109 */
110typedef struct _QUERYHGSMIRESULT
111{
112 /* Device index (0 for primary) */
113 ULONG iDevice;
114
115 /* Flags. Currently none are defined and the field must be initialized to 0. */
116 ULONG ulFlags;
117
118 /* Describes VRAM chunk for this display device. */
119 HGSMIAREA areaDisplay;
120
121 /* Size of the display information area. */
122 uint32_t u32DisplayInfoSize;
123
124 /* Minimum size of the VBVA buffer. */
125 uint32_t u32MinVBVABufferSize;
126
127 /* IO port to submit guest HGSMI commands. */
128 RTIOPORT IOPortGuestCommand;
129} QUERYHGSMIRESULT;
130
131/**
132 * Data returned by IOCTL_VIDEO_HGSMI_QUERY_CALLBACKS.
133 *
134 */
135typedef struct _HGSMIQUERYCALLBACKS
136{
137 HVBOXVIDEOHGSMI hContext;
138 PFNVBOXVIDEOHGSMICOMPLETION pfnCompletionHandler;
139 PFNVBOXVIDEOHGSMICOMMANDS pfnRequestCommandsHandler;
140} HGSMIQUERYCALLBACKS;
141
142/**
143 * Data returned by IOCTL_VIDEO_HGSMI_QUERY_PORTPROCS
144 */
145typedef struct _HGSMIQUERYCPORTPROCS
146{
147 PVOID pContext;
148 VBOXVIDEOPORTPROCS VideoPortProcs;
149} HGSMIQUERYCPORTPROCS;
150
151/**
152 * Data returned by IOCTL_VIDEO_HGSMI_HANDLER_ENABLE.
153 *
154 */
155typedef struct _HGSMIHANDLERENABLE
156{
157 uint8_t u8Channel;
158} HGSMIHANDLERENABLE;
159
160/**
161 * Data passed by IOCTL_VIDEO_HGSMI_HANDLER_DISABLE.
162 *
163 */
164typedef struct _HGSMIHANDLERDISABLE
165{
166 uint8_t u8Channel;
167} HGSMIHANDLERDISABLE;
168
169#endif /* VBOX_WITH_HGSMI */
170#pragma pack()
171
172#endif /* __VBOXIOCTL__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