Changeset 33997 in vbox
- Timestamp:
- Nov 11, 2010 2:45:10 PM (14 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Miniport
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxHGSMI.h
r33890 r33997 41 41 typedef VP_STATUS (*PFNCREATEEVENT) (IN PVOID HwDeviceExtension, IN ULONG EventFlag, IN PVOID Unused, OUT PEVENT *ppEvent); 42 42 typedef VP_STATUS (*PFNDELETEEVENT) (IN PVOID HwDeviceExtension, IN PEVENT pEvent); 43 44 typedef VP_STATUS (*PFNCREATESPINLOCK) (IN PVOID HwDeviceExtension, OUT PSPIN_LOCK *SpinLock);45 typedef VP_STATUS (*PFNDELETESPINLOCK) (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock);46 47 typedef VOID (*PFNACQUIRESPINLOCK) (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, OUT PUCHAR OldIrql);48 typedef VOID (*PFNRELEASESPINLOCK) (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, IN UCHAR NewIrql);49 typedef VOID (*PFNACQUIRESPINLOCKATDPCLEVEL) (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock);50 typedef VOID (*PFNRELEASESPINLOCKFROMDPCLEVEL) (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock);51 43 #endif 52 44 … … 75 67 typedef VBOXVP_STATUS (*PFNDELETEEVENT) (void* HwDeviceExtension, VBOXPEVENT pEvent); 76 68 77 typedef VBOXVP_STATUS (*PFNCREATESPINLOCK) (void* HwDeviceExtension, VBOXPSPIN_LOCK *SpinLock);78 typedef VBOXVP_STATUS (*PFNDELETESPINLOCK) (void* HwDeviceExtension, VBOXPSPIN_LOCK SpinLock);79 80 typedef void (*PFNACQUIRESPINLOCK) (void* HwDeviceExtension, VBOXPSPIN_LOCK SpinLock, unsigned char * OldIrql);81 typedef void (*PFNRELEASESPINLOCK) (void* HwDeviceExtension, VBOXPSPIN_LOCK SpinLock, unsigned char NewIrql);82 typedef void (*PFNACQUIRESPINLOCKATDPCLEVEL) (void* HwDeviceExtension, VBOXPSPIN_LOCK SpinLock);83 typedef void (*PFNRELEASESPINLOCKFROMDPCLEVEL) (void* HwDeviceExtension, VBOXPSPIN_LOCK SpinLock);84 85 69 typedef void* (*PFNALLOCATEPOOL) (void* HwDeviceExtension, VBOXVP_POOL_TYPE PoolType, size_t NumberOfBytes, unsigned long Tag); 86 70 typedef void (*PFNFREEPOOL) (void* HwDeviceExtension, void* Ptr); … … 88 72 typedef unsigned char (*PFNQUEUEDPC) (void* HwDeviceExtension, void (*CallbackRoutine)(void* HwDeviceExtension, void *Context), void *Context); 89 73 90 /* pfn*SpinLock* functions are available */91 #define VBOXVIDEOPORTPROCS_SPINLOCK 0x0000000192 74 /* pfn*Event and pfnWaitForSingleObject functions are available */ 93 75 #define VBOXVIDEOPORTPROCS_EVENT 0x00000002 … … 109 91 PFNDELETEEVENT pfnDeleteEvent; 110 92 111 PFNCREATESPINLOCK pfnCreateSpinLock;112 PFNDELETESPINLOCK pfnDeleteSpinLock;113 PFNACQUIRESPINLOCK pfnAcquireSpinLock;114 PFNRELEASESPINLOCK pfnReleaseSpinLock;115 PFNACQUIRESPINLOCKATDPCLEVEL pfnAcquireSpinLockAtDpcLevel;116 PFNRELEASESPINLOCKFROMDPCLEVEL pfnReleaseSpinLockFromDpcLevel;117 118 93 PFNALLOCATEPOOL pfnAllocatePool; 119 94 PFNFREEPOOL pfnFreePool; -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp
r33890 r33997 59 59 #endif /* !VBOX_WITH_MULTIMONITOR_FIX */ 60 60 61 /******************************************************************************* 62 * Structures and Typedefs * 63 *******************************************************************************/ 64 65 #ifndef VBOX_WITH_WDDM 66 typedef struct _DEVICE_EXTENSION * VBOXCMNREG; 67 #else 68 typedef HANDLE VBOXCMNREG; 69 #endif 70 71 /******************************************************************************* 72 * Internal Functions * 73 *******************************************************************************/ 74 61 75 int vboxVbvaEnable (PDEVICE_EXTENSION pDevExt, ULONG ulEnable, VBVAENABLERESULT *pVbvaResult); 62 76 … … 101 115 PULONG pUId, 102 116 PULONG pUnused); 103 104 /*******************************************************************************105 * Internal Functions *106 *******************************************************************************/107 117 108 118 #ifndef VBOX_WITH_WDDM … … 4118 4128 } 4119 4129 4120 VP_STATUS vboxCreateSpinLockVoid (IN PVOID HwDeviceExtension, OUT PSPIN_LOCK *SpinLock)4121 {4122 return ERROR_INVALID_FUNCTION;4123 }4124 4125 VP_STATUS vboxDeleteSpinLockVoid (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock)4126 {4127 return ERROR_INVALID_FUNCTION;4128 }4129 4130 VOID vboxAcquireSpinLockVoid (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, OUT PUCHAR OldIrql)4131 {4132 }4133 4134 VOID vboxReleaseSpinLockVoid (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, IN UCHAR NewIrql)4135 {4136 }4137 4138 VOID vboxAcquireSpinLockAtDpcLevelVoid (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock)4139 {4140 }4141 4142 VOID vboxReleaseSpinLockFromDpcLevelVoid (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock)4143 {4144 }4145 4146 4130 PVOID vboxAllocatePoolVoid(IN PVOID HwDeviceExtension, IN VBOXVP_POOL_TYPE PoolType, IN size_t NumberOfBytes, IN ULONG Tag) 4147 4131 { … … 4170 4154 pCallbacks->pfnCreateEvent = vboxCreateEventVoid; 4171 4155 pCallbacks->pfnDeleteEvent = vboxDeleteEventVoid; 4172 pCallbacks->pfnCreateSpinLock = vboxCreateSpinLockVoid;4173 pCallbacks->pfnDeleteSpinLock = vboxDeleteSpinLockVoid;4174 pCallbacks->pfnAcquireSpinLock = vboxAcquireSpinLockVoid;4175 pCallbacks->pfnReleaseSpinLock = vboxReleaseSpinLockVoid;4176 pCallbacks->pfnAcquireSpinLockAtDpcLevel = vboxAcquireSpinLockAtDpcLevelVoid;4177 pCallbacks->pfnReleaseSpinLockFromDpcLevel = vboxReleaseSpinLockFromDpcLevelVoid;4178 4156 pCallbacks->pfnAllocatePool = vboxAllocatePoolVoid; 4179 4157 pCallbacks->pfnFreePool = vboxFreePoolVoid; … … 4224 4202 } 4225 4203 4226 pCallbacks->pfnCreateSpinLock = (PFNCREATESPINLOCK)(pConfigInfo->VideoPortGetProcAddress)4227 (PrimaryExtension,4228 (PUCHAR)"VideoPortCreateSpinLock");4229 Assert(pCallbacks->pfnCreateSpinLock);4230 4231 pCallbacks->pfnDeleteSpinLock = (PFNDELETESPINLOCK)(pConfigInfo->VideoPortGetProcAddress)4232 (PrimaryExtension,4233 (PUCHAR)"VideoPortDeleteSpinLock");4234 Assert(pCallbacks->pfnDeleteSpinLock);4235 4236 pCallbacks->pfnAcquireSpinLock = (PFNACQUIRESPINLOCK)(pConfigInfo->VideoPortGetProcAddress)4237 (PrimaryExtension,4238 (PUCHAR)"VideoPortAcquireSpinLock");4239 Assert(pCallbacks->pfnAcquireSpinLock);4240 4241 pCallbacks->pfnReleaseSpinLock = (PFNRELEASESPINLOCK)(pConfigInfo->VideoPortGetProcAddress)4242 (PrimaryExtension,4243 (PUCHAR)"VideoPortReleaseSpinLock");4244 Assert(pCallbacks->pfnReleaseSpinLock);4245 4246 pCallbacks->pfnAcquireSpinLockAtDpcLevel = (PFNACQUIRESPINLOCKATDPCLEVEL)(pConfigInfo->VideoPortGetProcAddress)4247 (PrimaryExtension,4248 (PUCHAR)"VideoPortAcquireSpinLockAtDpcLevel");4249 Assert(pCallbacks->pfnAcquireSpinLockAtDpcLevel);4250 4251 pCallbacks->pfnReleaseSpinLockFromDpcLevel = (PFNRELEASESPINLOCKFROMDPCLEVEL)(pConfigInfo->VideoPortGetProcAddress)4252 (PrimaryExtension,4253 (PUCHAR)"VideoPortReleaseSpinLockFromDpcLevel");4254 Assert(pCallbacks->pfnReleaseSpinLockFromDpcLevel);4255 4256 if(pCallbacks->pfnCreateSpinLock4257 && pCallbacks->pfnDeleteSpinLock4258 && pCallbacks->pfnAcquireSpinLock4259 && pCallbacks->pfnReleaseSpinLock4260 && pCallbacks->pfnAcquireSpinLockAtDpcLevel4261 && pCallbacks->pfnReleaseSpinLockFromDpcLevel)4262 {4263 pCallbacks->fSupportedTypes |= VBOXVIDEOPORTPROCS_SPINLOCK;4264 }4265 else4266 {4267 pCallbacks->pfnCreateSpinLock = vboxCreateSpinLockVoid;4268 pCallbacks->pfnDeleteSpinLock = vboxDeleteSpinLockVoid;4269 pCallbacks->pfnAcquireSpinLock = vboxAcquireSpinLockVoid;4270 pCallbacks->pfnReleaseSpinLock = vboxReleaseSpinLockVoid;4271 pCallbacks->pfnAcquireSpinLockAtDpcLevel = vboxAcquireSpinLockAtDpcLevelVoid;4272 pCallbacks->pfnReleaseSpinLockFromDpcLevel = vboxReleaseSpinLockFromDpcLevelVoid;4273 }4274 4275 4204 pCallbacks->pfnAllocatePool = (PFNALLOCATEPOOL)(pConfigInfo->VideoPortGetProcAddress) 4276 4205 (PrimaryExtension, … … 4310 4239 #ifdef DEBUG_misha 4311 4240 Assert(pCallbacks->fSupportedTypes & VBOXVIDEOPORTPROCS_EVENT); 4312 Assert(pCallbacks->fSupportedTypes & VBOXVIDEOPORTPROCS_SPINLOCK);4313 4241 #endif 4314 4242 } -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h
r33890 r33997 108 108 109 109 /* common API types */ 110 #ifndef VBOX_WITH_WDDM 111 typedef PSPIN_LOCK VBOXVCMNSPIN_LOCK, *PVBOXVCMNSPIN_LOCK; 112 typedef UCHAR VBOXVCMNIRQL, *PVBOXVCMNIRQL; 113 114 typedef struct _DEVICE_EXTENSION * VBOXCMNREG; 115 #else 110 #ifdef VBOX_WITH_WDDM 116 111 #define VBOX_WITH_GENERIC_MULTIMONITOR 117 112 typedef struct _DEVICE_EXTENSION *PDEVICE_EXTENSION; … … 130 125 # include "wddm/VBoxVideoVhwa.h" 131 126 #endif 132 133 134 typedef KSPIN_LOCK VBOXVCMNSPIN_LOCK, *PVBOXVCMNSPIN_LOCK;135 typedef KIRQL VBOXVCMNIRQL, *PVBOXVCMNIRQL;136 137 typedef HANDLE VBOXCMNREG;138 127 139 128 #define VBOXWDDM_POINTER_ATTRIBUTES_SIZE VBOXWDDM_ROUNDBOUND( \ … … 397 386 398 387 #ifndef VBOX_WITH_WDDM 399 /* XPDM-WDDM common API */400 401 DECLINLINE(VOID) VBoxVideoCmnSpinLockAcquire(IN PDEVICE_EXTENSION pDeviceExtension, IN PVBOXVCMNSPIN_LOCK SpinLock, OUT PVBOXVCMNIRQL OldIrql)402 {403 pDeviceExtension->u.primary.VideoPortProcs.pfnAcquireSpinLock(pDeviceExtension, *SpinLock, OldIrql);404 }405 406 DECLINLINE(VOID) VBoxVideoCmnSpinLockRelease(IN PDEVICE_EXTENSION pDeviceExtension, IN PVBOXVCMNSPIN_LOCK SpinLock, IN VBOXVCMNIRQL NewIrql)407 {408 pDeviceExtension->u.primary.VideoPortProcs.pfnReleaseSpinLock(pDeviceExtension, *SpinLock, NewIrql);409 }410 411 DECLINLINE(VP_STATUS) VBoxVideoCmnSpinLockCreate(IN PDEVICE_EXTENSION pDeviceExtension, IN PVBOXVCMNSPIN_LOCK SpinLock)412 {413 return pDeviceExtension->u.primary.VideoPortProcs.pfnCreateSpinLock(pDeviceExtension, SpinLock);414 }415 416 DECLINLINE(VP_STATUS) VBoxVideoCmnSpinLockDelete(IN PDEVICE_EXTENSION pDeviceExtension, IN PVBOXVCMNSPIN_LOCK SpinLock)417 {418 return pDeviceExtension->u.primary.VideoPortProcs.pfnDeleteSpinLock(pDeviceExtension, *SpinLock);419 }420 421 /* */422 388 423 389 RT_C_DECLS_BEGIN … … 426 392 427 393 #else 428 429 /* XPDM-WDDM common API */430 431 DECLINLINE(VOID) VBoxVideoCmnSpinLockAcquire(IN PDEVICE_EXTENSION pDeviceExtension, IN PVBOXVCMNSPIN_LOCK SpinLock, OUT PVBOXVCMNIRQL OldIrql)432 {433 KeAcquireSpinLock(SpinLock, OldIrql);434 }435 436 DECLINLINE(VOID) VBoxVideoCmnSpinLockRelease(IN PDEVICE_EXTENSION pDeviceExtension, IN PVBOXVCMNSPIN_LOCK SpinLock, IN VBOXVCMNIRQL NewIrql)437 {438 KeReleaseSpinLock(SpinLock, NewIrql);439 }440 441 DECLINLINE(VP_STATUS) VBoxVideoCmnSpinLockCreate(IN PDEVICE_EXTENSION pDeviceExtension, IN PVBOXVCMNSPIN_LOCK SpinLock)442 {443 KeInitializeSpinLock(SpinLock);444 return NO_ERROR;445 }446 447 DECLINLINE(VP_STATUS) VBoxVideoCmnSpinLockDelete(IN PDEVICE_EXTENSION pDeviceExtension, IN PVBOXVCMNSPIN_LOCK SpinLock)448 {449 return NO_ERROR;450 }451 452 /* */453 394 454 395 RT_C_DECLS_BEGIN -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideoHGSMI.cpp
r33951 r33997 241 241 } 242 242 243 dprintf(("VBoxVideo::vboxQueryConf: u32Value = %d\n", p->u32Value));243 Log(("VBoxVideo::vboxQueryConf: u32Value = %d\n", p->u32Value)); 244 244 return VINF_SUCCESS; 245 245 } … … 247 247 static int vboxQueryConfHGSMI (PVBOXVIDEO_COMMON pCommon, uint32_t u32Index, ULONG *pulValue) 248 248 { 249 dprintf(("VBoxVideo::vboxQueryConf: u32Index = %d\n", u32Index));249 Log(("VBoxVideo::vboxQueryConf: u32Index = %d\n", u32Index)); 250 250 251 251 QUERYCONFCTX context; … … 261 261 &context); 262 262 263 dprintf(("VBoxVideo::vboxQueryConf: rc = %d\n", rc));263 Log(("VBoxVideo::vboxQueryConf: rc = %d\n", rc)); 264 264 265 265 return rc; … … 330 330 static int vboxSetupAdapterInfoHGSMI (PVBOXVIDEO_COMMON pCommon) 331 331 { 332 dprintf(("VBoxVideo::vboxSetupAdapterInfo\n"));332 Log(("VBoxVideo::vboxSetupAdapterInfo\n")); 333 333 334 334 /* setup the flags first to ensure they are initialized by the time the host heap is ready */ … … 365 365 366 366 367 dprintf(("VBoxVideo::vboxSetupAdapterInfo finished rc = %d\n", rc));367 Log(("VBoxVideo::vboxSetupAdapterInfo finished rc = %d\n", rc)); 368 368 369 369 return rc; … … 384 384 VP_STATUS rc = NO_ERROR; 385 385 386 dprintf(("VBoxVideo::VBoxSetupDisplays: pCommon = %p\n", pCommon));386 Log(("VBoxVideo::VBoxSetupDisplays: pCommon = %p\n", pCommon)); 387 387 388 388 memset(pCommon, 0, sizeof(*pCommon)); … … 408 408 if (rc != NO_ERROR) 409 409 { 410 dprintf(("VBoxVideo::VBoxSetupDisplays: VBoxMapAdapterMemory pvAdapterInfoirrmation failed rc = %d\n",410 Log(("VBoxVideo::VBoxSetupDisplays: VBoxMapAdapterMemory pvAdapterInfoirrmation failed rc = %d\n", 411 411 rc)); 412 412 … … 424 424 if (RT_FAILURE (rc)) 425 425 { 426 dprintf(("VBoxVideo::VBoxSetupDisplays: HGSMIHeapSetup failed rc = %d\n",426 Log(("VBoxVideo::VBoxSetupDisplays: HGSMIHeapSetup failed rc = %d\n", 427 427 rc)); 428 428 … … 462 462 pCommon->cbMiniportHeap = (cbMiniportHeap + 0xFFF) & ~0xFFF; 463 463 464 dprintf(("VBoxVideo::VBoxSetupDisplays: cbMiniportHeap = 0x%08X, pCommon->cbMiniportHeap = 0x%08X, cbMiniportHeapMaxSize = 0x%08X\n",464 Log(("VBoxVideo::VBoxSetupDisplays: cbMiniportHeap = 0x%08X, pCommon->cbMiniportHeap = 0x%08X, cbMiniportHeapMaxSize = 0x%08X\n", 465 465 cbMiniportHeap, pCommon->cbMiniportHeap, cbMiniportHeapMaxSize)); 466 466 … … 511 511 vboxQueryConfHGSMI (pCommon, VBOX_VBVA_CONF32_MONITOR_COUNT, &cDisplays); 512 512 513 dprintf(("VBoxVideo::VBoxSetupDisplays: cDisplays = %d\n",513 Log(("VBoxVideo::VBoxSetupDisplays: cDisplays = %d\n", 514 514 cDisplays)); 515 515 … … 536 536 VBoxFreeDisplaysHGSMI(pCommon); 537 537 538 dprintf(("VBoxVideo::VBoxSetupDisplays: finished\n"));538 Log(("VBoxVideo::VBoxSetupDisplays: finished\n")); 539 539 } 540 540 … … 621 621 622 622 #ifndef DEBUG_misha 623 dprintf(("vboxUpdatePointerShape: cbData %d, %dx%d\n",623 Log(("vboxUpdatePointerShape: cbData %d, %dx%d\n", 624 624 cbData, pointerAttr->Width, pointerAttr->Height)); 625 625 #endif … … 627 627 if (cbData > cbLength - sizeof(VIDEO_POINTER_ATTRIBUTES)) 628 628 { 629 dprintf(("vboxUpdatePointerShape: calculated pointer data size is too big (%d bytes, limit %d)\n",629 Log(("vboxUpdatePointerShape: calculated pointer data size is too big (%d bytes, limit %d)\n", 630 630 cbData, cbLength - sizeof(VIDEO_POINTER_ATTRIBUTES))); 631 631 return FALSE; … … 644 644 &ctx); 645 645 #ifndef DEBUG_misha 646 dprintf(("VBoxVideo::vboxMousePointerShape: rc %d, i32Result = %d\n", rc, ctx.i32Result));646 Log(("VBoxVideo::vboxMousePointerShape: rc %d, i32Result = %d\n", rc, ctx.i32Result)); 647 647 #endif 648 648
Note:
See TracChangeset
for help on using the changeset viewer.