1 | /* $Id: VBoxMPVidPn.h 37490 2011-06-16 10:58:27Z vboxsync $ */
|
---|
2 |
|
---|
3 | /** @file
|
---|
4 | * VBox WDDM Miniport driver
|
---|
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 ___VBoxMPVidPn_h___
|
---|
20 | #define ___VBoxMPVidPn_h___
|
---|
21 |
|
---|
22 | #define VBOXVDPN_C_DISPLAY_HBLANK_SIZE 200
|
---|
23 | #define VBOXVDPN_C_DISPLAY_VBLANK_SIZE 180
|
---|
24 |
|
---|
25 | NTSTATUS vboxVidPnCheckSourceModeInfo(const D3DKMDT_HVIDPN hDesiredVidPn,
|
---|
26 | const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo,
|
---|
27 | BOOLEAN *pbSupported);
|
---|
28 |
|
---|
29 | NTSTATUS vboxVidPnCheckSourceModeSet(const D3DKMDT_HVIDPN hDesiredVidPn,
|
---|
30 | D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
|
---|
31 | BOOLEAN *pbSupported);
|
---|
32 |
|
---|
33 | NTSTATUS vboxVidPnCheckTargetModeInfo(const D3DKMDT_HVIDPN hDesiredVidPn,
|
---|
34 | const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo,
|
---|
35 | BOOLEAN *pbSupported);
|
---|
36 |
|
---|
37 | NTSTATUS vboxVidPnCheckTargetModeSet(const D3DKMDT_HVIDPN hDesiredVidPn,
|
---|
38 | D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
|
---|
39 | BOOLEAN *pbSupported);
|
---|
40 |
|
---|
41 | typedef enum
|
---|
42 | {
|
---|
43 | VBOXVIDPNPATHITEM_STATE_NOT_EXISTS = 0,
|
---|
44 | VBOXVIDPNPATHITEM_STATE_PRESENT,
|
---|
45 | VBOXVIDPNPATHITEM_STATE_DISABLED
|
---|
46 | } VBOXVIDPNPATHITEM_STATE;
|
---|
47 |
|
---|
48 | typedef struct VBOXVIDPNPATHITEM
|
---|
49 | {
|
---|
50 | VBOXVIDPNPATHITEM_STATE enmState;
|
---|
51 | } VBOXVIDPNPATHITEM, *PVBOXVIDPNPATHITEM;
|
---|
52 |
|
---|
53 | typedef struct VBOXVIDPNCOFUNCMODALITY
|
---|
54 | {
|
---|
55 | NTSTATUS Status;
|
---|
56 | PVBOXMP_DEVEXT pDevExt;
|
---|
57 | const DXGK_VIDPN_INTERFACE* pVidPnInterface;
|
---|
58 | CONST DXGKARG_ENUMVIDPNCOFUNCMODALITY* pEnumCofuncModalityArg;
|
---|
59 | PVBOXWDDM_VIDEOMODES_INFO pInfos;
|
---|
60 | UINT cPathInfos;
|
---|
61 | PVBOXVIDPNPATHITEM apPathInfos;
|
---|
62 | } VBOXVIDPNCOFUNCMODALITY, *PVBOXVIDPNCOFUNCMODALITY;
|
---|
63 |
|
---|
64 | typedef struct VBOXVIDPNCOMMIT
|
---|
65 | {
|
---|
66 | NTSTATUS Status;
|
---|
67 | PVBOXMP_DEVEXT pDevExt;
|
---|
68 | const DXGK_VIDPN_INTERFACE* pVidPnInterface;
|
---|
69 | CONST DXGKARG_COMMITVIDPN* pCommitVidPnArg;
|
---|
70 | } VBOXVIDPNCOMMIT, *PVBOXVIDPNCOMMIT;
|
---|
71 |
|
---|
72 | /* !!!NOTE: The callback is responsible for releasing the path */
|
---|
73 | typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMPATHS(D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
74 | const D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo, PVOID pContext);
|
---|
75 | typedef FNVBOXVIDPNENUMPATHS *PFNVBOXVIDPNENUMPATHS;
|
---|
76 |
|
---|
77 | /* !!!NOTE: The callback is responsible for releasing the source mode info */
|
---|
78 | typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMSOURCEMODES(D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
|
---|
79 | const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, PVOID pContext);
|
---|
80 | typedef FNVBOXVIDPNENUMSOURCEMODES *PFNVBOXVIDPNENUMSOURCEMODES;
|
---|
81 |
|
---|
82 | /* !!!NOTE: The callback is responsible for releasing the target mode info */
|
---|
83 | typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMTARGETMODES(D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
|
---|
84 | const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo, PVOID pContext);
|
---|
85 | typedef FNVBOXVIDPNENUMTARGETMODES *PFNVBOXVIDPNENUMTARGETMODES;
|
---|
86 |
|
---|
87 | /* !!!NOTE: The callback is responsible for releasing the source mode info */
|
---|
88 | typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMMONITORSOURCEMODES(D3DKMDT_HMONITORSOURCEMODESET hMonitorSMS, CONST DXGK_MONITORSOURCEMODESET_INTERFACE *pMonitorSMSIf,
|
---|
89 | CONST D3DKMDT_MONITOR_SOURCE_MODE *pMonitorSMI, PVOID pContext);
|
---|
90 | typedef FNVBOXVIDPNENUMMONITORSOURCEMODES *PFNVBOXVIDPNENUMMONITORSOURCEMODES;
|
---|
91 |
|
---|
92 | typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMTARGETSFORSOURCE(PVBOXMP_DEVEXT pDevExt, D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
93 | CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId, SIZE_T cTgtPaths, PVOID pContext);
|
---|
94 | typedef FNVBOXVIDPNENUMTARGETSFORSOURCE *PFNVBOXVIDPNENUMTARGETSFORSOURCE;
|
---|
95 |
|
---|
96 | DECLCALLBACK(BOOLEAN) vboxVidPnCofuncModalityPathEnum(D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
97 | const D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo, PVOID pContext);
|
---|
98 |
|
---|
99 | DECLCALLBACK(BOOLEAN) vboxVidPnCofuncModalitySourceModeEnum(PVBOXMP_DEVEXT pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
100 | D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
|
---|
101 | const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, PVOID pContext);
|
---|
102 |
|
---|
103 | DECLCALLBACK(BOOLEAN) vboxVidPnCofuncModalityTargetModeEnum(PVBOXMP_DEVEXT pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
104 | D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
|
---|
105 | const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo, PVOID pContext);
|
---|
106 |
|
---|
107 | DECLCALLBACK(BOOLEAN) vboxVidPnCommitPathEnum(D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
108 | const D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo, PVOID pContext);
|
---|
109 |
|
---|
110 | NTSTATUS vboxVidPnCommitSourceModeForSrcId(PVBOXMP_DEVEXT pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId, struct VBOXWDDM_ALLOCATION *pAllocation);
|
---|
111 |
|
---|
112 | NTSTATUS vboxVidPnEnumPaths(D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
113 | PFNVBOXVIDPNENUMPATHS pfnCallback, PVOID pContext);
|
---|
114 |
|
---|
115 | NTSTATUS vboxVidPnEnumSourceModes(D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
|
---|
116 | PFNVBOXVIDPNENUMSOURCEMODES pfnCallback, PVOID pContext);
|
---|
117 |
|
---|
118 | NTSTATUS vboxVidPnEnumTargetModes(D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
|
---|
119 | PFNVBOXVIDPNENUMTARGETMODES pfnCallback, PVOID pContext);
|
---|
120 |
|
---|
121 | NTSTATUS vboxVidPnEnumMonitorSourceModes(D3DKMDT_HMONITORSOURCEMODESET hMonitorSMS, CONST DXGK_MONITORSOURCEMODESET_INTERFACE *pMonitorSMSIf,
|
---|
122 | PFNVBOXVIDPNENUMMONITORSOURCEMODES pfnCallback, PVOID pContext);
|
---|
123 |
|
---|
124 | NTSTATUS vboxVidPnEnumTargetsForSource(PVBOXMP_DEVEXT pDevExt, D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
125 | CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId,
|
---|
126 | PFNVBOXVIDPNENUMTARGETSFORSOURCE pfnCallback, PVOID pContext);
|
---|
127 |
|
---|
128 | NTSTATUS vboxVidPnPopulateMonitorSourceModeInfoFromLegacy(PVBOXMP_DEVEXT pDevExt,
|
---|
129 | D3DKMDT_MONITOR_SOURCE_MODE *pMonitorSourceMode,
|
---|
130 | D3DKMDT_2DREGION *pResolution,
|
---|
131 | D3DKMDT_MONITOR_CAPABILITIES_ORIGIN enmOrigin,
|
---|
132 | BOOLEAN bPreferred);
|
---|
133 |
|
---|
134 | NTSTATUS vboxVidPnCreatePopulateVidPnPathFromLegacy(PVBOXMP_DEVEXT pDevExt, D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
135 | VIDEO_MODE_INFORMATION *pModes, uint32_t cModes, int iPreferredMode,
|
---|
136 | D3DKMDT_2DREGION *pResolutions, uint32_t cResolutions,
|
---|
137 | const D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, const D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId);
|
---|
138 |
|
---|
139 | NTSTATUS vboxVidPnCheckAddMonitorModes(PVBOXMP_DEVEXT pDevExt,
|
---|
140 | D3DDDI_VIDEO_PRESENT_TARGET_ID targetId, D3DKMDT_MONITOR_CAPABILITIES_ORIGIN enmOrigin,
|
---|
141 | D3DKMDT_2DREGION *pResolutions, uint32_t cResolutions, int iPreferred);
|
---|
142 |
|
---|
143 | NTSTATUS vboxVidPnMatchMonitorModes(PVBOXMP_DEVEXT pDevExt, D3DDDI_VIDEO_PRESENT_TARGET_ID targetId,
|
---|
144 | D3DKMDT_2DREGION *pResolutions, uint32_t cResolutions, BOOLEAN *pfMatch);
|
---|
145 |
|
---|
146 | NTSTATUS vboxVidPnCofuncModalityForPath(PVBOXVIDPNCOFUNCMODALITY pCbContext, D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId);
|
---|
147 |
|
---|
148 | NTSTATUS vboxVidPnCheckTopology(D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
149 | BOOLEAN fBreakOnDisabled, UINT cItems, PVBOXVIDPNPATHITEM paItems, BOOLEAN *pfDisabledFound);
|
---|
150 |
|
---|
151 | NTSTATUS vboxVidPnPathAdd(D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
152 | const D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, const D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId);
|
---|
153 |
|
---|
154 | void vboxVidPnDumpVidPn(const char * pPrefix, PVBOXMP_DEVEXT pDevExt, D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, const char * pSuffix);
|
---|
155 | void vboxVidPnDumpCofuncModalityArg(const char *pPrefix, CONST DXGKARG_ENUMVIDPNCOFUNCMODALITY* CONST pEnumCofuncModalityArg, const char *pSuffix);
|
---|
156 | DECLCALLBACK(BOOLEAN) vboxVidPnDumpSourceModeSetEnum(D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
|
---|
157 | const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, PVOID pContext);
|
---|
158 | DECLCALLBACK(BOOLEAN) vboxVidPnDumpTargetModeSetEnum(D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
|
---|
159 | const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo, PVOID pContext);
|
---|
160 |
|
---|
161 | #endif /* #ifndef ___VBoxMPVidPn_h___ */
|
---|