1 | /*
|
---|
2 | * Copyright (C) 2010 Sun Microsystems, Inc.
|
---|
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 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
13 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
14 | * additional information or have any questions.
|
---|
15 | */
|
---|
16 |
|
---|
17 | #include "../VBoxVideo.h"
|
---|
18 | #include "../Helper.h"
|
---|
19 |
|
---|
20 | #include <VBox/VBoxGuestLib.h>
|
---|
21 |
|
---|
22 | #define VBOXWDDM_MEMTAG 'MDBV'
|
---|
23 | PVOID vboxWddmMemAlloc(IN SIZE_T cbSize)
|
---|
24 | {
|
---|
25 | return ExAllocatePoolWithTag(NonPagedPool, cbSize, VBOXWDDM_MEMTAG);
|
---|
26 | }
|
---|
27 |
|
---|
28 | PVOID vboxWddmMemAllocZero(IN SIZE_T cbSize)
|
---|
29 | {
|
---|
30 | PVOID pvMem = vboxWddmMemAlloc(cbSize);
|
---|
31 | memset(pvMem, 0, cbSize);
|
---|
32 | return pvMem;
|
---|
33 | }
|
---|
34 |
|
---|
35 |
|
---|
36 | VOID vboxWddmMemFree(PVOID pvMem)
|
---|
37 | {
|
---|
38 | ExFreePool(pvMem);
|
---|
39 | }
|
---|
40 |
|
---|
41 | NTSTATUS vboxWddmPickResources(PDEVICE_EXTENSION pContext, PDXGK_DEVICE_INFO pDeviceInfo, PULONG pAdapterMemorySize)
|
---|
42 | {
|
---|
43 | NTSTATUS Status = STATUS_SUCCESS;
|
---|
44 | USHORT DispiId;
|
---|
45 | *pAdapterMemorySize = VBE_DISPI_TOTAL_VIDEO_MEMORY_BYTES;
|
---|
46 |
|
---|
47 | VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_ID);
|
---|
48 | VBoxVideoCmnPortWriteUshort((PUSHORT)VBE_DISPI_IOPORT_DATA, VBE_DISPI_ID2);
|
---|
49 | DispiId = VBoxVideoCmnPortReadUshort((PUSHORT)VBE_DISPI_IOPORT_DATA);
|
---|
50 | if (DispiId == VBE_DISPI_ID2)
|
---|
51 | {
|
---|
52 | dprintf(("VBoxVideoWddm: found the VBE card\n"));
|
---|
53 | /*
|
---|
54 | * Write some hardware information to registry, so that
|
---|
55 | * it's visible in Windows property dialog.
|
---|
56 | */
|
---|
57 |
|
---|
58 | /*
|
---|
59 | * Query the adapter's memory size. It's a bit of a hack, we just read
|
---|
60 | * an ULONG from the data port without setting an index before.
|
---|
61 | */
|
---|
62 | *pAdapterMemorySize = VBoxVideoCmnPortReadUlong((PULONG)VBE_DISPI_IOPORT_DATA);
|
---|
63 | if (VBoxHGSMIIsSupported (pContext))
|
---|
64 | {
|
---|
65 | pContext->u.primary.IOPortHost = (RTIOPORT)VGA_PORT_HGSMI_HOST;
|
---|
66 | pContext->u.primary.IOPortGuest = (RTIOPORT)VGA_PORT_HGSMI_GUEST;
|
---|
67 |
|
---|
68 | PCM_RESOURCE_LIST pRcList = pDeviceInfo->TranslatedResourceList;
|
---|
69 | /* @todo: verify resources */
|
---|
70 | for(ULONG i = 0; i < pRcList->Count; ++i)
|
---|
71 | {
|
---|
72 | PCM_FULL_RESOURCE_DESCRIPTOR pFRc = &pRcList->List[i];
|
---|
73 | for(ULONG j = 0; j < pFRc->PartialResourceList.Count; ++j)
|
---|
74 | {
|
---|
75 | PCM_PARTIAL_RESOURCE_DESCRIPTOR pPRc = &pFRc->PartialResourceList.PartialDescriptors[j];
|
---|
76 | switch(pPRc->Type)
|
---|
77 | {
|
---|
78 | case CmResourceTypePort:
|
---|
79 | break;
|
---|
80 | case CmResourceTypeInterrupt:
|
---|
81 | break;
|
---|
82 | case CmResourceTypeMemory:
|
---|
83 | break;
|
---|
84 | case CmResourceTypeDma:
|
---|
85 | break;
|
---|
86 | case CmResourceTypeDeviceSpecific:
|
---|
87 | break;
|
---|
88 | case CmResourceTypeBusNumber:
|
---|
89 | break;
|
---|
90 | default:
|
---|
91 | break;
|
---|
92 | }
|
---|
93 | }
|
---|
94 | }
|
---|
95 | }
|
---|
96 | else
|
---|
97 | {
|
---|
98 | drprintf(("VBoxVideoWddm: HGSMI unsupported, returning err\n"));
|
---|
99 | /* @todo: report a better status */
|
---|
100 | Status = STATUS_UNSUCCESSFUL;
|
---|
101 | }
|
---|
102 | }
|
---|
103 | else
|
---|
104 | {
|
---|
105 | drprintf(("VBoxVideoWddm:: VBE card not found, returning err\n"));
|
---|
106 | Status = STATUS_UNSUCCESSFUL;
|
---|
107 | }
|
---|
108 |
|
---|
109 |
|
---|
110 | return Status;
|
---|
111 | }
|
---|
112 |
|
---|
113 | /* driver callbacks */
|
---|
114 |
|
---|
115 | NTSTATUS DxgkDdiAddDevice(
|
---|
116 | IN CONST PDEVICE_OBJECT PhysicalDeviceObject,
|
---|
117 | OUT PVOID *MiniportDeviceContext
|
---|
118 | )
|
---|
119 | {
|
---|
120 | /* The DxgkDdiAddDevice function should be made pageable. */
|
---|
121 | PAGED_CODE();
|
---|
122 |
|
---|
123 | dfprintf(("==> "__FUNCTION__ ", pdo(0x%x)\n", PhysicalDeviceObject));
|
---|
124 | NTSTATUS Status = STATUS_UNSUCCESSFUL;
|
---|
125 |
|
---|
126 | PDEVICE_EXTENSION pContext = (PDEVICE_EXTENSION)vboxWddmMemAllocZero(sizeof(DEVICE_EXTENSION));
|
---|
127 | if(pContext)
|
---|
128 | {
|
---|
129 | *MiniportDeviceContext = pContext;
|
---|
130 | }
|
---|
131 | else
|
---|
132 | {
|
---|
133 | Status = STATUS_INSUFFICIENT_RESOURCES;
|
---|
134 | drprintf(("VBoxVideoWddm: ERROR, failed to create context\n"));
|
---|
135 | }
|
---|
136 |
|
---|
137 | dfprintf(("<== "__FUNCTION__ ", status(0x%x), pContext(0x%x)\n", Status, pContext));
|
---|
138 |
|
---|
139 | return Status;
|
---|
140 | }
|
---|
141 |
|
---|
142 | NTSTATUS DxgkDdiStartDevice(
|
---|
143 | IN CONST PVOID MiniportDeviceContext,
|
---|
144 | IN PDXGK_START_INFO DxgkStartInfo,
|
---|
145 | IN PDXGKRNL_INTERFACE DxgkInterface,
|
---|
146 | OUT PULONG NumberOfVideoPresentSources,
|
---|
147 | OUT PULONG NumberOfChildren
|
---|
148 | )
|
---|
149 | {
|
---|
150 | /* The DxgkDdiStartDevice function should be made pageable. */
|
---|
151 | PAGED_CODE();
|
---|
152 |
|
---|
153 | NTSTATUS Status;
|
---|
154 |
|
---|
155 | dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
156 |
|
---|
157 | if ( ARGUMENT_PRESENT(MiniportDeviceContext) &&
|
---|
158 | ARGUMENT_PRESENT(DxgkInterface) &&
|
---|
159 | ARGUMENT_PRESENT(DxgkStartInfo) &&
|
---|
160 | ARGUMENT_PRESENT(NumberOfVideoPresentSources),
|
---|
161 | ARGUMENT_PRESENT(NumberOfChildren)
|
---|
162 | )
|
---|
163 | {
|
---|
164 | PDEVICE_EXTENSION pContext = (PDEVICE_EXTENSION)MiniportDeviceContext;
|
---|
165 |
|
---|
166 | /* Save DeviceHandle and function pointers supplied by the DXGKRNL_INTERFACE structure passed to DxgkInterface. */
|
---|
167 | memcpy(&pContext->u.primary.DxgkInterface, DxgkInterface, sizeof(DXGKRNL_INTERFACE));
|
---|
168 |
|
---|
169 | /* Allocate a DXGK_DEVICE_INFO structure, and call DxgkCbGetDeviceInformation to fill in the members of that structure, which include the registry path, the PDO, and a list of translated resources for the display adapter represented by MiniportDeviceContext. Save selected members (ones that the display miniport driver will need later)
|
---|
170 | * of the DXGK_DEVICE_INFO structure in the context block represented by MiniportDeviceContext. */
|
---|
171 | DXGK_DEVICE_INFO DeviceInfo;
|
---|
172 | Status = pContext->u.primary.DxgkInterface.DxgkCbGetDeviceInformation (pContext->u.primary.DxgkInterface.DeviceHandle, &DeviceInfo);
|
---|
173 | if(Status == STATUS_SUCCESS)
|
---|
174 | {
|
---|
175 | ULONG AdapterMemorySize;
|
---|
176 | Status = vboxWddmPickResources(pContext, &DeviceInfo, &AdapterMemorySize);
|
---|
177 | if(Status == STATUS_SUCCESS)
|
---|
178 | {
|
---|
179 | /* Initialize VBoxGuest library, which is used for requests which go through VMMDev. */
|
---|
180 | VbglInit ();
|
---|
181 |
|
---|
182 | /* Guest supports only HGSMI, the old VBVA via VMMDev is not supported. Old
|
---|
183 | * code will be ifdef'ed and later removed.
|
---|
184 | * The host will however support both old and new interface to keep compatibility
|
---|
185 | * with old guest additions.
|
---|
186 | */
|
---|
187 | VBoxSetupDisplaysHGSMI(pContext, AdapterMemorySize);
|
---|
188 | if ((pContext)->u.primary.bHGSMI)
|
---|
189 | {
|
---|
190 | drprintf(("VBoxVideoWddm: using HGSMI\n"));
|
---|
191 | *NumberOfVideoPresentSources = pContext->u.primary.cDisplays;
|
---|
192 | *NumberOfChildren = pContext->u.primary.cDisplays;
|
---|
193 | dprintf(("VBoxVideoWddm: sources(%d), children(%d)\n", *NumberOfVideoPresentSources, *NumberOfChildren));
|
---|
194 | }
|
---|
195 | else
|
---|
196 | {
|
---|
197 | drprintf(("VBoxVideoWddm: HGSMI failed to initialize, returning err\n"));
|
---|
198 | /* @todo: report a better status */
|
---|
199 | Status = STATUS_UNSUCCESSFUL;
|
---|
200 | }
|
---|
201 | }
|
---|
202 | else
|
---|
203 | {
|
---|
204 | drprintf(("VBoxVideoWddm:: vboxWddmPickResources failed Status(0x%x), returning err\n", Status));
|
---|
205 | Status = STATUS_UNSUCCESSFUL;
|
---|
206 | }
|
---|
207 | }
|
---|
208 | else
|
---|
209 | {
|
---|
210 | drprintf(("VBoxVideoWddm: DxgkCbGetDeviceInformation failed Status(0x%x), returning err\n", Status));
|
---|
211 | }
|
---|
212 | }
|
---|
213 | else
|
---|
214 | {
|
---|
215 | drprintf(("VBoxVideoWddm: invalid parameter, returning err\n"));
|
---|
216 | Status = STATUS_INVALID_PARAMETER;
|
---|
217 | }
|
---|
218 |
|
---|
219 | dfprintf(("<== "__FUNCTION__ ", status(0x%x)\n", Status));
|
---|
220 |
|
---|
221 | return Status;
|
---|
222 | }
|
---|
223 |
|
---|
224 | NTSTATUS DxgkDdiStopDevice(
|
---|
225 | IN CONST PVOID MiniportDeviceContext
|
---|
226 | )
|
---|
227 | {
|
---|
228 | return STATUS_NOT_IMPLEMENTED;
|
---|
229 | }
|
---|
230 |
|
---|
231 | NTSTATUS DxgkDdiRemoveDevice(
|
---|
232 | IN CONST PVOID MiniportDeviceContext
|
---|
233 | )
|
---|
234 | {
|
---|
235 | return STATUS_NOT_IMPLEMENTED;
|
---|
236 | }
|
---|
237 |
|
---|
238 | NTSTATUS DxgkDdiDispatchIoRequest(
|
---|
239 | IN CONST PVOID MiniportDeviceContext,
|
---|
240 | IN ULONG VidPnSourceId,
|
---|
241 | IN PVIDEO_REQUEST_PACKET VideoRequestPacket
|
---|
242 | )
|
---|
243 | {
|
---|
244 | return STATUS_NOT_IMPLEMENTED;
|
---|
245 | }
|
---|
246 |
|
---|
247 | BOOLEAN DxgkDdiInterruptRoutine(
|
---|
248 | IN CONST PVOID MiniportDeviceContext,
|
---|
249 | IN ULONG MessageNumber
|
---|
250 | )
|
---|
251 | {
|
---|
252 | return false;
|
---|
253 | }
|
---|
254 |
|
---|
255 | VOID DxgkDdiDpcRoutine(
|
---|
256 | IN CONST PVOID MiniportDeviceContext
|
---|
257 | )
|
---|
258 | {
|
---|
259 |
|
---|
260 | }
|
---|
261 |
|
---|
262 | NTSTATUS DxgkDdiQueryChildRelations(
|
---|
263 | IN CONST PVOID MiniportDeviceContext,
|
---|
264 | IN OUT PDXGK_CHILD_DESCRIPTOR ChildRelations,
|
---|
265 | IN ULONG ChildRelationsSize
|
---|
266 | )
|
---|
267 | {
|
---|
268 | /* The DxgkDdiQueryChildRelations function should be made pageable. */
|
---|
269 | PAGED_CODE();
|
---|
270 |
|
---|
271 | dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
272 | for(ULONG i = 0; i < ChildRelationsSize; i++)
|
---|
273 | {
|
---|
274 | ChildRelations[i].ChildDeviceType = TypeVideoOutput;
|
---|
275 | ChildRelations[i].ChildCapabilities.Type.VideoOutput.InterfaceTechnology = D3DKMDT_VOT_OTHER;
|
---|
276 | ChildRelations[i].ChildCapabilities.Type.VideoOutput.MonitorOrientationAwareness = D3DKMDT_MOA_NONE;
|
---|
277 | ChildRelations[i].ChildCapabilities.Type.VideoOutput.SupportsSdtvModes = FALSE;
|
---|
278 | ChildRelations[i].ChildCapabilities.HpdAwareness = HpdAwarenessAlwaysConnected;
|
---|
279 | ChildRelations[i].AcpiUid = i+1; /* @todo: do we need it? could it be zero ? */
|
---|
280 | ChildRelations[i].ChildUid = i+1; /* could it be zero ? */
|
---|
281 | }
|
---|
282 | dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
283 | return STATUS_SUCCESS;
|
---|
284 | }
|
---|
285 |
|
---|
286 | NTSTATUS DxgkDdiQueryChildStatus(
|
---|
287 | IN CONST PVOID MiniportDeviceContext,
|
---|
288 | IN PDXGK_CHILD_STATUS ChildStatus,
|
---|
289 | IN BOOLEAN NonDestructiveOnly
|
---|
290 | )
|
---|
291 | {
|
---|
292 | /* The DxgkDdiQueryChildStatus should be made pageable. */
|
---|
293 | PAGED_CODE();
|
---|
294 |
|
---|
295 | dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
296 |
|
---|
297 | NTSTATUS Status = STATUS_SUCCESS;
|
---|
298 | switch(ChildStatus->Type)
|
---|
299 | {
|
---|
300 | case StatusConnection:
|
---|
301 | ChildStatus->HotPlug.Connected = TRUE;
|
---|
302 | dfprintf(("VBoxVideoWddm: StatusConnection\n"));
|
---|
303 | break;
|
---|
304 | case StatusRotation:
|
---|
305 | ChildStatus->Rotation.Angle = 0;
|
---|
306 | dfprintf(("VBoxVideoWddm: StatusRotation\n"));
|
---|
307 | break;
|
---|
308 | default:
|
---|
309 | drprintf(("VBoxVideoWddm: ERROR: status type: %d\n", ChildStatus->Type));
|
---|
310 | Status = STATUS_INVALID_PARAMETER;
|
---|
311 | break;
|
---|
312 | }
|
---|
313 |
|
---|
314 | dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
315 |
|
---|
316 | return Status;
|
---|
317 | }
|
---|
318 |
|
---|
319 | NTSTATUS DxgkDdiQueryDeviceDescriptor(
|
---|
320 | IN CONST PVOID MiniportDeviceContext,
|
---|
321 | IN ULONG ChildUid,
|
---|
322 | IN OUT PDXGK_DEVICE_DESCRIPTOR DeviceDescriptor
|
---|
323 | )
|
---|
324 | {
|
---|
325 | /* The DxgkDdiQueryDeviceDescriptor should be made pageable. */
|
---|
326 | PAGED_CODE();
|
---|
327 |
|
---|
328 | dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
329 |
|
---|
330 | /* we do not support EDID */
|
---|
331 | DeviceDescriptor->DescriptorOffset = 0;
|
---|
332 | DeviceDescriptor->DescriptorLength = 0;
|
---|
333 | DeviceDescriptor->DescriptorBuffer = NULL;
|
---|
334 |
|
---|
335 | dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
336 |
|
---|
337 | return STATUS_SUCCESS;
|
---|
338 | }
|
---|
339 |
|
---|
340 | NTSTATUS DxgkDdiSetPowerState(
|
---|
341 | IN CONST PVOID MiniportDeviceContext,
|
---|
342 | IN ULONG DeviceUid,
|
---|
343 | IN DEVICE_POWER_STATE DevicePowerState,
|
---|
344 | IN POWER_ACTION ActionType
|
---|
345 | )
|
---|
346 | {
|
---|
347 | /* The DxgkDdiSetPowerState function should be made pageable. */
|
---|
348 | PAGED_CODE();
|
---|
349 |
|
---|
350 | dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
351 |
|
---|
352 | /* @todo: */
|
---|
353 |
|
---|
354 | dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
|
---|
355 |
|
---|
356 | return STATUS_SUCCESS;
|
---|
357 | }
|
---|
358 |
|
---|
359 | NTSTATUS DxgkDdiNotifyAcpiEvent(
|
---|
360 | IN CONST PVOID MiniportDeviceContext,
|
---|
361 | IN DXGK_EVENT_TYPE EventType,
|
---|
362 | IN ULONG Event,
|
---|
363 | IN PVOID Argument,
|
---|
364 | OUT PULONG AcpiFlags
|
---|
365 | )
|
---|
366 | {
|
---|
367 | return STATUS_NOT_IMPLEMENTED;
|
---|
368 | }
|
---|
369 |
|
---|
370 | VOID DxgkDdiResetDevice(
|
---|
371 | IN CONST PVOID MiniportDeviceContext
|
---|
372 | )
|
---|
373 | {
|
---|
374 |
|
---|
375 | }
|
---|
376 |
|
---|
377 | VOID DxgkDdiUnload(
|
---|
378 | VOID
|
---|
379 | )
|
---|
380 | {
|
---|
381 |
|
---|
382 | }
|
---|
383 |
|
---|
384 | NTSTATUS DxgkDdiQueryInterface(
|
---|
385 | IN CONST PVOID MiniportDeviceContext,
|
---|
386 | IN PQUERY_INTERFACE QueryInterface
|
---|
387 | )
|
---|
388 | {
|
---|
389 | return STATUS_NOT_IMPLEMENTED;
|
---|
390 | }
|
---|
391 |
|
---|
392 | VOID DxgkDdiControlEtwLogging(
|
---|
393 | IN BOOLEAN Enable,
|
---|
394 | IN ULONG Flags,
|
---|
395 | IN UCHAR Level
|
---|
396 | )
|
---|
397 | {
|
---|
398 |
|
---|
399 | }
|
---|
400 |
|
---|
401 | NTSTATUS APIENTRY DxgkDdiQueryAdapterInfo(
|
---|
402 | CONST HANDLE hAdapter,
|
---|
403 | CONST DXGKARG_QUERYADAPTERINFO* pQueryAdapterInfo)
|
---|
404 | {
|
---|
405 | return STATUS_NOT_IMPLEMENTED;
|
---|
406 | }
|
---|
407 |
|
---|
408 | NTSTATUS APIENTRY DxgkDdiCreateDevice(
|
---|
409 | CONST HANDLE hAdapter,
|
---|
410 | DXGKARG_CREATEDEVICE* pCreateDevice)
|
---|
411 | {
|
---|
412 | return STATUS_NOT_IMPLEMENTED;
|
---|
413 | }
|
---|
414 |
|
---|
415 | NTSTATUS APIENTRY DxgkDdiCreateAllocation(
|
---|
416 | CONST HANDLE hAdapter,
|
---|
417 | DXGKARG_CREATEALLOCATION* pCreateAllocation)
|
---|
418 | {
|
---|
419 | return STATUS_NOT_IMPLEMENTED;
|
---|
420 | }
|
---|
421 |
|
---|
422 | NTSTATUS
|
---|
423 | APIENTRY
|
---|
424 | DxgkDdiDestroyAllocation(
|
---|
425 | CONST HANDLE hAdapter,
|
---|
426 | CONST DXGKARG_DESTROYALLOCATION* pDestroyAllocation)
|
---|
427 | {
|
---|
428 | return STATUS_NOT_IMPLEMENTED;
|
---|
429 | }
|
---|
430 |
|
---|
431 |
|
---|
432 | NTSTATUS
|
---|
433 | APIENTRY
|
---|
434 | DxgkDdiDescribeAllocation(
|
---|
435 | CONST HANDLE hAdapter,
|
---|
436 | DXGKARG_DESCRIBEALLOCATION* pDescribeAllocation)
|
---|
437 | {
|
---|
438 | return STATUS_NOT_IMPLEMENTED;
|
---|
439 | }
|
---|
440 |
|
---|
441 | NTSTATUS
|
---|
442 | APIENTRY
|
---|
443 | DxgkDdiGetStandardAllocationDriverData(
|
---|
444 | CONST HANDLE hAdapter,
|
---|
445 | DXGKARG_GETSTANDARDALLOCATIONDRIVERDATA* pGetStandardAllocationDriverData)
|
---|
446 | {
|
---|
447 | return STATUS_NOT_IMPLEMENTED;
|
---|
448 | }
|
---|
449 |
|
---|
450 | NTSTATUS
|
---|
451 | APIENTRY
|
---|
452 | DxgkDdiAcquireSwizzlingRange(
|
---|
453 | CONST HANDLE hAdapter,
|
---|
454 | DXGKARG_ACQUIRESWIZZLINGRANGE* pAcquireSwizzlingRange)
|
---|
455 | {
|
---|
456 | return STATUS_NOT_IMPLEMENTED;
|
---|
457 | }
|
---|
458 |
|
---|
459 | NTSTATUS
|
---|
460 | APIENTRY
|
---|
461 | DxgkDdiReleaseSwizzlingRange(
|
---|
462 | CONST HANDLE hAdapter,
|
---|
463 | CONST DXGKARG_RELEASESWIZZLINGRANGE* pReleaseSwizzlingRange)
|
---|
464 | {
|
---|
465 | return STATUS_NOT_IMPLEMENTED;
|
---|
466 | }
|
---|
467 |
|
---|
468 | NTSTATUS
|
---|
469 | APIENTRY
|
---|
470 | DxgkDdiPatch(
|
---|
471 | CONST HANDLE hAdapter,
|
---|
472 | CONST DXGKARG_PATCH* pPatch)
|
---|
473 | {
|
---|
474 | return STATUS_NOT_IMPLEMENTED;
|
---|
475 | }
|
---|
476 |
|
---|
477 | NTSTATUS
|
---|
478 | APIENTRY
|
---|
479 | DxgkDdiSubmitCommand(
|
---|
480 | CONST HANDLE hAdapter,
|
---|
481 | CONST DXGKARG_SUBMITCOMMAND* pSubmitCommand)
|
---|
482 | {
|
---|
483 | return STATUS_NOT_IMPLEMENTED;
|
---|
484 | }
|
---|
485 |
|
---|
486 | NTSTATUS
|
---|
487 | APIENTRY
|
---|
488 | DxgkDdiPreemptCommand(
|
---|
489 | CONST HANDLE hAdapter,
|
---|
490 | CONST DXGKARG_PREEMPTCOMMAND* pPreemptCommand)
|
---|
491 | {
|
---|
492 | return STATUS_NOT_IMPLEMENTED;
|
---|
493 | }
|
---|
494 |
|
---|
495 | NTSTATUS
|
---|
496 | APIENTRY
|
---|
497 | DxgkDdiBuildPagingBuffer(
|
---|
498 | CONST HANDLE hAdapter,
|
---|
499 | DXGKARG_BUILDPAGINGBUFFER* pBuildPagingBuffer)
|
---|
500 | {
|
---|
501 | return STATUS_NOT_IMPLEMENTED;
|
---|
502 | }
|
---|
503 |
|
---|
504 | NTSTATUS
|
---|
505 | APIENTRY
|
---|
506 | DxgkDdiSetPalette(
|
---|
507 | CONST HANDLE hAdapter,
|
---|
508 | CONST DXGKARG_SETPALETTE* pSetPalette
|
---|
509 | )
|
---|
510 | {
|
---|
511 | return STATUS_NOT_IMPLEMENTED;
|
---|
512 | }
|
---|
513 |
|
---|
514 | NTSTATUS
|
---|
515 | APIENTRY
|
---|
516 | DxgkDdiSetPointerPosition(
|
---|
517 | CONST HANDLE hAdapter,
|
---|
518 | CONST DXGKARG_SETPOINTERPOSITION* pSetPointerPosition)
|
---|
519 | {
|
---|
520 | return STATUS_NOT_IMPLEMENTED;
|
---|
521 | }
|
---|
522 |
|
---|
523 | NTSTATUS
|
---|
524 | APIENTRY
|
---|
525 | DxgkDdiSetPointerShape(
|
---|
526 | CONST HANDLE hAdapter,
|
---|
527 | CONST DXGKARG_SETPOINTERSHAPE* pSetPointerShape)
|
---|
528 | {
|
---|
529 | return STATUS_NOT_IMPLEMENTED;
|
---|
530 | }
|
---|
531 |
|
---|
532 | NTSTATUS
|
---|
533 | APIENTRY CALLBACK
|
---|
534 | DxgkDdiResetFromTimeout(
|
---|
535 | CONST HANDLE hAdapter)
|
---|
536 | {
|
---|
537 | return STATUS_NOT_IMPLEMENTED;
|
---|
538 | }
|
---|
539 |
|
---|
540 | NTSTATUS
|
---|
541 | APIENTRY
|
---|
542 | DxgkDdiEscape(
|
---|
543 | CONST HANDLE hAdapter,
|
---|
544 | CONST DXGKARG_ESCAPE* pEscape)
|
---|
545 | {
|
---|
546 | PAGED_CODE();
|
---|
547 |
|
---|
548 | return STATUS_INVALID_PARAMETER;
|
---|
549 | }
|
---|
550 |
|
---|
551 | NTSTATUS
|
---|
552 | APIENTRY
|
---|
553 | DxgkDdiCollectDbgInfo(
|
---|
554 | CONST HANDLE hAdapter,
|
---|
555 | CONST DXGKARG_COLLECTDBGINFO* pCollectDbgInfo
|
---|
556 | )
|
---|
557 | {
|
---|
558 | return STATUS_NOT_IMPLEMENTED;
|
---|
559 | }
|
---|
560 |
|
---|
561 | NTSTATUS
|
---|
562 | APIENTRY
|
---|
563 | DxgkDdiQueryCurrentFence(
|
---|
564 | CONST HANDLE hAdapter,
|
---|
565 | DXGKARG_QUERYCURRENTFENCE* pCurrentFence)
|
---|
566 | {
|
---|
567 | return STATUS_NOT_IMPLEMENTED;
|
---|
568 | }
|
---|
569 |
|
---|
570 | NTSTATUS
|
---|
571 | APIENTRY
|
---|
572 | DxgkDdiIsSupportedVidPn(
|
---|
573 | CONST HANDLE hAdapter,
|
---|
574 | OUT DXGKARG_ISSUPPORTEDVIDPN* pIsSupportedVidPnArg
|
---|
575 | )
|
---|
576 | {
|
---|
577 | /* The DxgkDdiIsSupportedVidPn should be made pageable. */
|
---|
578 | PAGED_CODE();
|
---|
579 |
|
---|
580 | /* @todo: implement a check */
|
---|
581 | pIsSupportedVidPnArg->IsVidPnSupported = TRUE;
|
---|
582 | return STATUS_SUCCESS;
|
---|
583 | }
|
---|
584 |
|
---|
585 | NTSTATUS
|
---|
586 | APIENTRY
|
---|
587 | DxgkDdiRecommendFunctionalVidPn(
|
---|
588 | CONST HANDLE hAdapter,
|
---|
589 | CONST DXGKARG_RECOMMENDFUNCTIONALVIDPN* CONST pRecommendFunctionalVidPnArg
|
---|
590 | )
|
---|
591 | {
|
---|
592 | /* The DxgkDdiRecommendFunctionalVidPn should be made pageable. */
|
---|
593 | PAGED_CODE();
|
---|
594 |
|
---|
595 | dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter));
|
---|
596 |
|
---|
597 | PDEVICE_EXTENSION pContext = (PDEVICE_EXTENSION)hAdapter;
|
---|
598 | const DXGK_VIDPN_INTERFACE* pVidPnInterface = NULL;
|
---|
599 | NTSTATUS Status = pContext->u.primary.DxgkInterface.DxgkCbQueryVidPnInterface(pRecommendFunctionalVidPnArg->hRecommendedFunctionalVidPn, DXGK_VIDPN_INTERFACE_VERSION_V1, &pVidPnInterface);
|
---|
600 | if(Status == STATUS_SUCCESS)
|
---|
601 | {
|
---|
602 | D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology;
|
---|
603 | const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface;
|
---|
604 | Status = pVidPnInterface->pfnGetTopology(pRecommendFunctionalVidPnArg->hRecommendedFunctionalVidPn, &hVidPnTopology, &pVidPnTopologyInterface);
|
---|
605 | if(Status == STATUS_SUCCESS)
|
---|
606 | {
|
---|
607 | D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo;
|
---|
608 | Status = pVidPnTopologyInterface->pfnCreateNewPathInfo(hVidPnTopology, &pNewVidPnPresentPathInfo);
|
---|
609 | if(Status == STATUS_SUCCESS)
|
---|
610 | {
|
---|
611 | pNewVidPnPresentPathInfo->VidPnSourceId = 0;
|
---|
612 | pNewVidPnPresentPathInfo->VidPnTargetId = 0;
|
---|
613 | pNewVidPnPresentPathInfo->ImportanceOrdinal = D3DKMDT_VPPI_PRIMARY;
|
---|
614 | pNewVidPnPresentPathInfo->ContentTransformation.Scaling = D3DKMDT_VPPS_IDENTITY;
|
---|
615 | memset(&pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport,
|
---|
616 | 0, sizeof(pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport));
|
---|
617 | pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport.Identity = 1;
|
---|
618 | pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport.Centered = 1;
|
---|
619 | pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport.Stretched = 0;
|
---|
620 | pNewVidPnPresentPathInfo->ContentTransformation.Rotation = D3DKMDT_VPPR_IDENTITY;
|
---|
621 | pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Identity = 1;
|
---|
622 | pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Rotate180 = 0;
|
---|
623 | pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Rotate270 = 0;
|
---|
624 | pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Rotate90 = 0;
|
---|
625 | pNewVidPnPresentPathInfo->VisibleFromActiveTLOffset.cx = 0;
|
---|
626 | pNewVidPnPresentPathInfo->VisibleFromActiveTLOffset.cy = 0;
|
---|
627 | pNewVidPnPresentPathInfo->VisibleFromActiveBROffset.cx = 0;
|
---|
628 | pNewVidPnPresentPathInfo->VisibleFromActiveBROffset.cy = 0;
|
---|
629 | pNewVidPnPresentPathInfo->VidPnTargetColorBasis = D3DKMDT_CB_SRGB; /* @todo: how does it matters? */
|
---|
630 | pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.FirstChannel = 8;
|
---|
631 | pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.SecondChannel = 8;
|
---|
632 | pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.ThirdChannel = 8;
|
---|
633 | pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.FourthChannel = 0;
|
---|
634 | pNewVidPnPresentPathInfo->Content = D3DKMDT_VPPC_GRAPHICS;
|
---|
635 | pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionType = D3DKMDT_VPPMT_NOPROTECTION;
|
---|
636 | pNewVidPnPresentPathInfo->CopyProtection.APSTriggerBits = 0;
|
---|
637 | memset(&pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionSupport, 0, sizeof(pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionSupport));
|
---|
638 | pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionSupport.NoProtection = 1;
|
---|
639 | pNewVidPnPresentPathInfo->GammaRamp.Type = D3DDDI_GAMMARAMP_DEFAULT;
|
---|
640 | pNewVidPnPresentPathInfo->GammaRamp.DataSize = 0;
|
---|
641 | Status = pVidPnTopologyInterface->pfnAddPath(hVidPnTopology, pNewVidPnPresentPathInfo);
|
---|
642 | if(Status == STATUS_SUCCESS)
|
---|
643 | {
|
---|
644 | D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet;
|
---|
645 | const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface;
|
---|
646 | Status = pVidPnInterface->pfnCreateNewSourceModeSet(pRecommendFunctionalVidPnArg->hRecommendedFunctionalVidPn,
|
---|
647 | 0, /*__in CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId */
|
---|
648 | &hNewVidPnSourceModeSet,
|
---|
649 | &pVidPnSourceModeSetInterface);
|
---|
650 | if(Status == STATUS_SUCCESS)
|
---|
651 | {
|
---|
652 | D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo;
|
---|
653 | Status = pVidPnSourceModeSetInterface->pfnCreateNewModeInfo(hNewVidPnSourceModeSet, &pNewVidPnSourceModeInfo);
|
---|
654 | if(Status == STATUS_SUCCESS)
|
---|
655 | {
|
---|
656 | D3DKMDT_VIDEO_PRESENT_SOURCE_MODE_ID modeId = pNewVidPnSourceModeInfo->Id;
|
---|
657 | pNewVidPnSourceModeInfo->Type = D3DKMDT_RMT_GRAPHICS;
|
---|
658 | /* @todo: should we obtain the default mode from the host? */
|
---|
659 | pNewVidPnSourceModeInfo->Format.Graphics.PrimSurfSize.cx = 1024;
|
---|
660 | pNewVidPnSourceModeInfo->Format.Graphics.PrimSurfSize.cy = 768;
|
---|
661 | pNewVidPnSourceModeInfo->Format.Graphics.VisibleRegionSize = pNewVidPnSourceModeInfo->Format.Graphics.PrimSurfSize;
|
---|
662 | pNewVidPnSourceModeInfo->Format.Graphics.Stride = pNewVidPnSourceModeInfo->Format.Graphics.PrimSurfSize.cx * 4;
|
---|
663 | pNewVidPnSourceModeInfo->Format.Graphics.PixelFormat = D3DDDIFMT_X8R8G8B8;
|
---|
664 | pNewVidPnSourceModeInfo->Format.Graphics.ColorBasis = D3DKMDT_CB_SRGB;
|
---|
665 | pNewVidPnSourceModeInfo->Format.Graphics.PixelValueAccessMode = D3DKMDT_PVAM_DIRECT;
|
---|
666 | Status = pVidPnSourceModeSetInterface->pfnAddMode(hNewVidPnSourceModeSet, pNewVidPnSourceModeInfo);
|
---|
667 | if(Status == STATUS_SUCCESS)
|
---|
668 | {
|
---|
669 | Status = pVidPnSourceModeSetInterface->pfnPinMode(hNewVidPnSourceModeSet, modeId);
|
---|
670 | if(Status == STATUS_SUCCESS)
|
---|
671 | {
|
---|
672 | D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet;
|
---|
673 | CONST DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface;
|
---|
674 | Status = pVidPnInterface->pfnCreateNewTargetModeSet(pRecommendFunctionalVidPnArg->hRecommendedFunctionalVidPn,
|
---|
675 | 0, /* __in CONST D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId */
|
---|
676 | &hNewVidPnTargetModeSet,
|
---|
677 | &pVidPnTargetModeSetInterface);
|
---|
678 | if(Status == STATUS_SUCCESS)
|
---|
679 | {
|
---|
680 | D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo;
|
---|
681 | Status = pVidPnTargetModeSetInterface->pfnCreateNewModeInfo(hNewVidPnTargetModeSet, &pNewVidPnTargetModeInfo);
|
---|
682 | if(Status == STATUS_SUCCESS)
|
---|
683 | {
|
---|
684 | D3DKMDT_VIDEO_PRESENT_TARGET_MODE_ID targetId = pNewVidPnTargetModeInfo->Id;
|
---|
685 | pNewVidPnTargetModeInfo->VideoSignalInfo.VideoStandard = D3DKMDT_VSS_OTHER;
|
---|
686 | pNewVidPnTargetModeInfo->VideoSignalInfo.TotalSize.cx = 1024;
|
---|
687 | pNewVidPnTargetModeInfo->VideoSignalInfo.TotalSize.cy = 768;
|
---|
688 | pNewVidPnTargetModeInfo->VideoSignalInfo.ActiveSize = pNewVidPnTargetModeInfo->VideoSignalInfo.TotalSize;
|
---|
689 | pNewVidPnTargetModeInfo->VideoSignalInfo.VSyncFreq.Numerator = 60;
|
---|
690 | pNewVidPnTargetModeInfo->VideoSignalInfo.VSyncFreq.Denominator = 1;
|
---|
691 | pNewVidPnTargetModeInfo->VideoSignalInfo.HSyncFreq.Numerator = 63 * 768; /* @todo: do we need that? */
|
---|
692 | pNewVidPnTargetModeInfo->VideoSignalInfo.HSyncFreq.Denominator = 1;
|
---|
693 | pNewVidPnTargetModeInfo->VideoSignalInfo.PixelRate = 165000; /* ?? */
|
---|
694 | pNewVidPnTargetModeInfo->VideoSignalInfo.ScanLineOrdering = D3DDDI_VSSLO_PROGRESSIVE;
|
---|
695 | pNewVidPnTargetModeInfo->Preference = D3DKMDT_MP_PREFERRED;
|
---|
696 | Status = pVidPnTargetModeSetInterface->pfnAddMode(hNewVidPnTargetModeSet, pNewVidPnTargetModeInfo);
|
---|
697 | if(Status == STATUS_SUCCESS)
|
---|
698 | {
|
---|
699 | Status = pVidPnTargetModeSetInterface->pfnPinMode(hNewVidPnTargetModeSet, targetId);
|
---|
700 | if(Status == STATUS_SUCCESS)
|
---|
701 | {
|
---|
702 |
|
---|
703 | }
|
---|
704 | else
|
---|
705 | {
|
---|
706 | drprintf(("VBoxVideoWddm: pfnPinMode (target) failed Status(0x%x)\n"));
|
---|
707 | }
|
---|
708 | }
|
---|
709 | else
|
---|
710 | {
|
---|
711 | drprintf(("VBoxVideoWddm: pfnAddMode (target) failed Status(0x%x)\n"));
|
---|
712 | pVidPnTargetModeSetInterface->pfnReleaseModeInfo(hNewVidPnTargetModeSet, pNewVidPnTargetModeInfo);
|
---|
713 | pNewVidPnTargetModeInfo = NULL;
|
---|
714 | }
|
---|
715 | }
|
---|
716 | else
|
---|
717 | {
|
---|
718 | drprintf(("VBoxVideoWddm: pfnCreateNewModeInfo (target) failed Status(0x%x)\n"));
|
---|
719 | }
|
---|
720 | }
|
---|
721 | else
|
---|
722 | {
|
---|
723 | drprintf(("VBoxVideoWddm: pfnCreateNewTargetModeSet failed Status(0x%x)\n"));
|
---|
724 | }
|
---|
725 | }
|
---|
726 | else
|
---|
727 | {
|
---|
728 | drprintf(("VBoxVideoWddm: pfnPinMode failed Status(0x%x)\n"));
|
---|
729 | }
|
---|
730 | }
|
---|
731 | else
|
---|
732 | {
|
---|
733 | drprintf(("VBoxVideoWddm: pfnAddMode failed Status(0x%x)\n"));
|
---|
734 | pVidPnSourceModeSetInterface->pfnReleaseModeInfo(hNewVidPnSourceModeSet, pNewVidPnSourceModeInfo);
|
---|
735 | pNewVidPnSourceModeInfo = NULL;
|
---|
736 | }
|
---|
737 | }
|
---|
738 | else
|
---|
739 | {
|
---|
740 | drprintf(("VBoxVideoWddm: pfnCreateNewModeInfo failed Status(0x%x)\n"));
|
---|
741 | }
|
---|
742 | }
|
---|
743 | else
|
---|
744 | {
|
---|
745 | drprintf(("VBoxVideoWddm: pfnCreateNewSourceModeSet failed Status(0x%x)\n"));
|
---|
746 | }
|
---|
747 | }
|
---|
748 | else
|
---|
749 | {
|
---|
750 | drprintf(("VBoxVideoWddm: pfnAddPath failed Status(0x%x)\n"));
|
---|
751 | pVidPnTopologyInterface->pfnReleasePathInfo(hVidPnTopology, pNewVidPnPresentPathInfo);
|
---|
752 | pNewVidPnPresentPathInfo = NULL;
|
---|
753 | }
|
---|
754 | }
|
---|
755 | else
|
---|
756 | {
|
---|
757 | drprintf(("VBoxVideoWddm: pfnCreateNewPathInfo failed Status(0x%x)\n"));
|
---|
758 | }
|
---|
759 | }
|
---|
760 | else
|
---|
761 | {
|
---|
762 | drprintf(("VBoxVideoWddm: pfnGetTopology failed Status(0x%x)\n"));
|
---|
763 | }
|
---|
764 | }
|
---|
765 | else
|
---|
766 | {
|
---|
767 | drprintf(("VBoxVideoWddm: DxgkCbQueryVidPnInterface failed Status(0x%x)\n"));
|
---|
768 | }
|
---|
769 |
|
---|
770 | dfprintf(("<== "__FUNCTION__ ", status(0x%x), context(0x%x)\n", Status, hAdapter));
|
---|
771 |
|
---|
772 | return Status;
|
---|
773 | }
|
---|
774 |
|
---|
775 | NTSTATUS
|
---|
776 | APIENTRY
|
---|
777 | DxgkDdiEnumVidPnCofuncModality(
|
---|
778 | CONST HANDLE hAdapter,
|
---|
779 | CONST DXGKARG_ENUMVIDPNCOFUNCMODALITY* CONST pEnumCofuncModalityArg
|
---|
780 | )
|
---|
781 | {
|
---|
782 | return STATUS_NOT_IMPLEMENTED;
|
---|
783 | }
|
---|
784 |
|
---|
785 | NTSTATUS
|
---|
786 | APIENTRY
|
---|
787 | DxgkDdiSetVidPnSourceAddress(
|
---|
788 | CONST HANDLE hAdapter,
|
---|
789 | CONST DXGKARG_SETVIDPNSOURCEADDRESS* pSetVidPnSourceAddress
|
---|
790 | )
|
---|
791 | {
|
---|
792 | return STATUS_NOT_IMPLEMENTED;
|
---|
793 | }
|
---|
794 |
|
---|
795 | NTSTATUS
|
---|
796 | APIENTRY
|
---|
797 | DxgkDdiSetVidPnSourceVisibility(
|
---|
798 | CONST HANDLE hAdapter,
|
---|
799 | CONST DXGKARG_SETVIDPNSOURCEVISIBILITY* pSetVidPnSourceVisibility
|
---|
800 | )
|
---|
801 | {
|
---|
802 | return STATUS_NOT_IMPLEMENTED;
|
---|
803 | }
|
---|
804 |
|
---|
805 | NTSTATUS
|
---|
806 | APIENTRY
|
---|
807 | DxgkDdiCommitVidPn(
|
---|
808 | CONST HANDLE hAdapter,
|
---|
809 | CONST DXGKARG_COMMITVIDPN* CONST pCommitVidPnArg
|
---|
810 | )
|
---|
811 | {
|
---|
812 | return STATUS_NOT_IMPLEMENTED;
|
---|
813 | }
|
---|
814 |
|
---|
815 | NTSTATUS
|
---|
816 | APIENTRY
|
---|
817 | DxgkDdiUpdateActiveVidPnPresentPath(
|
---|
818 | CONST HANDLE hAdapter,
|
---|
819 | CONST DXGKARG_UPDATEACTIVEVIDPNPRESENTPATH* CONST pUpdateActiveVidPnPresentPathArg
|
---|
820 | )
|
---|
821 | {
|
---|
822 | return STATUS_NOT_IMPLEMENTED;
|
---|
823 | }
|
---|
824 |
|
---|
825 | NTSTATUS
|
---|
826 | APIENTRY
|
---|
827 | DxgkDdiRecommendMonitorModes(
|
---|
828 | CONST HANDLE hAdapter,
|
---|
829 | CONST DXGKARG_RECOMMENDMONITORMODES* CONST pRecommendMonitorModesArg
|
---|
830 | )
|
---|
831 | {
|
---|
832 | return STATUS_NOT_IMPLEMENTED;
|
---|
833 | }
|
---|
834 |
|
---|
835 | NTSTATUS
|
---|
836 | APIENTRY
|
---|
837 | DxgkDdiRecommendVidPnTopology(
|
---|
838 | CONST HANDLE hAdapter,
|
---|
839 | CONST DXGKARG_RECOMMENDVIDPNTOPOLOGY* CONST pRecommendVidPnTopologyArg
|
---|
840 | )
|
---|
841 | {
|
---|
842 | return STATUS_NOT_IMPLEMENTED;
|
---|
843 | }
|
---|
844 |
|
---|
845 | NTSTATUS
|
---|
846 | APIENTRY
|
---|
847 | DxgkDdiGetScanLine(
|
---|
848 | CONST HANDLE hAdapter,
|
---|
849 | DXGKARG_GETSCANLINE* pGetScanLine)
|
---|
850 | {
|
---|
851 | return STATUS_NOT_IMPLEMENTED;
|
---|
852 | }
|
---|
853 |
|
---|
854 | NTSTATUS
|
---|
855 | APIENTRY
|
---|
856 | DxgkDdiStopCapture(
|
---|
857 | CONST HANDLE hAdapter,
|
---|
858 | CONST DXGKARG_STOPCAPTURE* pStopCapture)
|
---|
859 | {
|
---|
860 | return STATUS_NOT_IMPLEMENTED;
|
---|
861 | }
|
---|
862 |
|
---|
863 | NTSTATUS
|
---|
864 | APIENTRY
|
---|
865 | DxgkDdiControlInterrupt(
|
---|
866 | CONST HANDLE hAdapter,
|
---|
867 | CONST DXGK_INTERRUPT_TYPE InterruptType,
|
---|
868 | BOOLEAN Enable
|
---|
869 | )
|
---|
870 | {
|
---|
871 | return STATUS_NOT_IMPLEMENTED;
|
---|
872 | }
|
---|
873 |
|
---|
874 | NTSTATUS
|
---|
875 | APIENTRY
|
---|
876 | DxgkDdiCreateOverlay(
|
---|
877 | CONST HANDLE hAdapter,
|
---|
878 | DXGKARG_CREATEOVERLAY *pCreateOverlay)
|
---|
879 | {
|
---|
880 | return STATUS_NOT_IMPLEMENTED;
|
---|
881 | }
|
---|
882 |
|
---|
883 | NTSTATUS
|
---|
884 | APIENTRY
|
---|
885 | DxgkDdiDestroyDevice(
|
---|
886 | CONST HANDLE hDevice)
|
---|
887 | {
|
---|
888 | return STATUS_NOT_IMPLEMENTED;
|
---|
889 | }
|
---|
890 |
|
---|
891 | NTSTATUS
|
---|
892 | APIENTRY
|
---|
893 | DxgkDdiOpenAllocation(
|
---|
894 | CONST HANDLE hDevice,
|
---|
895 | CONST DXGKARG_OPENALLOCATION *pOpenAllocation)
|
---|
896 | {
|
---|
897 | return STATUS_NOT_IMPLEMENTED;
|
---|
898 | }
|
---|
899 |
|
---|
900 | NTSTATUS
|
---|
901 | APIENTRY
|
---|
902 | DxgkDdiCloseAllocation(
|
---|
903 | CONST HANDLE hDevice,
|
---|
904 | CONST DXGKARG_CLOSEALLOCATION* pCloseAllocation)
|
---|
905 | {
|
---|
906 | return STATUS_NOT_IMPLEMENTED;
|
---|
907 | }
|
---|
908 |
|
---|
909 | NTSTATUS
|
---|
910 | APIENTRY
|
---|
911 | DxgkDdiRender(
|
---|
912 | CONST HANDLE hContext,
|
---|
913 | DXGKARG_RENDER *pRender)
|
---|
914 | {
|
---|
915 | return STATUS_NOT_IMPLEMENTED;
|
---|
916 | }
|
---|
917 |
|
---|
918 | NTSTATUS
|
---|
919 | APIENTRY
|
---|
920 | DxgkDdiPresent(
|
---|
921 | CONST HANDLE hContext,
|
---|
922 | DXGKARG_PRESENT *pPresent)
|
---|
923 | {
|
---|
924 | return STATUS_NOT_IMPLEMENTED;
|
---|
925 | }
|
---|
926 |
|
---|
927 | NTSTATUS
|
---|
928 | APIENTRY
|
---|
929 | DxgkDdiUpdateOverlay(
|
---|
930 | CONST HANDLE hOverlay,
|
---|
931 | CONST DXGKARG_UPDATEOVERLAY *pUpdateOverlay)
|
---|
932 | {
|
---|
933 | return STATUS_NOT_IMPLEMENTED;
|
---|
934 | }
|
---|
935 |
|
---|
936 | NTSTATUS
|
---|
937 | APIENTRY
|
---|
938 | DxgkDdiFlipOverlay(
|
---|
939 | CONST HANDLE hOverlay,
|
---|
940 | CONST DXGKARG_FLIPOVERLAY *pFlipOverlay)
|
---|
941 | {
|
---|
942 | return STATUS_NOT_IMPLEMENTED;
|
---|
943 | }
|
---|
944 |
|
---|
945 | NTSTATUS
|
---|
946 | APIENTRY
|
---|
947 | DxgkDdiDestroyOverlay(
|
---|
948 | CONST HANDLE hOverlay)
|
---|
949 | {
|
---|
950 | return STATUS_NOT_IMPLEMENTED;
|
---|
951 | }
|
---|
952 |
|
---|
953 | NTSTATUS
|
---|
954 | APIENTRY
|
---|
955 | DxgkDdiCreateContext(
|
---|
956 | CONST HANDLE hDevice,
|
---|
957 | DXGKARG_CREATECONTEXT *pCreateContext)
|
---|
958 | {
|
---|
959 | return STATUS_NOT_IMPLEMENTED;
|
---|
960 | }
|
---|
961 |
|
---|
962 | NTSTATUS
|
---|
963 | APIENTRY
|
---|
964 | DxgkDdiDestroyContext(
|
---|
965 | CONST HANDLE hContext)
|
---|
966 | {
|
---|
967 | return STATUS_NOT_IMPLEMENTED;
|
---|
968 | }
|
---|
969 |
|
---|
970 | NTSTATUS
|
---|
971 | APIENTRY
|
---|
972 | DxgkDdiLinkDevice(
|
---|
973 | __in CONST PDEVICE_OBJECT PhysicalDeviceObject,
|
---|
974 | __in CONST PVOID MiniportDeviceContext,
|
---|
975 | __inout PLINKED_DEVICE LinkedDevice
|
---|
976 | )
|
---|
977 | {
|
---|
978 | return STATUS_NOT_IMPLEMENTED;
|
---|
979 | }
|
---|
980 |
|
---|
981 | NTSTATUS
|
---|
982 | APIENTRY
|
---|
983 | DxgkDdiSetDisplayPrivateDriverFormat(
|
---|
984 | CONST HANDLE hAdapter,
|
---|
985 | /*CONST*/ DXGKARG_SETDISPLAYPRIVATEDRIVERFORMAT* pSetDisplayPrivateDriverFormat
|
---|
986 | )
|
---|
987 | {
|
---|
988 | return STATUS_NOT_IMPLEMENTED;
|
---|
989 | }
|
---|
990 |
|
---|
991 | NTSTATUS
|
---|
992 | DriverEntry(
|
---|
993 | IN PDRIVER_OBJECT DriverObject,
|
---|
994 | IN PUNICODE_STRING RegistryPath
|
---|
995 | )
|
---|
996 | {
|
---|
997 | dprintf(("VBoxVideoWddm::DriverEntry. Built %s %s\n", __DATE__, __TIME__));
|
---|
998 |
|
---|
999 | DRIVER_INITIALIZATION_DATA DriverInitializationData = {'\0'};
|
---|
1000 |
|
---|
1001 | PAGED_CODE();
|
---|
1002 |
|
---|
1003 | if (! ARGUMENT_PRESENT(DriverObject) ||
|
---|
1004 | ! ARGUMENT_PRESENT(RegistryPath))
|
---|
1005 | {
|
---|
1006 | return STATUS_INVALID_PARAMETER;
|
---|
1007 | }
|
---|
1008 |
|
---|
1009 | // Fill in the DriverInitializationData structure and call DxgkInitialize()
|
---|
1010 | DriverInitializationData.Version = DXGKDDI_INTERFACE_VERSION;
|
---|
1011 |
|
---|
1012 | DriverInitializationData.DxgkDdiAddDevice = DxgkDdiAddDevice;
|
---|
1013 | DriverInitializationData.DxgkDdiStartDevice = DxgkDdiStartDevice;
|
---|
1014 | DriverInitializationData.DxgkDdiStopDevice = DxgkDdiStopDevice;
|
---|
1015 | DriverInitializationData.DxgkDdiRemoveDevice = DxgkDdiRemoveDevice;
|
---|
1016 | DriverInitializationData.DxgkDdiDispatchIoRequest = DxgkDdiDispatchIoRequest;
|
---|
1017 | DriverInitializationData.DxgkDdiInterruptRoutine = DxgkDdiInterruptRoutine;
|
---|
1018 | DriverInitializationData.DxgkDdiDpcRoutine = DxgkDdiDpcRoutine;
|
---|
1019 | DriverInitializationData.DxgkDdiQueryChildRelations = DxgkDdiQueryChildRelations;
|
---|
1020 | DriverInitializationData.DxgkDdiQueryChildStatus = DxgkDdiQueryChildStatus;
|
---|
1021 | DriverInitializationData.DxgkDdiQueryDeviceDescriptor = DxgkDdiQueryDeviceDescriptor;
|
---|
1022 | DriverInitializationData.DxgkDdiSetPowerState = DxgkDdiSetPowerState;
|
---|
1023 | DriverInitializationData.DxgkDdiNotifyAcpiEvent = DxgkDdiNotifyAcpiEvent;
|
---|
1024 | DriverInitializationData.DxgkDdiResetDevice = DxgkDdiResetDevice;
|
---|
1025 | DriverInitializationData.DxgkDdiUnload = DxgkDdiUnload;
|
---|
1026 | DriverInitializationData.DxgkDdiQueryInterface = DxgkDdiQueryInterface;
|
---|
1027 | DriverInitializationData.DxgkDdiControlEtwLogging = DxgkDdiControlEtwLogging;
|
---|
1028 |
|
---|
1029 | DriverInitializationData.DxgkDdiQueryAdapterInfo = DxgkDdiQueryAdapterInfo;
|
---|
1030 | DriverInitializationData.DxgkDdiCreateDevice = DxgkDdiCreateDevice;
|
---|
1031 | DriverInitializationData.DxgkDdiCreateAllocation = DxgkDdiCreateAllocation;
|
---|
1032 | DriverInitializationData.DxgkDdiDestroyAllocation = DxgkDdiDestroyAllocation ;
|
---|
1033 |
|
---|
1034 | DriverInitializationData.DxgkDdiDescribeAllocation = DxgkDdiDescribeAllocation;
|
---|
1035 | DriverInitializationData.DxgkDdiGetStandardAllocationDriverData = DxgkDdiGetStandardAllocationDriverData;
|
---|
1036 |
|
---|
1037 | DriverInitializationData.DxgkDdiAcquireSwizzlingRange = DxgkDdiAcquireSwizzlingRange;
|
---|
1038 | DriverInitializationData.DxgkDdiReleaseSwizzlingRange = DxgkDdiReleaseSwizzlingRange;
|
---|
1039 |
|
---|
1040 | DriverInitializationData.DxgkDdiPatch = DxgkDdiPatch;
|
---|
1041 |
|
---|
1042 | DriverInitializationData.DxgkDdiSubmitCommand = DxgkDdiSubmitCommand;
|
---|
1043 | DriverInitializationData.DxgkDdiPreemptCommand = DxgkDdiPreemptCommand;
|
---|
1044 | DriverInitializationData.DxgkDdiBuildPagingBuffer = DxgkDdiBuildPagingBuffer;
|
---|
1045 |
|
---|
1046 | DriverInitializationData.DxgkDdiSetPalette = DxgkDdiSetPalette;
|
---|
1047 | DriverInitializationData.DxgkDdiSetPointerPosition = DxgkDdiSetPointerPosition;
|
---|
1048 | DriverInitializationData.DxgkDdiSetPointerShape = DxgkDdiSetPointerShape;
|
---|
1049 |
|
---|
1050 | DriverInitializationData.DxgkDdiResetFromTimeout = DxgkDdiResetFromTimeout;
|
---|
1051 |
|
---|
1052 | DriverInitializationData.DxgkDdiEscape = DxgkDdiEscape;
|
---|
1053 |
|
---|
1054 | DriverInitializationData.DxgkDdiCollectDbgInfo = DxgkDdiCollectDbgInfo;
|
---|
1055 |
|
---|
1056 | DriverInitializationData.DxgkDdiQueryCurrentFence = DxgkDdiQueryCurrentFence;
|
---|
1057 |
|
---|
1058 | DriverInitializationData.DxgkDdiIsSupportedVidPn = DxgkDdiIsSupportedVidPn;
|
---|
1059 | DriverInitializationData.DxgkDdiRecommendFunctionalVidPn = DxgkDdiRecommendFunctionalVidPn;
|
---|
1060 | DriverInitializationData.DxgkDdiEnumVidPnCofuncModality = DxgkDdiEnumVidPnCofuncModality;
|
---|
1061 | DriverInitializationData.DxgkDdiSetVidPnSourceAddress = DxgkDdiSetVidPnSourceAddress;
|
---|
1062 | DriverInitializationData.DxgkDdiSetVidPnSourceVisibility = DxgkDdiSetVidPnSourceVisibility;
|
---|
1063 | DriverInitializationData.DxgkDdiCommitVidPn = DxgkDdiCommitVidPn;
|
---|
1064 | DriverInitializationData.DxgkDdiUpdateActiveVidPnPresentPath = DxgkDdiUpdateActiveVidPnPresentPath;
|
---|
1065 |
|
---|
1066 | DriverInitializationData.DxgkDdiRecommendMonitorModes = DxgkDdiRecommendMonitorModes;
|
---|
1067 | DriverInitializationData.DxgkDdiRecommendVidPnTopology = DxgkDdiRecommendVidPnTopology;
|
---|
1068 |
|
---|
1069 | DriverInitializationData.DxgkDdiGetScanLine = DxgkDdiGetScanLine;
|
---|
1070 |
|
---|
1071 | DriverInitializationData.DxgkDdiStopCapture = DxgkDdiStopCapture;
|
---|
1072 |
|
---|
1073 | DriverInitializationData.DxgkDdiControlInterrupt = DxgkDdiControlInterrupt;
|
---|
1074 |
|
---|
1075 | DriverInitializationData.DxgkDdiCreateOverlay = DxgkDdiCreateOverlay;
|
---|
1076 |
|
---|
1077 | DriverInitializationData.DxgkDdiDestroyDevice = DxgkDdiDestroyDevice;
|
---|
1078 |
|
---|
1079 | DriverInitializationData.DxgkDdiOpenAllocation = DxgkDdiOpenAllocation;
|
---|
1080 | DriverInitializationData.DxgkDdiCloseAllocation = DxgkDdiCloseAllocation;
|
---|
1081 |
|
---|
1082 | DriverInitializationData.DxgkDdiRender = DxgkDdiRender;
|
---|
1083 | DriverInitializationData.DxgkDdiPresent = DxgkDdiPresent;
|
---|
1084 |
|
---|
1085 | DriverInitializationData.DxgkDdiUpdateOverlay = DxgkDdiUpdateOverlay;
|
---|
1086 | DriverInitializationData.DxgkDdiFlipOverlay = DxgkDdiFlipOverlay;
|
---|
1087 | DriverInitializationData.DxgkDdiDestroyOverlay = DxgkDdiDestroyOverlay;
|
---|
1088 |
|
---|
1089 | DriverInitializationData.DxgkDdiCreateContext = DxgkDdiCreateContext;
|
---|
1090 | DriverInitializationData.DxgkDdiDestroyContext = DxgkDdiDestroyContext;
|
---|
1091 |
|
---|
1092 | DriverInitializationData.DxgkDdiLinkDevice = DxgkDdiLinkDevice;
|
---|
1093 | DriverInitializationData.DxgkDdiSetDisplayPrivateDriverFormat = DxgkDdiSetDisplayPrivateDriverFormat;
|
---|
1094 |
|
---|
1095 | //#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN7)
|
---|
1096 | // DriverInitializationData.DxgkDdiRenderKm = D3DDDIRenderKm;
|
---|
1097 | // DriverInitializationData.DxgkDdiRestartFromTimeout = D3DDDIRestartFromTimeout;
|
---|
1098 | // DriverInitializationData.DxgkDdiSetVidPnSourceVisibility = DxgkDdiSetVidPnSourceVisibility;
|
---|
1099 | // DriverInitializationData.DxgkDdiUpdateActiveVidPnPresentPath = D3DDDIUpdateActiveVidPnPresentPath;
|
---|
1100 | // DriverInitializationData.DxgkDdiQueryVidPnHWCapability = D3DDDI DxgkDdiQueryVidPnHWCapability;
|
---|
1101 | //#endif
|
---|
1102 |
|
---|
1103 | return DxgkInitialize(DriverObject,
|
---|
1104 | RegistryPath,
|
---|
1105 | &DriverInitializationData);
|
---|
1106 | }
|
---|