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 | /* legacy mode information populated by the common XPDM-WDDM layer */
|
---|
45 | uint32_t cModes;
|
---|
46 | int iPreferredMode;
|
---|
47 | VIDEO_MODE_INFORMATION *pModes;
|
---|
48 | uint32_t cResolutions;
|
---|
49 | D3DKMDT_2DREGION *pResolutions;
|
---|
50 | } VBOXVIDPNCOFUNCMODALITY, *PVBOXVIDPNCOFUNCMODALITY;
|
---|
51 |
|
---|
52 | typedef struct VBOXVIDPNCOMMIT
|
---|
53 | {
|
---|
54 | NTSTATUS Status;
|
---|
55 | CONST DXGKARG_COMMITVIDPN* pCommitVidPnArg;
|
---|
56 | } VBOXVIDPNCOMMIT, *PVBOXVIDPNCOMMIT;
|
---|
57 |
|
---|
58 | /* !!!NOTE: The callback is responsible for releasing the path */
|
---|
59 | typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMPATHS(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
60 | D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
61 | const D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo, PVOID pContext);
|
---|
62 | typedef FNVBOXVIDPNENUMPATHS *PFNVBOXVIDPNENUMPATHS;
|
---|
63 |
|
---|
64 | /* !!!NOTE: The callback is responsible for releasing the source mode info */
|
---|
65 | typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMSOURCEMODES(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
66 | D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
|
---|
67 | const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, PVOID pContext);
|
---|
68 | typedef FNVBOXVIDPNENUMSOURCEMODES *PFNVBOXVIDPNENUMSOURCEMODES;
|
---|
69 |
|
---|
70 | /* !!!NOTE: The callback is responsible for releasing the target mode info */
|
---|
71 | typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMTARGETMODES(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
72 | D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
|
---|
73 | const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo, PVOID pContext);
|
---|
74 | typedef FNVBOXVIDPNENUMTARGETMODES *PFNVBOXVIDPNENUMTARGETMODES;
|
---|
75 |
|
---|
76 | /* !!!NOTE: The callback is responsible for releasing the source mode info */
|
---|
77 | typedef DECLCALLBACK(BOOLEAN) FNVBOXVIDPNENUMMONITORSOURCEMODES(struct _DEVICE_EXTENSION* pDevExt, D3DKMDT_HMONITORSOURCEMODESET hMonitorSMS, CONST DXGK_MONITORSOURCEMODESET_INTERFACE *pMonitorSMSIf,
|
---|
78 | CONST D3DKMDT_MONITOR_SOURCE_MODE *pMonitorSMI, PVOID pContext);
|
---|
79 | typedef FNVBOXVIDPNENUMMONITORSOURCEMODES *PFNVBOXVIDPNENUMMONITORSOURCEMODES;
|
---|
80 |
|
---|
81 |
|
---|
82 | DECLCALLBACK(BOOLEAN) vboxVidPnCofuncModalityPathEnum(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
83 | D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
84 | const D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo, PVOID pContext);
|
---|
85 |
|
---|
86 | DECLCALLBACK(BOOLEAN) vboxVidPnCofuncModalitySourceModeEnum(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
87 | D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
|
---|
88 | const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, PVOID pContext);
|
---|
89 |
|
---|
90 | DECLCALLBACK(BOOLEAN) vboxVidPnCofuncModalityTargetModeEnum(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
91 | D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
|
---|
92 | const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo, PVOID pContext);
|
---|
93 |
|
---|
94 | DECLCALLBACK(BOOLEAN) vboxVidPnCommitPathEnum(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
95 | D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
96 | const D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo, PVOID pContext);
|
---|
97 |
|
---|
98 | 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);
|
---|
99 |
|
---|
100 | NTSTATUS vboxVidPnEnumPaths(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
101 | D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
|
---|
102 | PFNVBOXVIDPNENUMPATHS pfnCallback, PVOID pContext);
|
---|
103 |
|
---|
104 | NTSTATUS vboxVidPnEnumSourceModes(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
105 | D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
|
---|
106 | PFNVBOXVIDPNENUMSOURCEMODES pfnCallback, PVOID pContext);
|
---|
107 |
|
---|
108 | NTSTATUS vboxVidPnEnumTargetModes(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
109 | D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
|
---|
110 | PFNVBOXVIDPNENUMTARGETMODES pfnCallback, PVOID pContext);
|
---|
111 |
|
---|
112 | NTSTATUS vboxVidPnEnumMonitorSourceModes(struct _DEVICE_EXTENSION* pDevExt, D3DKMDT_HMONITORSOURCEMODESET hMonitorSMS, CONST DXGK_MONITORSOURCEMODESET_INTERFACE *pMonitorSMSIf,
|
---|
113 | PFNVBOXVIDPNENUMMONITORSOURCEMODES pfnCallback, PVOID pContext);
|
---|
114 |
|
---|
115 | NTSTATUS vboxVidPnPopulateMonitorSourceModeInfoFromLegacy(struct _DEVICE_EXTENSION* pDevExt,
|
---|
116 | D3DKMDT_MONITOR_SOURCE_MODE *pMonitorSourceMode,
|
---|
117 | D3DKMDT_2DREGION *pResolution,
|
---|
118 | D3DKMDT_MONITOR_CAPABILITIES_ORIGIN enmOrigin,
|
---|
119 | BOOLEAN bPreferred);
|
---|
120 |
|
---|
121 | NTSTATUS vboxVidPnCreatePopulateVidPnFromLegacy(struct _DEVICE_EXTENSION* pDevExt, D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
|
---|
122 | VIDEO_MODE_INFORMATION *pModes, uint32_t cModes, int iPreferredMomde,
|
---|
123 | D3DKMDT_2DREGION *pResolutions, uint32_t cResolutions);
|
---|
124 |
|
---|
125 | NTSTATUS vboxVidPnCheckAddMonitorModes(struct _DEVICE_EXTENSION* pDevExt,
|
---|
126 | D3DDDI_VIDEO_PRESENT_TARGET_ID targetId, D3DKMDT_MONITOR_CAPABILITIES_ORIGIN enmOrigin,
|
---|
127 | D3DKMDT_2DREGION *pResolutions, uint32_t cResolutions, int32_t iPreferred);
|
---|
128 | #endif /* #ifndef ___VBoxVideoVidPn_h___ */
|
---|