VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp@ 26050

Last change on this file since 26050 was 26050, checked in by vboxsync, 15 years ago

wddm: more impl

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 42.8 KB
Line 
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'
23PVOID vboxWddmMemAlloc(IN SIZE_T cbSize)
24{
25 return ExAllocatePoolWithTag(NonPagedPool, cbSize, VBOXWDDM_MEMTAG);
26}
27
28PVOID vboxWddmMemAllocZero(IN SIZE_T cbSize)
29{
30 PVOID pvMem = vboxWddmMemAlloc(cbSize);
31 memset(pvMem, 0, cbSize);
32 return pvMem;
33}
34
35
36VOID vboxWddmMemFree(PVOID pvMem)
37{
38 ExFreePool(pvMem);
39}
40
41NTSTATUS 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
115NTSTATUS 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
142NTSTATUS 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
224NTSTATUS DxgkDdiStopDevice(
225 IN CONST PVOID MiniportDeviceContext
226 )
227{
228 return STATUS_NOT_IMPLEMENTED;
229}
230
231NTSTATUS DxgkDdiRemoveDevice(
232 IN CONST PVOID MiniportDeviceContext
233 )
234{
235 return STATUS_NOT_IMPLEMENTED;
236}
237
238NTSTATUS 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
247BOOLEAN DxgkDdiInterruptRoutine(
248 IN CONST PVOID MiniportDeviceContext,
249 IN ULONG MessageNumber
250 )
251{
252 return false;
253}
254
255VOID DxgkDdiDpcRoutine(
256 IN CONST PVOID MiniportDeviceContext
257 )
258{
259
260}
261
262NTSTATUS 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
286NTSTATUS 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
319NTSTATUS 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
340NTSTATUS 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
359NTSTATUS 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
370VOID DxgkDdiResetDevice(
371 IN CONST PVOID MiniportDeviceContext
372 )
373{
374 /* DxgkDdiResetDevice can be called at any IRQL, so it must be in nonpageable memory. */
375 dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
376 dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", MiniportDeviceContext));
377}
378
379VOID DxgkDdiUnload(
380 VOID
381 )
382{
383 /* DxgkDdiUnload should be made pageable. */
384 PAGED_CODE();
385 dfprintf(("==> "__FUNCTION__ "\n"));
386 dfprintf(("<== "__FUNCTION__ "\n"));
387}
388
389NTSTATUS DxgkDdiQueryInterface(
390 IN CONST PVOID MiniportDeviceContext,
391 IN PQUERY_INTERFACE QueryInterface
392 )
393{
394 return STATUS_NOT_IMPLEMENTED;
395}
396
397VOID DxgkDdiControlEtwLogging(
398 IN BOOLEAN Enable,
399 IN ULONG Flags,
400 IN UCHAR Level
401 )
402{
403
404}
405
406NTSTATUS APIENTRY DxgkDdiQueryAdapterInfo(
407 CONST HANDLE hAdapter,
408 CONST DXGKARG_QUERYADAPTERINFO* pQueryAdapterInfo)
409{
410 return STATUS_NOT_IMPLEMENTED;
411}
412
413NTSTATUS APIENTRY DxgkDdiCreateDevice(
414 CONST HANDLE hAdapter,
415 DXGKARG_CREATEDEVICE* pCreateDevice)
416{
417 return STATUS_NOT_IMPLEMENTED;
418}
419
420NTSTATUS APIENTRY DxgkDdiCreateAllocation(
421 CONST HANDLE hAdapter,
422 DXGKARG_CREATEALLOCATION* pCreateAllocation)
423{
424 return STATUS_NOT_IMPLEMENTED;
425}
426
427NTSTATUS
428APIENTRY
429DxgkDdiDestroyAllocation(
430 CONST HANDLE hAdapter,
431 CONST DXGKARG_DESTROYALLOCATION* pDestroyAllocation)
432{
433 return STATUS_NOT_IMPLEMENTED;
434}
435
436
437NTSTATUS
438APIENTRY
439DxgkDdiDescribeAllocation(
440 CONST HANDLE hAdapter,
441 DXGKARG_DESCRIBEALLOCATION* pDescribeAllocation)
442{
443 return STATUS_NOT_IMPLEMENTED;
444}
445
446NTSTATUS
447APIENTRY
448DxgkDdiGetStandardAllocationDriverData(
449 CONST HANDLE hAdapter,
450 DXGKARG_GETSTANDARDALLOCATIONDRIVERDATA* pGetStandardAllocationDriverData)
451{
452 return STATUS_NOT_IMPLEMENTED;
453}
454
455NTSTATUS
456APIENTRY
457DxgkDdiAcquireSwizzlingRange(
458 CONST HANDLE hAdapter,
459 DXGKARG_ACQUIRESWIZZLINGRANGE* pAcquireSwizzlingRange)
460{
461 return STATUS_NOT_IMPLEMENTED;
462}
463
464NTSTATUS
465APIENTRY
466DxgkDdiReleaseSwizzlingRange(
467 CONST HANDLE hAdapter,
468 CONST DXGKARG_RELEASESWIZZLINGRANGE* pReleaseSwizzlingRange)
469{
470 return STATUS_NOT_IMPLEMENTED;
471}
472
473NTSTATUS
474APIENTRY
475DxgkDdiPatch(
476 CONST HANDLE hAdapter,
477 CONST DXGKARG_PATCH* pPatch)
478{
479 return STATUS_NOT_IMPLEMENTED;
480}
481
482NTSTATUS
483APIENTRY
484DxgkDdiSubmitCommand(
485 CONST HANDLE hAdapter,
486 CONST DXGKARG_SUBMITCOMMAND* pSubmitCommand)
487{
488 return STATUS_NOT_IMPLEMENTED;
489}
490
491NTSTATUS
492APIENTRY
493DxgkDdiPreemptCommand(
494 CONST HANDLE hAdapter,
495 CONST DXGKARG_PREEMPTCOMMAND* pPreemptCommand)
496{
497 return STATUS_NOT_IMPLEMENTED;
498}
499
500NTSTATUS
501APIENTRY
502DxgkDdiBuildPagingBuffer(
503 CONST HANDLE hAdapter,
504 DXGKARG_BUILDPAGINGBUFFER* pBuildPagingBuffer)
505{
506 return STATUS_NOT_IMPLEMENTED;
507}
508
509NTSTATUS
510APIENTRY
511DxgkDdiSetPalette(
512 CONST HANDLE hAdapter,
513 CONST DXGKARG_SETPALETTE* pSetPalette
514 )
515{
516 return STATUS_NOT_IMPLEMENTED;
517}
518
519NTSTATUS
520APIENTRY
521DxgkDdiSetPointerPosition(
522 CONST HANDLE hAdapter,
523 CONST DXGKARG_SETPOINTERPOSITION* pSetPointerPosition)
524{
525 return STATUS_NOT_IMPLEMENTED;
526}
527
528NTSTATUS
529APIENTRY
530DxgkDdiSetPointerShape(
531 CONST HANDLE hAdapter,
532 CONST DXGKARG_SETPOINTERSHAPE* pSetPointerShape)
533{
534 return STATUS_NOT_IMPLEMENTED;
535}
536
537NTSTATUS
538APIENTRY CALLBACK
539DxgkDdiResetFromTimeout(
540 CONST HANDLE hAdapter)
541{
542 return STATUS_NOT_IMPLEMENTED;
543}
544
545NTSTATUS
546APIENTRY
547DxgkDdiEscape(
548 CONST HANDLE hAdapter,
549 CONST DXGKARG_ESCAPE* pEscape)
550{
551 PAGED_CODE();
552
553 return STATUS_INVALID_PARAMETER;
554}
555
556NTSTATUS
557APIENTRY
558DxgkDdiCollectDbgInfo(
559 CONST HANDLE hAdapter,
560 CONST DXGKARG_COLLECTDBGINFO* pCollectDbgInfo
561 )
562{
563 return STATUS_NOT_IMPLEMENTED;
564}
565
566NTSTATUS
567APIENTRY
568DxgkDdiQueryCurrentFence(
569 CONST HANDLE hAdapter,
570 DXGKARG_QUERYCURRENTFENCE* pCurrentFence)
571{
572 return STATUS_NOT_IMPLEMENTED;
573}
574
575NTSTATUS
576APIENTRY
577DxgkDdiIsSupportedVidPn(
578 CONST HANDLE hAdapter,
579 OUT DXGKARG_ISSUPPORTEDVIDPN* pIsSupportedVidPnArg
580 )
581{
582 /* The DxgkDdiIsSupportedVidPn should be made pageable. */
583 PAGED_CODE();
584
585 dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter));
586
587 PDEVICE_EXTENSION pContext = (PDEVICE_EXTENSION)hAdapter;
588 BOOLEAN bSupported = TRUE;
589 const DXGK_VIDPN_INTERFACE* pVidPnInterface = NULL;
590 NTSTATUS Status = pContext->u.primary.DxgkInterface.DxgkCbQueryVidPnInterface(pIsSupportedVidPnArg->hDesiredVidPn, DXGK_VIDPN_INTERFACE_VERSION_V1, &pVidPnInterface);
591 if (Status == STATUS_SUCCESS)
592 {
593 D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology;
594 const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface;
595 Status = pVidPnInterface->pfnGetTopology(pIsSupportedVidPnArg->hDesiredVidPn, &hVidPnTopology, &pVidPnTopologyInterface);
596 if (Status == STATUS_SUCCESS)
597 {
598 Status = vboxVidPnCheckTopology(pIsSupportedVidPnArg->hDesiredVidPn, hVidPnTopology, pVidPnTopologyInterface, &bSupported);
599 if (Status == STATUS_SUCCESS && bSupported)
600 {
601 for (int id = 0; id < pContext->u.primary.cDisplays; id++)
602 {
603 D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet;
604 const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface;
605 Status = pVidPnInterface->pfnAcquireSourceModeSet(pIsSupportedVidPnArg->hDesiredVidPn,
606 id,
607 &hNewVidPnSourceModeSet,
608 &pVidPnSourceModeSetInterface);
609 if (Status == STATUS_SUCCESS)
610 {
611 Status = vboxVidPnCheckSourceModeSet(pIsSupportedVidPnArg->hDesiredVidPn, hNewVidPnSourceModeSet, pVidPnSourceModeSetInterface, &bSupported);
612
613 pVidPnInterface->pfnReleaseSourceModeSet(pIsSupportedVidPnArg->hDesiredVidPn, hNewVidPnSourceModeSet);
614
615 if (Status != STATUS_SUCCESS || !bSupported)
616 break;
617 }
618 else if (Status == STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE)
619 {
620 drprintf(("VBoxVideoWddm: Warning: pfnAcquireSourceModeSet returned STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE, continuing\n"));
621 Status = STATUS_SUCCESS;
622 }
623 else
624 {
625 drprintf(("VBoxVideoWddm: pfnAcquireSourceModeSet failed Status(0x%x)\n"));
626 break;
627 }
628 }
629
630 if (Status == STATUS_SUCCESS && bSupported)
631 {
632 for (int id = 0; id < pContext->u.primary.cDisplays; id++)
633 {
634 D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet;
635 CONST DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface;
636 Status = pVidPnInterface->pfnAcquireTargetModeSet(pIsSupportedVidPnArg->hDesiredVidPn,
637 id, /*__in CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId */
638 &hNewVidPnTargetModeSet,
639 &pVidPnTargetModeSetInterface);
640 if (Status == STATUS_SUCCESS)
641 {
642 Status = vboxVidPnCheckTargetModeSet(pIsSupportedVidPnArg->hDesiredVidPn, hNewVidPnTargetModeSet, pVidPnTargetModeSetInterface, &bSupported);
643
644 pVidPnInterface->pfnReleaseTargetModeSet(pIsSupportedVidPnArg->hDesiredVidPn, hNewVidPnTargetModeSet);
645
646 if (Status != STATUS_SUCCESS || !bSupported)
647 break;
648 }
649 else if (Status == STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE)
650 {
651 drprintf(("VBoxVideoWddm: Warning: pfnAcquireSourceModeSet returned STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE, continuing\n"));
652 Status = STATUS_SUCCESS;
653 }
654 else
655 {
656 drprintf(("VBoxVideoWddm: pfnAcquireSourceModeSet failed Status(0x%x)\n"));
657 break;
658 }
659 }
660 }
661 }
662 }
663 else
664 {
665 drprintf(("VBoxVideoWddm: pfnGetTopology failed Status(0x%x)\n"));
666 }
667 }
668 else
669 {
670 drprintf(("VBoxVideoWddm: DxgkCbQueryVidPnInterface failed Status(0x%x)\n"));
671 }
672 pIsSupportedVidPnArg->IsVidPnSupported = bSupported;
673
674 dfprintf(("<== "__FUNCTION__ ", status(0x%x), context(0x%x)\n", Status, hAdapter));
675
676 return STATUS_SUCCESS;
677}
678
679NTSTATUS
680APIENTRY
681DxgkDdiRecommendFunctionalVidPn(
682 CONST HANDLE hAdapter,
683 CONST DXGKARG_RECOMMENDFUNCTIONALVIDPN* CONST pRecommendFunctionalVidPnArg
684 )
685{
686 /* The DxgkDdiRecommendFunctionalVidPn should be made pageable. */
687 PAGED_CODE();
688
689 dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter));
690
691 PDEVICE_EXTENSION pContext = (PDEVICE_EXTENSION)hAdapter;
692 const DXGK_VIDPN_INTERFACE* pVidPnInterface = NULL;
693 NTSTATUS Status = pContext->u.primary.DxgkInterface.DxgkCbQueryVidPnInterface(pRecommendFunctionalVidPnArg->hRecommendedFunctionalVidPn, DXGK_VIDPN_INTERFACE_VERSION_V1, &pVidPnInterface);
694 if (Status == STATUS_SUCCESS)
695 {
696 D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology;
697 const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface;
698 Status = pVidPnInterface->pfnGetTopology(pRecommendFunctionalVidPnArg->hRecommendedFunctionalVidPn, &hVidPnTopology, &pVidPnTopologyInterface);
699 if (Status == STATUS_SUCCESS)
700 {
701 D3DKMDT_VIDPN_PRESENT_PATH *pNewVidPnPresentPathInfo;
702 Status = pVidPnTopologyInterface->pfnCreateNewPathInfo(hVidPnTopology, &pNewVidPnPresentPathInfo);
703 if (Status == STATUS_SUCCESS)
704 {
705 pNewVidPnPresentPathInfo->VidPnSourceId = 0;
706 pNewVidPnPresentPathInfo->VidPnTargetId = 0;
707 pNewVidPnPresentPathInfo->ImportanceOrdinal = D3DKMDT_VPPI_PRIMARY;
708 pNewVidPnPresentPathInfo->ContentTransformation.Scaling = D3DKMDT_VPPS_IDENTITY;
709 memset(&pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport,
710 0, sizeof(pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport));
711 pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport.Identity = 1;
712 pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport.Centered = 1;
713 pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport.Stretched = 0;
714 pNewVidPnPresentPathInfo->ContentTransformation.Rotation = D3DKMDT_VPPR_IDENTITY;
715 pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Identity = 1;
716 pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Rotate180 = 0;
717 pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Rotate270 = 0;
718 pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Rotate90 = 0;
719 pNewVidPnPresentPathInfo->VisibleFromActiveTLOffset.cx = 0;
720 pNewVidPnPresentPathInfo->VisibleFromActiveTLOffset.cy = 0;
721 pNewVidPnPresentPathInfo->VisibleFromActiveBROffset.cx = 0;
722 pNewVidPnPresentPathInfo->VisibleFromActiveBROffset.cy = 0;
723 pNewVidPnPresentPathInfo->VidPnTargetColorBasis = D3DKMDT_CB_SRGB; /* @todo: how does it matters? */
724 pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.FirstChannel = 8;
725 pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.SecondChannel = 8;
726 pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.ThirdChannel = 8;
727 pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.FourthChannel = 0;
728 pNewVidPnPresentPathInfo->Content = D3DKMDT_VPPC_GRAPHICS;
729 pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionType = D3DKMDT_VPPMT_NOPROTECTION;
730 pNewVidPnPresentPathInfo->CopyProtection.APSTriggerBits = 0;
731 memset(&pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionSupport, 0, sizeof(pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionSupport));
732 pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionSupport.NoProtection = 1;
733 pNewVidPnPresentPathInfo->GammaRamp.Type = D3DDDI_GAMMARAMP_DEFAULT;
734 pNewVidPnPresentPathInfo->GammaRamp.DataSize = 0;
735 Status = pVidPnTopologyInterface->pfnAddPath(hVidPnTopology, pNewVidPnPresentPathInfo);
736 if (Status == STATUS_SUCCESS)
737 {
738 D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet;
739 const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface;
740 Status = pVidPnInterface->pfnCreateNewSourceModeSet(pRecommendFunctionalVidPnArg->hRecommendedFunctionalVidPn,
741 0, /*__in CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId */
742 &hNewVidPnSourceModeSet,
743 &pVidPnSourceModeSetInterface);
744 if (Status == STATUS_SUCCESS)
745 {
746 D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo;
747 Status = pVidPnSourceModeSetInterface->pfnCreateNewModeInfo(hNewVidPnSourceModeSet, &pNewVidPnSourceModeInfo);
748 if (Status == STATUS_SUCCESS)
749 {
750 D3DKMDT_VIDEO_PRESENT_SOURCE_MODE_ID modeId = pNewVidPnSourceModeInfo->Id;
751 pNewVidPnSourceModeInfo->Type = D3DKMDT_RMT_GRAPHICS;
752 /* @todo: should we obtain the default mode from the host? */
753 pNewVidPnSourceModeInfo->Format.Graphics.PrimSurfSize.cx = 1024;
754 pNewVidPnSourceModeInfo->Format.Graphics.PrimSurfSize.cy = 768;
755 pNewVidPnSourceModeInfo->Format.Graphics.VisibleRegionSize = pNewVidPnSourceModeInfo->Format.Graphics.PrimSurfSize;
756 pNewVidPnSourceModeInfo->Format.Graphics.Stride = pNewVidPnSourceModeInfo->Format.Graphics.PrimSurfSize.cx * 4;
757 pNewVidPnSourceModeInfo->Format.Graphics.PixelFormat = D3DDDIFMT_X8R8G8B8;
758 pNewVidPnSourceModeInfo->Format.Graphics.ColorBasis = D3DKMDT_CB_SRGB;
759 pNewVidPnSourceModeInfo->Format.Graphics.PixelValueAccessMode = D3DKMDT_PVAM_DIRECT;
760 Status = pVidPnSourceModeSetInterface->pfnAddMode(hNewVidPnSourceModeSet, pNewVidPnSourceModeInfo);
761 if (Status == STATUS_SUCCESS)
762 {
763 Status = pVidPnSourceModeSetInterface->pfnPinMode(hNewVidPnSourceModeSet, modeId);
764 if (Status == STATUS_SUCCESS)
765 {
766 D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet;
767 CONST DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface;
768 Status = pVidPnInterface->pfnCreateNewTargetModeSet(pRecommendFunctionalVidPnArg->hRecommendedFunctionalVidPn,
769 0, /* __in CONST D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId */
770 &hNewVidPnTargetModeSet,
771 &pVidPnTargetModeSetInterface);
772 if (Status == STATUS_SUCCESS)
773 {
774 D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo;
775 Status = pVidPnTargetModeSetInterface->pfnCreateNewModeInfo(hNewVidPnTargetModeSet, &pNewVidPnTargetModeInfo);
776 if (Status == STATUS_SUCCESS)
777 {
778 D3DKMDT_VIDEO_PRESENT_TARGET_MODE_ID targetId = pNewVidPnTargetModeInfo->Id;
779 pNewVidPnTargetModeInfo->VideoSignalInfo.VideoStandard = D3DKMDT_VSS_OTHER;
780 pNewVidPnTargetModeInfo->VideoSignalInfo.TotalSize.cx = 1024;
781 pNewVidPnTargetModeInfo->VideoSignalInfo.TotalSize.cy = 768;
782 pNewVidPnTargetModeInfo->VideoSignalInfo.ActiveSize = pNewVidPnTargetModeInfo->VideoSignalInfo.TotalSize;
783 pNewVidPnTargetModeInfo->VideoSignalInfo.VSyncFreq.Numerator = 60;
784 pNewVidPnTargetModeInfo->VideoSignalInfo.VSyncFreq.Denominator = 1;
785 pNewVidPnTargetModeInfo->VideoSignalInfo.HSyncFreq.Numerator = 63 * 768; /* @todo: do we need that? */
786 pNewVidPnTargetModeInfo->VideoSignalInfo.HSyncFreq.Denominator = 1;
787 pNewVidPnTargetModeInfo->VideoSignalInfo.PixelRate = 165000; /* ?? */
788 pNewVidPnTargetModeInfo->VideoSignalInfo.ScanLineOrdering = D3DDDI_VSSLO_PROGRESSIVE;
789 pNewVidPnTargetModeInfo->Preference = D3DKMDT_MP_PREFERRED;
790 Status = pVidPnTargetModeSetInterface->pfnAddMode(hNewVidPnTargetModeSet, pNewVidPnTargetModeInfo);
791 if (Status == STATUS_SUCCESS)
792 {
793 Status = pVidPnTargetModeSetInterface->pfnPinMode(hNewVidPnTargetModeSet, targetId);
794 if (Status == STATUS_SUCCESS)
795 {
796
797 }
798 else
799 {
800 drprintf(("VBoxVideoWddm: pfnPinMode (target) failed Status(0x%x)\n"));
801 }
802 }
803 else
804 {
805 drprintf(("VBoxVideoWddm: pfnAddMode (target) failed Status(0x%x)\n"));
806 pVidPnTargetModeSetInterface->pfnReleaseModeInfo(hNewVidPnTargetModeSet, pNewVidPnTargetModeInfo);
807 pNewVidPnTargetModeInfo = NULL;
808 }
809 }
810 else
811 {
812 drprintf(("VBoxVideoWddm: pfnCreateNewModeInfo (target) failed Status(0x%x)\n"));
813 }
814 }
815 else
816 {
817 drprintf(("VBoxVideoWddm: pfnCreateNewTargetModeSet failed Status(0x%x)\n"));
818 }
819 }
820 else
821 {
822 drprintf(("VBoxVideoWddm: pfnPinMode failed Status(0x%x)\n"));
823 }
824 }
825 else
826 {
827 drprintf(("VBoxVideoWddm: pfnAddMode failed Status(0x%x)\n"));
828 pVidPnSourceModeSetInterface->pfnReleaseModeInfo(hNewVidPnSourceModeSet, pNewVidPnSourceModeInfo);
829 pNewVidPnSourceModeInfo = NULL;
830 }
831 }
832 else
833 {
834 drprintf(("VBoxVideoWddm: pfnCreateNewModeInfo failed Status(0x%x)\n"));
835 }
836 }
837 else
838 {
839 drprintf(("VBoxVideoWddm: pfnCreateNewSourceModeSet failed Status(0x%x)\n"));
840 }
841 }
842 else
843 {
844 drprintf(("VBoxVideoWddm: pfnAddPath failed Status(0x%x)\n"));
845 pVidPnTopologyInterface->pfnReleasePathInfo(hVidPnTopology, pNewVidPnPresentPathInfo);
846 pNewVidPnPresentPathInfo = NULL;
847 }
848 }
849 else
850 {
851 drprintf(("VBoxVideoWddm: pfnCreateNewPathInfo failed Status(0x%x)\n"));
852 }
853 }
854 else
855 {
856 drprintf(("VBoxVideoWddm: pfnGetTopology failed Status(0x%x)\n"));
857 }
858 }
859 else
860 {
861 drprintf(("VBoxVideoWddm: DxgkCbQueryVidPnInterface failed Status(0x%x)\n"));
862 }
863
864 dfprintf(("<== "__FUNCTION__ ", status(0x%x), context(0x%x)\n", Status, hAdapter));
865
866 return Status;
867}
868
869NTSTATUS
870APIENTRY
871DxgkDdiEnumVidPnCofuncModality(
872 CONST HANDLE hAdapter,
873 CONST DXGKARG_ENUMVIDPNCOFUNCMODALITY* CONST pEnumCofuncModalityArg
874 )
875{
876 return STATUS_NOT_IMPLEMENTED;
877}
878
879NTSTATUS
880APIENTRY
881DxgkDdiSetVidPnSourceAddress(
882 CONST HANDLE hAdapter,
883 CONST DXGKARG_SETVIDPNSOURCEADDRESS* pSetVidPnSourceAddress
884 )
885{
886 return STATUS_NOT_IMPLEMENTED;
887}
888
889NTSTATUS
890APIENTRY
891DxgkDdiSetVidPnSourceVisibility(
892 CONST HANDLE hAdapter,
893 CONST DXGKARG_SETVIDPNSOURCEVISIBILITY* pSetVidPnSourceVisibility
894 )
895{
896 return STATUS_NOT_IMPLEMENTED;
897}
898
899NTSTATUS
900APIENTRY
901DxgkDdiCommitVidPn(
902 CONST HANDLE hAdapter,
903 CONST DXGKARG_COMMITVIDPN* CONST pCommitVidPnArg
904 )
905{
906 return STATUS_NOT_IMPLEMENTED;
907}
908
909NTSTATUS
910APIENTRY
911DxgkDdiUpdateActiveVidPnPresentPath(
912 CONST HANDLE hAdapter,
913 CONST DXGKARG_UPDATEACTIVEVIDPNPRESENTPATH* CONST pUpdateActiveVidPnPresentPathArg
914 )
915{
916 return STATUS_NOT_IMPLEMENTED;
917}
918
919NTSTATUS
920APIENTRY
921DxgkDdiRecommendMonitorModes(
922 CONST HANDLE hAdapter,
923 CONST DXGKARG_RECOMMENDMONITORMODES* CONST pRecommendMonitorModesArg
924 )
925{
926 return STATUS_NOT_IMPLEMENTED;
927}
928
929NTSTATUS
930APIENTRY
931DxgkDdiRecommendVidPnTopology(
932 CONST HANDLE hAdapter,
933 CONST DXGKARG_RECOMMENDVIDPNTOPOLOGY* CONST pRecommendVidPnTopologyArg
934 )
935{
936 return STATUS_NOT_IMPLEMENTED;
937}
938
939NTSTATUS
940APIENTRY
941DxgkDdiGetScanLine(
942 CONST HANDLE hAdapter,
943 DXGKARG_GETSCANLINE* pGetScanLine)
944{
945 return STATUS_NOT_IMPLEMENTED;
946}
947
948NTSTATUS
949APIENTRY
950DxgkDdiStopCapture(
951 CONST HANDLE hAdapter,
952 CONST DXGKARG_STOPCAPTURE* pStopCapture)
953{
954 return STATUS_NOT_IMPLEMENTED;
955}
956
957NTSTATUS
958APIENTRY
959DxgkDdiControlInterrupt(
960 CONST HANDLE hAdapter,
961 CONST DXGK_INTERRUPT_TYPE InterruptType,
962 BOOLEAN Enable
963 )
964{
965 return STATUS_NOT_IMPLEMENTED;
966}
967
968NTSTATUS
969APIENTRY
970DxgkDdiCreateOverlay(
971 CONST HANDLE hAdapter,
972 DXGKARG_CREATEOVERLAY *pCreateOverlay)
973{
974 return STATUS_NOT_IMPLEMENTED;
975}
976
977NTSTATUS
978APIENTRY
979DxgkDdiDestroyDevice(
980 CONST HANDLE hDevice)
981{
982 return STATUS_NOT_IMPLEMENTED;
983}
984
985NTSTATUS
986APIENTRY
987DxgkDdiOpenAllocation(
988 CONST HANDLE hDevice,
989 CONST DXGKARG_OPENALLOCATION *pOpenAllocation)
990{
991 return STATUS_NOT_IMPLEMENTED;
992}
993
994NTSTATUS
995APIENTRY
996DxgkDdiCloseAllocation(
997 CONST HANDLE hDevice,
998 CONST DXGKARG_CLOSEALLOCATION* pCloseAllocation)
999{
1000 return STATUS_NOT_IMPLEMENTED;
1001}
1002
1003NTSTATUS
1004APIENTRY
1005DxgkDdiRender(
1006 CONST HANDLE hContext,
1007 DXGKARG_RENDER *pRender)
1008{
1009 return STATUS_NOT_IMPLEMENTED;
1010}
1011
1012NTSTATUS
1013APIENTRY
1014DxgkDdiPresent(
1015 CONST HANDLE hContext,
1016 DXGKARG_PRESENT *pPresent)
1017{
1018 return STATUS_NOT_IMPLEMENTED;
1019}
1020
1021NTSTATUS
1022APIENTRY
1023DxgkDdiUpdateOverlay(
1024 CONST HANDLE hOverlay,
1025 CONST DXGKARG_UPDATEOVERLAY *pUpdateOverlay)
1026{
1027 return STATUS_NOT_IMPLEMENTED;
1028}
1029
1030NTSTATUS
1031APIENTRY
1032DxgkDdiFlipOverlay(
1033 CONST HANDLE hOverlay,
1034 CONST DXGKARG_FLIPOVERLAY *pFlipOverlay)
1035{
1036 return STATUS_NOT_IMPLEMENTED;
1037}
1038
1039NTSTATUS
1040APIENTRY
1041DxgkDdiDestroyOverlay(
1042 CONST HANDLE hOverlay)
1043{
1044 return STATUS_NOT_IMPLEMENTED;
1045}
1046
1047NTSTATUS
1048APIENTRY
1049DxgkDdiCreateContext(
1050 CONST HANDLE hDevice,
1051 DXGKARG_CREATECONTEXT *pCreateContext)
1052{
1053 return STATUS_NOT_IMPLEMENTED;
1054}
1055
1056NTSTATUS
1057APIENTRY
1058DxgkDdiDestroyContext(
1059 CONST HANDLE hContext)
1060{
1061 return STATUS_NOT_IMPLEMENTED;
1062}
1063
1064NTSTATUS
1065APIENTRY
1066DxgkDdiLinkDevice(
1067 __in CONST PDEVICE_OBJECT PhysicalDeviceObject,
1068 __in CONST PVOID MiniportDeviceContext,
1069 __inout PLINKED_DEVICE LinkedDevice
1070 )
1071{
1072 return STATUS_NOT_IMPLEMENTED;
1073}
1074
1075NTSTATUS
1076APIENTRY
1077DxgkDdiSetDisplayPrivateDriverFormat(
1078 CONST HANDLE hAdapter,
1079 /*CONST*/ DXGKARG_SETDISPLAYPRIVATEDRIVERFORMAT* pSetDisplayPrivateDriverFormat
1080 )
1081{
1082 return STATUS_NOT_IMPLEMENTED;
1083}
1084
1085NTSTATUS
1086DriverEntry(
1087 IN PDRIVER_OBJECT DriverObject,
1088 IN PUNICODE_STRING RegistryPath
1089 )
1090{
1091 dprintf(("VBoxVideoWddm::DriverEntry. Built %s %s\n", __DATE__, __TIME__));
1092
1093 DRIVER_INITIALIZATION_DATA DriverInitializationData = {'\0'};
1094
1095 PAGED_CODE();
1096
1097 if (! ARGUMENT_PRESENT(DriverObject) ||
1098 ! ARGUMENT_PRESENT(RegistryPath))
1099 {
1100 return STATUS_INVALID_PARAMETER;
1101 }
1102
1103 // Fill in the DriverInitializationData structure and call DxgkInitialize()
1104 DriverInitializationData.Version = DXGKDDI_INTERFACE_VERSION;
1105
1106 DriverInitializationData.DxgkDdiAddDevice = DxgkDdiAddDevice;
1107 DriverInitializationData.DxgkDdiStartDevice = DxgkDdiStartDevice;
1108 DriverInitializationData.DxgkDdiStopDevice = DxgkDdiStopDevice;
1109 DriverInitializationData.DxgkDdiRemoveDevice = DxgkDdiRemoveDevice;
1110 DriverInitializationData.DxgkDdiDispatchIoRequest = DxgkDdiDispatchIoRequest;
1111 DriverInitializationData.DxgkDdiInterruptRoutine = DxgkDdiInterruptRoutine;
1112 DriverInitializationData.DxgkDdiDpcRoutine = DxgkDdiDpcRoutine;
1113 DriverInitializationData.DxgkDdiQueryChildRelations = DxgkDdiQueryChildRelations;
1114 DriverInitializationData.DxgkDdiQueryChildStatus = DxgkDdiQueryChildStatus;
1115 DriverInitializationData.DxgkDdiQueryDeviceDescriptor = DxgkDdiQueryDeviceDescriptor;
1116 DriverInitializationData.DxgkDdiSetPowerState = DxgkDdiSetPowerState;
1117 DriverInitializationData.DxgkDdiNotifyAcpiEvent = DxgkDdiNotifyAcpiEvent;
1118 DriverInitializationData.DxgkDdiResetDevice = DxgkDdiResetDevice;
1119 DriverInitializationData.DxgkDdiUnload = DxgkDdiUnload;
1120 DriverInitializationData.DxgkDdiQueryInterface = DxgkDdiQueryInterface;
1121 DriverInitializationData.DxgkDdiControlEtwLogging = DxgkDdiControlEtwLogging;
1122
1123 DriverInitializationData.DxgkDdiQueryAdapterInfo = DxgkDdiQueryAdapterInfo;
1124 DriverInitializationData.DxgkDdiCreateDevice = DxgkDdiCreateDevice;
1125 DriverInitializationData.DxgkDdiCreateAllocation = DxgkDdiCreateAllocation;
1126 DriverInitializationData.DxgkDdiDestroyAllocation = DxgkDdiDestroyAllocation ;
1127
1128 DriverInitializationData.DxgkDdiDescribeAllocation = DxgkDdiDescribeAllocation;
1129 DriverInitializationData.DxgkDdiGetStandardAllocationDriverData = DxgkDdiGetStandardAllocationDriverData;
1130
1131 DriverInitializationData.DxgkDdiAcquireSwizzlingRange = DxgkDdiAcquireSwizzlingRange;
1132 DriverInitializationData.DxgkDdiReleaseSwizzlingRange = DxgkDdiReleaseSwizzlingRange;
1133
1134 DriverInitializationData.DxgkDdiPatch = DxgkDdiPatch;
1135
1136 DriverInitializationData.DxgkDdiSubmitCommand = DxgkDdiSubmitCommand;
1137 DriverInitializationData.DxgkDdiPreemptCommand = DxgkDdiPreemptCommand;
1138 DriverInitializationData.DxgkDdiBuildPagingBuffer = DxgkDdiBuildPagingBuffer;
1139
1140 DriverInitializationData.DxgkDdiSetPalette = DxgkDdiSetPalette;
1141 DriverInitializationData.DxgkDdiSetPointerPosition = DxgkDdiSetPointerPosition;
1142 DriverInitializationData.DxgkDdiSetPointerShape = DxgkDdiSetPointerShape;
1143
1144 DriverInitializationData.DxgkDdiResetFromTimeout = DxgkDdiResetFromTimeout;
1145
1146 DriverInitializationData.DxgkDdiEscape = DxgkDdiEscape;
1147
1148 DriverInitializationData.DxgkDdiCollectDbgInfo = DxgkDdiCollectDbgInfo;
1149
1150 DriverInitializationData.DxgkDdiQueryCurrentFence = DxgkDdiQueryCurrentFence;
1151
1152 DriverInitializationData.DxgkDdiIsSupportedVidPn = DxgkDdiIsSupportedVidPn;
1153 DriverInitializationData.DxgkDdiRecommendFunctionalVidPn = DxgkDdiRecommendFunctionalVidPn;
1154 DriverInitializationData.DxgkDdiEnumVidPnCofuncModality = DxgkDdiEnumVidPnCofuncModality;
1155 DriverInitializationData.DxgkDdiSetVidPnSourceAddress = DxgkDdiSetVidPnSourceAddress;
1156 DriverInitializationData.DxgkDdiSetVidPnSourceVisibility = DxgkDdiSetVidPnSourceVisibility;
1157 DriverInitializationData.DxgkDdiCommitVidPn = DxgkDdiCommitVidPn;
1158 DriverInitializationData.DxgkDdiUpdateActiveVidPnPresentPath = DxgkDdiUpdateActiveVidPnPresentPath;
1159
1160 DriverInitializationData.DxgkDdiRecommendMonitorModes = DxgkDdiRecommendMonitorModes;
1161 DriverInitializationData.DxgkDdiRecommendVidPnTopology = DxgkDdiRecommendVidPnTopology;
1162
1163 DriverInitializationData.DxgkDdiGetScanLine = DxgkDdiGetScanLine;
1164
1165 DriverInitializationData.DxgkDdiStopCapture = DxgkDdiStopCapture;
1166
1167 DriverInitializationData.DxgkDdiControlInterrupt = DxgkDdiControlInterrupt;
1168
1169 DriverInitializationData.DxgkDdiCreateOverlay = DxgkDdiCreateOverlay;
1170
1171 DriverInitializationData.DxgkDdiDestroyDevice = DxgkDdiDestroyDevice;
1172
1173 DriverInitializationData.DxgkDdiOpenAllocation = DxgkDdiOpenAllocation;
1174 DriverInitializationData.DxgkDdiCloseAllocation = DxgkDdiCloseAllocation;
1175
1176 DriverInitializationData.DxgkDdiRender = DxgkDdiRender;
1177 DriverInitializationData.DxgkDdiPresent = DxgkDdiPresent;
1178
1179 DriverInitializationData.DxgkDdiUpdateOverlay = DxgkDdiUpdateOverlay;
1180 DriverInitializationData.DxgkDdiFlipOverlay = DxgkDdiFlipOverlay;
1181 DriverInitializationData.DxgkDdiDestroyOverlay = DxgkDdiDestroyOverlay;
1182
1183 DriverInitializationData.DxgkDdiCreateContext = DxgkDdiCreateContext;
1184 DriverInitializationData.DxgkDdiDestroyContext = DxgkDdiDestroyContext;
1185
1186 DriverInitializationData.DxgkDdiLinkDevice = DxgkDdiLinkDevice;
1187 DriverInitializationData.DxgkDdiSetDisplayPrivateDriverFormat = DxgkDdiSetDisplayPrivateDriverFormat;
1188
1189//#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN7)
1190// DriverInitializationData.DxgkDdiRenderKm = D3DDDIRenderKm;
1191// DriverInitializationData.DxgkDdiRestartFromTimeout = D3DDDIRestartFromTimeout;
1192// DriverInitializationData.DxgkDdiSetVidPnSourceVisibility = DxgkDdiSetVidPnSourceVisibility;
1193// DriverInitializationData.DxgkDdiUpdateActiveVidPnPresentPath = D3DDDIUpdateActiveVidPnPresentPath;
1194// DriverInitializationData.DxgkDdiQueryVidPnHWCapability = D3DDDI DxgkDdiQueryVidPnHWCapability;
1195//#endif
1196
1197 return DxgkInitialize(DriverObject,
1198 RegistryPath,
1199 &DriverInitializationData);
1200}
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette