1 | /*
|
---|
2 | * Copyright (C) 2010 Oracle Corporation
|
---|
3 | *
|
---|
4 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
5 | * available from http://www.virtualbox.org. This file is free software;
|
---|
6 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
7 | * General Public License (GPL) as published by the Free Software
|
---|
8 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
9 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
10 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
11 | */
|
---|
12 | #ifndef ___VBoxVideoVidPn_h___
|
---|
13 | #define ___VBoxVideoVidPn_h___
|
---|
14 |
|
---|
15 | #include "../VBoxVideo.h"
|
---|
16 |
|
---|
17 | #define VBOXVDPN_C_DISPLAY_HBLANK_SIZE 200
|
---|
18 | #define VBOXVDPN_C_DISPLAY_VBLANK_SIZE 180
|
---|
19 |
|
---|
20 | NTSTATUS vboxVidPnCheckTopology(const D3DKMDT_HVIDPN hDesiredVidPn,
|
---|
21 | D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
22 | BOOLEAN *pbSupported);
|
---|
23 |
|
---|
24 | NTSTATUS vboxVidPnCheckSourceModeInfo(const D3DKMDT_HVIDPN hDesiredVidPn,
|
---|
25 | const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo,
|
---|
26 | BOOLEAN *pbSupported);
|
---|
27 |
|
---|
28 | NTSTATUS vboxVidPnCheckSourceModeSet(const D3DKMDT_HVIDPN hDesiredVidPn,
|
---|
29 | D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
|
---|
30 | BOOLEAN *pbSupported);
|
---|
31 |
|
---|
32 | NTSTATUS vboxVidPnCheckTargetModeInfo(const D3DKMDT_HVIDPN hDesiredVidPn,
|
---|
33 | const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo,
|
---|
34 | BOOLEAN *pbSupported);
|
---|
35 |
|
---|
36 | NTSTATUS vboxVidPnCheckTargetModeSet(const D3DKMDT_HVIDPN hDesiredVidPn,
|
---|
37 | D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
|
---|
38 | BOOLEAN *pbSupported);
|
---|
39 |
|
---|
40 | typedef struct VBOXVIDPNCOFUNCMODALITY
|
---|
41 | {
|
---|
42 | NTSTATUS Status;
|
---|
43 | CONST DXGKARG_ENUMVIDPNCOFUNCMODALITY* pEnumCofuncModalityArg;
|
---|
44 | PVBOXWDDM_VIDEOMODES_INFO pInfos;
|
---|
45 | } VBOXVIDPNCOFUNCMODALITY, *PVBOXVIDPNCOFUNCMODALITY;
|
---|
46 |
|
---|
47 | typedef struct VBOXVIDPNCOMMIT
|
---|
48 | {
|
---|
49 | NTSTATUS Status;
|
---|
50 | CONST DXGKARG_COMMITVIDPN* pCommitVidPnArg;
|
---|
51 | } VBOXVIDPNCOMMIT, *PVBOXVIDPNCOMMIT;
|
---|
52 |
|
---|
53 | /* !!!NOTE: The callback is responsible for releasing the path */
|
---|
54 | typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMPATHS(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
55 | D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
56 | const D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo, PVOID pContext);
|
---|
57 | typedef FNVBOXVIDPNENUMPATHS *PFNVBOXVIDPNENUMPATHS;
|
---|
58 |
|
---|
59 | /* !!!NOTE: The callback is responsible for releasing the source mode info */
|
---|
60 | typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMSOURCEMODES(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
61 | D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
|
---|
62 | const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, PVOID pContext);
|
---|
63 | typedef FNVBOXVIDPNENUMSOURCEMODES *PFNVBOXVIDPNENUMSOURCEMODES;
|
---|
64 |
|
---|
65 | /* !!!NOTE: The callback is responsible for releasing the target mode info */
|
---|
66 | typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMTARGETMODES(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
67 | D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
|
---|
68 | const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo, PVOID pContext);
|
---|
69 | typedef FNVBOXVIDPNENUMTARGETMODES *PFNVBOXVIDPNENUMTARGETMODES;
|
---|
70 |
|
---|
71 | /* !!!NOTE: The callback is responsible for releasing the source mode info */
|
---|
72 | typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMMONITORSOURCEMODES(struct _DEVICE_EXTENSION* pDevExt, D3DKMDT_HMONITORSOURCEMODESET hMonitorSMS, CONST DXGK_MONITORSOURCEMODESET_INTERFACE *pMonitorSMSIf,
|
---|
73 | CONST D3DKMDT_MONITOR_SOURCE_MODE *pMonitorSMI, PVOID pContext);
|
---|
74 | typedef FNVBOXVIDPNENUMMONITORSOURCEMODES *PFNVBOXVIDPNENUMMONITORSOURCEMODES;
|
---|
75 |
|
---|
76 | typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMTARGETSFORSOURCE(PDEVICE_EXTENSION pDevExt, D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
77 | CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId, SIZE_T cTgtPaths, PVOID pContext);
|
---|
78 | typedef FNVBOXVIDPNENUMTARGETSFORSOURCE *PFNVBOXVIDPNENUMTARGETSFORSOURCE;
|
---|
79 |
|
---|
80 | DECLCALLBACK(BOOLEAN) vboxVidPnCofuncModalityPathEnum(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
81 | D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
82 | const D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo, PVOID pContext);
|
---|
83 |
|
---|
84 | DECLCALLBACK(BOOLEAN) vboxVidPnCofuncModalitySourceModeEnum(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
85 | D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
|
---|
86 | const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, PVOID pContext);
|
---|
87 |
|
---|
88 | DECLCALLBACK(BOOLEAN) vboxVidPnCofuncModalityTargetModeEnum(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
89 | D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
|
---|
90 | const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo, PVOID pContext);
|
---|
91 |
|
---|
92 | DECLCALLBACK(BOOLEAN) vboxVidPnCommitPathEnum(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
93 | D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
94 | const D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo, PVOID pContext);
|
---|
95 |
|
---|
96 | NTSTATUS vboxVidPnCommitSourceModeForSrcId(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId, struct VBOXWDDM_ALLOCATION *pAllocation);
|
---|
97 |
|
---|
98 | NTSTATUS vboxVidPnEnumPaths(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
99 | D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
100 | PFNVBOXVIDPNENUMPATHS pfnCallback, PVOID pContext);
|
---|
101 |
|
---|
102 | NTSTATUS vboxVidPnEnumSourceModes(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
103 | D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
|
---|
104 | PFNVBOXVIDPNENUMSOURCEMODES pfnCallback, PVOID pContext);
|
---|
105 |
|
---|
106 | NTSTATUS vboxVidPnEnumTargetModes(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
107 | D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
|
---|
108 | PFNVBOXVIDPNENUMTARGETMODES pfnCallback, PVOID pContext);
|
---|
109 |
|
---|
110 | NTSTATUS vboxVidPnEnumMonitorSourceModes(struct _DEVICE_EXTENSION* pDevExt, D3DKMDT_HMONITORSOURCEMODESET hMonitorSMS, CONST DXGK_MONITORSOURCEMODESET_INTERFACE *pMonitorSMSIf,
|
---|
111 | PFNVBOXVIDPNENUMMONITORSOURCEMODES pfnCallback, PVOID pContext);
|
---|
112 |
|
---|
113 | NTSTATUS vboxVidPnEnumTargetsForSource(PDEVICE_EXTENSION pDevExt, D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
114 | CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId,
|
---|
115 | PFNVBOXVIDPNENUMTARGETSFORSOURCE pfnCallback, PVOID pContext);
|
---|
116 |
|
---|
117 | NTSTATUS vboxVidPnPopulateMonitorSourceModeInfoFromLegacy(struct _DEVICE_EXTENSION* pDevExt,
|
---|
118 | D3DKMDT_MONITOR_SOURCE_MODE *pMonitorSourceMode,
|
---|
119 | D3DKMDT_2DREGION *pResolution,
|
---|
120 | D3DKMDT_MONITOR_CAPABILITIES_ORIGIN enmOrigin,
|
---|
121 | BOOLEAN bPreferred);
|
---|
122 |
|
---|
123 | NTSTATUS vboxVidPnCreatePopulateVidPnFromLegacy(PDEVICE_EXTENSION pDevExt, D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
124 | VIDEO_MODE_INFORMATION *pModes, uint32_t cModes, int iPreferredMode,
|
---|
125 | D3DKMDT_2DREGION *pResolutions, uint32_t cResolutions,
|
---|
126 | const D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId, const D3DDDI_VIDEO_PRESENT_TARGET_ID tgtId);
|
---|
127 |
|
---|
128 | NTSTATUS vboxVidPnCheckAddMonitorModes(struct _DEVICE_EXTENSION* pDevExt,
|
---|
129 | D3DDDI_VIDEO_PRESENT_TARGET_ID targetId, D3DKMDT_MONITOR_CAPABILITIES_ORIGIN enmOrigin,
|
---|
130 | D3DKMDT_2DREGION *pResolutions, uint32_t cResolutions, int32_t iPreferred);
|
---|
131 | #endif /* #ifndef ___VBoxVideoVidPn_h___ */
|
---|