VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Video/common/xpdm/VBoxVideoIOCTL.h@ 56378

Last change on this file since 56378 was 46896, checked in by vboxsync, 12 years ago

VBoxDisp,VBoxVideo,VBoxControl: registry flags to tweak the Windows guest graphics driver.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.2 KB
Line 
1/* $Id: VBoxVideoIOCTL.h 46896 2013-07-02 08:16:43Z vboxsync $ */
2
3/** @file
4 * VBox Miniport IOCTL related header
5 */
6
7/*
8 * Copyright (C) 2011 Oracle Corporation
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
19#ifndef VBOXVIDEOIOCTL_H
20#define VBOXVIDEOIOCTL_H
21
22#include <VBox/VMMDev.h>
23#include <VBox/HGSMI/HGSMI.h>
24
25/* ==================== Virtual Box specific VRP's ==================== */
26
27/* Called by the display driver when it is ready to
28 * switch to VBVA operation mode.
29 * Successful return means that VBVA can be used and
30 * output buffer contains VBVAENABLERESULT data.
31 * An error means that VBVA can not be used
32 * (disabled or not supported by the host).
33 */
34#define IOCTL_VIDEO_VBVA_ENABLE \
35 CTL_CODE(FILE_DEVICE_VIDEO, 0x400, METHOD_BUFFERED, FILE_ANY_ACCESS)
36
37/* Called to get video port api function pointers */
38#define IOCTL_VIDEO_HGSMI_QUERY_PORTPROCS \
39 CTL_CODE(FILE_DEVICE_VIDEO, 0x434, METHOD_BUFFERED, FILE_ANY_ACCESS)
40
41/* Called to get HGSMI related callbacks */
42#define IOCTL_VIDEO_HGSMI_QUERY_CALLBACKS \
43 CTL_CODE(FILE_DEVICE_VIDEO, 0x431, METHOD_BUFFERED, FILE_ANY_ACCESS)
44
45/* Called to get adapter's HGSMI information */
46#define IOCTL_VIDEO_QUERY_HGSMI_INFO \
47 CTL_CODE(FILE_DEVICE_VIDEO, 0x430, METHOD_BUFFERED, FILE_ANY_ACCESS)
48
49/* Called to enable HGSMI miniport channel */
50#define IOCTL_VIDEO_HGSMI_HANDLER_ENABLE \
51 CTL_CODE(FILE_DEVICE_VIDEO, 0x432, METHOD_BUFFERED, FILE_ANY_ACCESS)
52
53/* Called to disable HGSMI miniport channel */
54#define IOCTL_VIDEO_HGSMI_HANDLER_DISABLE \
55 CTL_CODE(FILE_DEVICE_VIDEO, 0x433, METHOD_BUFFERED, FILE_ANY_ACCESS)
56
57/* Called to get framebuffer offset */
58#define IOCTL_VIDEO_VHWA_QUERY_INFO \
59 CTL_CODE(FILE_DEVICE_VIDEO, 0x435, METHOD_BUFFERED, FILE_ANY_ACCESS)
60
61/* Called to get adapter's generic information */
62#define IOCTL_VIDEO_QUERY_VBOXVIDEO_INFO \
63 CTL_CODE(FILE_DEVICE_VIDEO, 0x436, METHOD_BUFFERED, FILE_ANY_ACCESS)
64
65/* ==================== Data structures used by Virtual Box VRPS's ==================== */
66typedef void* HVBOXVIDEOHGSMI;
67
68/* Complete host commands addressed to the display */
69typedef DECLCALLBACK(void) FNVBOXVIDEOHGSMICOMPLETION(HVBOXVIDEOHGSMI hHGSMI, struct VBVAHOSTCMD * pCmd);
70typedef FNVBOXVIDEOHGSMICOMPLETION *PFNVBOXVIDEOHGSMICOMPLETION;
71
72/* request the host commands addressed to the display */
73typedef DECLCALLBACK(int) FNVBOXVIDEOHGSMICOMMANDS(HVBOXVIDEOHGSMI hHGSMI, uint8_t u8Channel, uint32_t iDevice, struct VBVAHOSTCMD ** ppCmd);
74typedef FNVBOXVIDEOHGSMICOMMANDS *PFNVBOXVIDEOHGSMICOMMANDS;
75
76/* post guest command (offset) to the host */
77typedef DECLCALLBACK(void) FNVBOXVIDEOHGSMIPOSTCOMMAND(HVBOXVIDEOHGSMI hHGSMI, HGSMIOFFSET offCmd);
78typedef FNVBOXVIDEOHGSMIPOSTCOMMAND *PFNVBOXVIDEOHGSMIPOSTCOMMAND;
79
80#pragma pack(1)
81/* Data returned by IOCTL_VIDEO_VBVA_ENABLE. */
82typedef struct _VBVAENABLERESULT
83{
84 /* Pointer to VBVAMemory part of VMMDev memory region. */
85 VBVAMEMORY *pVbvaMemory;
86
87 /* Called to force the host to process VBVA memory,
88 * when there is no more free space in VBVA memory.
89 * Normally this never happens.
90 *
91 * The other purpose is to perform a synchronous command.
92 * But the goal is to have no such commands at all.
93 */
94 DECLR0CALLBACKMEMBER(void, pfnFlush, (void *pvFlush));
95
96 /* Pointer required by the pfnFlush callback. */
97 void *pvFlush;
98
99} VBVAENABLERESULT;
100
101/* Data returned by IOCTL_VIDEO_HGSMI_QUERY_PORTPROCS. */
102typedef struct _HGSMIQUERYCPORTPROCS
103{
104 PVOID pContext;
105 VBOXVIDEOPORTPROCS VideoPortProcs;
106} HGSMIQUERYCPORTPROCS;
107
108/* Data returned by IOCTL_VIDEO_HGSMI_QUERY_CALLBACKS. */
109typedef struct _HGSMIQUERYCALLBACKS
110{
111 HVBOXVIDEOHGSMI hContext;
112 PFNVBOXVIDEOHGSMICOMPLETION pfnCompletionHandler;
113 PFNVBOXVIDEOHGSMICOMMANDS pfnRequestCommandsHandler;
114} HGSMIQUERYCALLBACKS;
115
116/* Data returned by IOCTL_VIDEO_QUERY_HGSMI_INFO. */
117typedef struct _QUERYHGSMIRESULT
118{
119 /* Device index (0 for primary) */
120 ULONG iDevice;
121
122 /* Flags. Currently none are defined and the field must be initialized to 0. */
123 ULONG ulFlags;
124
125 /* Describes VRAM chunk for this display device. */
126 HGSMIAREA areaDisplay;
127
128 /* Size of the display information area. */
129 uint32_t u32DisplayInfoSize;
130
131 /* Minimum size of the VBVA buffer. */
132 uint32_t u32MinVBVABufferSize;
133
134 /* IO port to submit guest HGSMI commands. */
135 RTIOPORT IOPortGuestCommand;
136} QUERYHGSMIRESULT;
137
138/* Data passed to IOCTL_VIDEO_HGSMI_HANDLER_ENABLE. */
139typedef struct _HGSMIHANDLERENABLE
140{
141 uint8_t u8Channel;
142} HGSMIHANDLERENABLE;
143
144#ifdef VBOX_WITH_VIDEOHWACCEL
145/* Data returned by IOCTL_VIDEO_VHWA_QUERY_INFO. */
146typedef struct _VHWAQUERYINFO
147{
148 ULONG_PTR offVramBase;
149} VHWAQUERYINFO;
150#endif
151#pragma pack()
152
153/* IOCTL_VIDEO_QUERY_INFO */
154#define VBOXVIDEO_INFO_LEVEL_REGISTRY_FLAGS 1
155
156#define VBOXVIDEO_REGISTRY_FLAGS_DISABLE_BITMAP_CACHE 0x00000001
157
158#endif /*VBOXVIDEOIOCTL_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