Changeset 33532 in vbox
- Timestamp:
- Oct 27, 2010 10:21:36 PM (14 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Miniport
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp
r33264 r33532 58 58 int vboxVbvaEnable (PDEVICE_EXTENSION pDevExt, ULONG ulEnable, VBVAENABLERESULT *pVbvaResult); 59 59 60 static VP_STATUS VBoxVideoFindAdapter( 61 IN PVOID HwDeviceExtension, 62 IN PVOID HwContext, 63 IN PWSTR ArgumentString, 64 IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo, 65 OUT PUCHAR Again); 66 67 static BOOLEAN VBoxVideoInitialize(PVOID HwDeviceExtension); 68 69 static BOOLEAN VBoxVideoStartIO( 70 PVOID HwDeviceExtension, 71 PVIDEO_REQUEST_PACKET RequestPacket); 72 73 #ifdef VBOX_WITH_VIDEOHWACCEL 74 static BOOLEAN VBoxVideoInterrupt(PVOID HwDeviceExtension); 75 #endif 76 77 78 static BOOLEAN VBoxVideoResetHW( 79 PVOID HwDeviceExtension, 80 ULONG Columns, 81 ULONG Rows); 82 83 static VP_STATUS VBoxVideoGetPowerState( 84 PVOID HwDeviceExtension, 85 ULONG HwId, 86 PVIDEO_POWER_MANAGEMENT VideoPowerControl); 87 88 static VP_STATUS VBoxVideoSetPowerState( 89 PVOID HwDeviceExtension, 90 ULONG HwId, 91 PVIDEO_POWER_MANAGEMENT VideoPowerControl); 92 93 static VP_STATUS VBoxVideoGetChildDescriptor( 94 PVOID HwDeviceExtension, 95 PVIDEO_CHILD_ENUM_INFO ChildEnumInfo, 96 PVIDEO_CHILD_TYPE VideoChildType, 97 PUCHAR pChildDescriptor, 98 PULONG pUId, 99 PULONG pUnused); 100 60 101 #ifndef VBOX_WITH_WDDM 61 102 ULONG DriverEntry(IN PVOID Context1, IN PVOID Context2) … … 164 205 return VideoPortSetRegistryParameters(Reg, pName, &Val, sizeof(Val)); 165 206 } 207 208 static void VBoxSetupVideoPortFunctions(PDEVICE_EXTENSION PrimaryExtension, 209 VBOXVIDEOPORTPROCS *pCallbacks, 210 PVIDEO_PORT_CONFIG_INFO pConfigInfo); 166 211 167 212 #endif /* #ifndef VBOX_WITH_WDDM */ … … 1759 1804 # ifdef VBOX_WITH_VIDEOHWACCEL 1760 1805 1806 static VOID VBoxVideoHGSMIDpc( 1807 IN PVOID HwDeviceExtension, 1808 IN PVOID Context 1809 ) 1810 { 1811 PDEVICE_EXTENSION PrimaryExtension = (PDEVICE_EXTENSION)HwDeviceExtension; 1812 1813 hgsmiProcessHostCommandQueue(commonFromDeviceExt(PrimaryExtension)); 1814 } 1815 1761 1816 BOOLEAN VBoxVideoInterrupt(PVOID HwDeviceExtension) 1762 1817 { … … 1773 1828 { 1774 1829 /* schedule a DPC*/ 1775 BOOLEAN bResult = PrimaryExtension->u.primary.VideoPortProcs.pfnQueueDpc(PrimaryExtension, VBoxVideoHGSMIDpc, (PVOID)1);1830 BOOLEAN bResult = PrimaryExtension->u.primary.VideoPortProcs.pfnQueueDpc(PrimaryExtension, VBoxVideoHGSMIDpc, NULL); 1776 1831 Assert(bResult); 1777 1832 } … … 2880 2935 return ERROR_NO_MORE_DEVICES; 2881 2936 } 2937 2938 2939 #ifndef VBOX_WITH_WDDM 2940 VP_STATUS vboxWaitForSingleObjectVoid(IN PVOID HwDeviceExtension, IN PVOID Object, IN PLARGE_INTEGER Timeout OPTIONAL) 2941 { 2942 return ERROR_INVALID_FUNCTION; 2943 } 2944 2945 LONG vboxSetEventVoid(IN PVOID HwDeviceExtension, IN PEVENT pEvent) 2946 { 2947 return 0; 2948 } 2949 2950 VOID vboxClearEventVoid (IN PVOID HwDeviceExtension, IN PEVENT pEvent) 2951 { 2952 } 2953 2954 VP_STATUS vboxCreateEventVoid(IN PVOID HwDeviceExtension, IN ULONG EventFlag, IN PVOID Unused, OUT PEVENT *ppEvent) 2955 { 2956 return ERROR_INVALID_FUNCTION; 2957 } 2958 2959 VP_STATUS vboxDeleteEventVoid(IN PVOID HwDeviceExtension, IN PEVENT pEvent) 2960 { 2961 return ERROR_INVALID_FUNCTION; 2962 } 2963 2964 VP_STATUS vboxCreateSpinLockVoid (IN PVOID HwDeviceExtension, OUT PSPIN_LOCK *SpinLock) 2965 { 2966 return ERROR_INVALID_FUNCTION; 2967 } 2968 2969 VP_STATUS vboxDeleteSpinLockVoid (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock) 2970 { 2971 return ERROR_INVALID_FUNCTION; 2972 } 2973 2974 VOID vboxAcquireSpinLockVoid (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, OUT PUCHAR OldIrql) 2975 { 2976 } 2977 2978 VOID vboxReleaseSpinLockVoid (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, IN UCHAR NewIrql) 2979 { 2980 } 2981 2982 VOID vboxAcquireSpinLockAtDpcLevelVoid (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock) 2983 { 2984 } 2985 2986 VOID vboxReleaseSpinLockFromDpcLevelVoid (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock) 2987 { 2988 } 2989 2990 PVOID vboxAllocatePoolVoid(IN PVOID HwDeviceExtension, IN VBOXVP_POOL_TYPE PoolType, IN size_t NumberOfBytes, IN ULONG Tag) 2991 { 2992 return NULL; 2993 } 2994 2995 VOID vboxFreePoolVoid(IN PVOID HwDeviceExtension, IN PVOID Ptr) 2996 { 2997 } 2998 2999 BOOLEAN vboxQueueDpcVoid(IN PVOID HwDeviceExtension, IN PMINIPORT_DPC_ROUTINE CallbackRoutine, IN PVOID Context) 3000 { 3001 return FALSE; 3002 } 3003 3004 void VBoxSetupVideoPortFunctions(PDEVICE_EXTENSION PrimaryExtension, VBOXVIDEOPORTPROCS *pCallbacks, PVIDEO_PORT_CONFIG_INFO pConfigInfo) 3005 { 3006 memset(pCallbacks, 0, sizeof(VBOXVIDEOPORTPROCS)); 3007 3008 if (vboxQueryWinVersion() <= WINNT4) 3009 { 3010 /* VideoPortGetProcAddress is available for >= win2k */ 3011 pCallbacks->pfnWaitForSingleObject = vboxWaitForSingleObjectVoid; 3012 pCallbacks->pfnSetEvent = vboxSetEventVoid; 3013 pCallbacks->pfnClearEvent = vboxClearEventVoid; 3014 pCallbacks->pfnCreateEvent = vboxCreateEventVoid; 3015 pCallbacks->pfnDeleteEvent = vboxDeleteEventVoid; 3016 pCallbacks->pfnCreateSpinLock = vboxCreateSpinLockVoid; 3017 pCallbacks->pfnDeleteSpinLock = vboxDeleteSpinLockVoid; 3018 pCallbacks->pfnAcquireSpinLock = vboxAcquireSpinLockVoid; 3019 pCallbacks->pfnReleaseSpinLock = vboxReleaseSpinLockVoid; 3020 pCallbacks->pfnAcquireSpinLockAtDpcLevel = vboxAcquireSpinLockAtDpcLevelVoid; 3021 pCallbacks->pfnReleaseSpinLockFromDpcLevel = vboxReleaseSpinLockFromDpcLevelVoid; 3022 pCallbacks->pfnAllocatePool = vboxAllocatePoolVoid; 3023 pCallbacks->pfnFreePool = vboxFreePoolVoid; 3024 pCallbacks->pfnQueueDpc = vboxQueueDpcVoid; 3025 return; 3026 } 3027 3028 pCallbacks->pfnWaitForSingleObject = (PFNWAITFORSINGLEOBJECT)(pConfigInfo->VideoPortGetProcAddress) 3029 (PrimaryExtension, 3030 (PUCHAR)"VideoPortWaitForSingleObject"); 3031 Assert(pCallbacks->pfnWaitForSingleObject); 3032 3033 pCallbacks->pfnSetEvent = (PFNSETEVENT)(pConfigInfo->VideoPortGetProcAddress) 3034 (PrimaryExtension, 3035 (PUCHAR)"VideoPortSetEvent"); 3036 Assert(pCallbacks->pfnSetEvent); 3037 3038 pCallbacks->pfnClearEvent = (PFNCLEAREVENT)(pConfigInfo->VideoPortGetProcAddress) 3039 (PrimaryExtension, 3040 (PUCHAR)"VideoPortClearEvent"); 3041 Assert(pCallbacks->pfnClearEvent); 3042 3043 pCallbacks->pfnCreateEvent = (PFNCREATEEVENT)(pConfigInfo->VideoPortGetProcAddress) 3044 (PrimaryExtension, 3045 (PUCHAR)"VideoPortCreateEvent"); 3046 Assert(pCallbacks->pfnCreateEvent); 3047 3048 pCallbacks->pfnDeleteEvent = (PFNDELETEEVENT)(pConfigInfo->VideoPortGetProcAddress) 3049 (PrimaryExtension, 3050 (PUCHAR)"VideoPortDeleteEvent"); 3051 Assert(pCallbacks->pfnDeleteEvent); 3052 3053 if(pCallbacks->pfnWaitForSingleObject 3054 && pCallbacks->pfnSetEvent 3055 && pCallbacks->pfnClearEvent 3056 && pCallbacks->pfnCreateEvent 3057 && pCallbacks->pfnDeleteEvent) 3058 { 3059 pCallbacks->fSupportedTypes |= VBOXVIDEOPORTPROCS_EVENT; 3060 } 3061 else 3062 { 3063 pCallbacks->pfnWaitForSingleObject = vboxWaitForSingleObjectVoid; 3064 pCallbacks->pfnSetEvent = vboxSetEventVoid; 3065 pCallbacks->pfnClearEvent = vboxClearEventVoid; 3066 pCallbacks->pfnCreateEvent = vboxCreateEventVoid; 3067 pCallbacks->pfnDeleteEvent = vboxDeleteEventVoid; 3068 } 3069 3070 pCallbacks->pfnCreateSpinLock = (PFNCREATESPINLOCK)(pConfigInfo->VideoPortGetProcAddress) 3071 (PrimaryExtension, 3072 (PUCHAR)"VideoPortCreateSpinLock"); 3073 Assert(pCallbacks->pfnCreateSpinLock); 3074 3075 pCallbacks->pfnDeleteSpinLock = (PFNDELETESPINLOCK)(pConfigInfo->VideoPortGetProcAddress) 3076 (PrimaryExtension, 3077 (PUCHAR)"VideoPortDeleteSpinLock"); 3078 Assert(pCallbacks->pfnDeleteSpinLock); 3079 3080 pCallbacks->pfnAcquireSpinLock = (PFNACQUIRESPINLOCK)(pConfigInfo->VideoPortGetProcAddress) 3081 (PrimaryExtension, 3082 (PUCHAR)"VideoPortAcquireSpinLock"); 3083 Assert(pCallbacks->pfnAcquireSpinLock); 3084 3085 pCallbacks->pfnReleaseSpinLock = (PFNRELEASESPINLOCK)(pConfigInfo->VideoPortGetProcAddress) 3086 (PrimaryExtension, 3087 (PUCHAR)"VideoPortReleaseSpinLock"); 3088 Assert(pCallbacks->pfnReleaseSpinLock); 3089 3090 pCallbacks->pfnAcquireSpinLockAtDpcLevel = (PFNACQUIRESPINLOCKATDPCLEVEL)(pConfigInfo->VideoPortGetProcAddress) 3091 (PrimaryExtension, 3092 (PUCHAR)"VideoPortAcquireSpinLockAtDpcLevel"); 3093 Assert(pCallbacks->pfnAcquireSpinLockAtDpcLevel); 3094 3095 pCallbacks->pfnReleaseSpinLockFromDpcLevel = (PFNRELEASESPINLOCKFROMDPCLEVEL)(pConfigInfo->VideoPortGetProcAddress) 3096 (PrimaryExtension, 3097 (PUCHAR)"VideoPortReleaseSpinLockFromDpcLevel"); 3098 Assert(pCallbacks->pfnReleaseSpinLockFromDpcLevel); 3099 3100 if(pCallbacks->pfnCreateSpinLock 3101 && pCallbacks->pfnDeleteSpinLock 3102 && pCallbacks->pfnAcquireSpinLock 3103 && pCallbacks->pfnReleaseSpinLock 3104 && pCallbacks->pfnAcquireSpinLockAtDpcLevel 3105 && pCallbacks->pfnReleaseSpinLockFromDpcLevel) 3106 { 3107 pCallbacks->fSupportedTypes |= VBOXVIDEOPORTPROCS_SPINLOCK; 3108 } 3109 else 3110 { 3111 pCallbacks->pfnCreateSpinLock = vboxCreateSpinLockVoid; 3112 pCallbacks->pfnDeleteSpinLock = vboxDeleteSpinLockVoid; 3113 pCallbacks->pfnAcquireSpinLock = vboxAcquireSpinLockVoid; 3114 pCallbacks->pfnReleaseSpinLock = vboxReleaseSpinLockVoid; 3115 pCallbacks->pfnAcquireSpinLockAtDpcLevel = vboxAcquireSpinLockAtDpcLevelVoid; 3116 pCallbacks->pfnReleaseSpinLockFromDpcLevel = vboxReleaseSpinLockFromDpcLevelVoid; 3117 } 3118 3119 pCallbacks->pfnAllocatePool = (PFNALLOCATEPOOL)(pConfigInfo->VideoPortGetProcAddress) 3120 (PrimaryExtension, 3121 (PUCHAR)"VideoPortAllocatePool"); 3122 Assert(pCallbacks->pfnAllocatePool); 3123 3124 pCallbacks->pfnFreePool = (PFNFREEPOOL)(pConfigInfo->VideoPortGetProcAddress) 3125 (PrimaryExtension, 3126 (PUCHAR)"VideoPortFreePool"); 3127 Assert(pCallbacks->pfnFreePool); 3128 3129 if(pCallbacks->pfnAllocatePool 3130 && pCallbacks->pfnFreePool) 3131 { 3132 pCallbacks->fSupportedTypes |= VBOXVIDEOPORTPROCS_POOL; 3133 } 3134 else 3135 { 3136 pCallbacks->pfnAllocatePool = vboxAllocatePoolVoid; 3137 pCallbacks->pfnFreePool = vboxFreePoolVoid; 3138 } 3139 3140 pCallbacks->pfnQueueDpc = (PFNQUEUEDPC)(pConfigInfo->VideoPortGetProcAddress) 3141 (PrimaryExtension, 3142 (PUCHAR)"VideoPortQueueDpc"); 3143 Assert(pCallbacks->pfnQueueDpc); 3144 3145 if(pCallbacks->pfnQueueDpc) 3146 { 3147 pCallbacks->fSupportedTypes |= VBOXVIDEOPORTPROCS_DPC; 3148 } 3149 else 3150 { 3151 pCallbacks->pfnQueueDpc = vboxQueueDpcVoid; 3152 } 3153 3154 #ifdef DEBUG_misha 3155 Assert(pCallbacks->fSupportedTypes & VBOXVIDEOPORTPROCS_EVENT); 3156 Assert(pCallbacks->fSupportedTypes & VBOXVIDEOPORTPROCS_SPINLOCK); 3157 #endif 3158 } 3159 #endif 2882 3160 2883 3161 -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h
r33530 r33532 493 493 RT_C_DECLS_END 494 494 495 VP_STATUS VBoxVideoFindAdapter(496 IN PVOID HwDeviceExtension,497 IN PVOID HwContext,498 IN PWSTR ArgumentString,499 IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo,500 OUT PUCHAR Again);501 502 BOOLEAN VBoxVideoInitialize(PVOID HwDeviceExtension);503 504 BOOLEAN VBoxVideoStartIO(505 PVOID HwDeviceExtension,506 PVIDEO_REQUEST_PACKET RequestPacket);507 508 #ifdef VBOX_WITH_VIDEOHWACCEL509 BOOLEAN VBoxVideoInterrupt(PVOID HwDeviceExtension);510 #endif511 512 513 BOOLEAN VBoxVideoResetHW(514 PVOID HwDeviceExtension,515 ULONG Columns,516 ULONG Rows);517 518 VP_STATUS VBoxVideoGetPowerState(519 PVOID HwDeviceExtension,520 ULONG HwId,521 PVIDEO_POWER_MANAGEMENT VideoPowerControl);522 523 VP_STATUS VBoxVideoSetPowerState(524 PVOID HwDeviceExtension,525 ULONG HwId,526 PVIDEO_POWER_MANAGEMENT VideoPowerControl);527 528 VP_STATUS VBoxVideoGetChildDescriptor(529 PVOID HwDeviceExtension,530 PVIDEO_CHILD_ENUM_INFO ChildEnumInfo,531 PVIDEO_CHILD_TYPE VideoChildType,532 PUCHAR pChildDescriptor,533 PULONG pUId,534 PULONG pUnused);535 536 537 void VBoxSetupVideoPortFunctions(PDEVICE_EXTENSION PrimaryExtension,538 VBOXVIDEOPORTPROCS *pCallbacks,539 PVIDEO_PORT_CONFIG_INFO pConfigInfo);540 541 495 #else 542 496 … … 911 865 uint8_t u8Channel); 912 866 913 VOID VBoxVideoHGSMIDpc( 914 IN PVOID HwDeviceExtension, 915 IN PVOID Context 916 ); 867 void hgsmiProcessHostCommandQueue(PVBOXVIDEO_COMMON pCommon); 917 868 918 869 void HGSMIClearIrq (PVBOXVIDEO_COMMON pCommon); -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideoHGSMI.cpp
r33530 r33532 83 83 } 84 84 85 VOID VBoxVideoHGSMIDpc( 86 IN PVOID HwDeviceExtension, 87 IN PVOID Context 88 ) 89 { 90 PDEVICE_EXTENSION PrimaryExtension = (PDEVICE_EXTENSION)HwDeviceExtension; 91 92 while ( commonFromDeviceExt(PrimaryExtension)->pHostFlags->u32HostFlags 93 & HGSMIHOSTFLAGS_COMMANDS_PENDING) 94 { 95 if (!ASMAtomicCmpXchgBool(&commonFromDeviceExt(PrimaryExtension) 96 ->bHostCmdProcessing, true, false)) 85 void hgsmiProcessHostCommandQueue(PVBOXVIDEO_COMMON pCommon) 86 { 87 while (pCommon->pHostFlags->u32HostFlags & HGSMIHOSTFLAGS_COMMANDS_PENDING) 88 { 89 if (!ASMAtomicCmpXchgBool(&pCommon->bHostCmdProcessing, true, false)) 97 90 return; 98 hgsmiHostCommandQueryProcess(commonFromDeviceExt(PrimaryExtension)); 99 ASMAtomicWriteBool(&commonFromDeviceExt(PrimaryExtension) 100 ->bHostCmdProcessing, false); 91 hgsmiHostCommandQueryProcess(pCommon); 92 ASMAtomicWriteBool(&pCommon->bHostCmdProcessing, false); 101 93 } 102 94 } … … 412 404 } 413 405 414 #ifndef VBOX_WITH_WDDM415 VP_STATUS vboxWaitForSingleObjectVoid(IN PVOID HwDeviceExtension, IN PVOID Object, IN PLARGE_INTEGER Timeout OPTIONAL)416 {417 return ERROR_INVALID_FUNCTION;418 }419 420 LONG vboxSetEventVoid(IN PVOID HwDeviceExtension, IN PEVENT pEvent)421 {422 return 0;423 }424 425 VOID vboxClearEventVoid (IN PVOID HwDeviceExtension, IN PEVENT pEvent)426 {427 }428 429 VP_STATUS vboxCreateEventVoid(IN PVOID HwDeviceExtension, IN ULONG EventFlag, IN PVOID Unused, OUT PEVENT *ppEvent)430 {431 return ERROR_INVALID_FUNCTION;432 }433 434 VP_STATUS vboxDeleteEventVoid(IN PVOID HwDeviceExtension, IN PEVENT pEvent)435 {436 return ERROR_INVALID_FUNCTION;437 }438 439 VP_STATUS vboxCreateSpinLockVoid (IN PVOID HwDeviceExtension, OUT PSPIN_LOCK *SpinLock)440 {441 return ERROR_INVALID_FUNCTION;442 }443 444 VP_STATUS vboxDeleteSpinLockVoid (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock)445 {446 return ERROR_INVALID_FUNCTION;447 }448 449 VOID vboxAcquireSpinLockVoid (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, OUT PUCHAR OldIrql)450 {451 }452 453 VOID vboxReleaseSpinLockVoid (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock, IN UCHAR NewIrql)454 {455 }456 457 VOID vboxAcquireSpinLockAtDpcLevelVoid (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock)458 {459 }460 461 VOID vboxReleaseSpinLockFromDpcLevelVoid (IN PVOID HwDeviceExtension, IN PSPIN_LOCK SpinLock)462 {463 }464 465 PVOID vboxAllocatePoolVoid(IN PVOID HwDeviceExtension, IN VBOXVP_POOL_TYPE PoolType, IN size_t NumberOfBytes, IN ULONG Tag)466 {467 return NULL;468 }469 470 VOID vboxFreePoolVoid(IN PVOID HwDeviceExtension, IN PVOID Ptr)471 {472 }473 474 BOOLEAN vboxQueueDpcVoid(IN PVOID HwDeviceExtension, IN PMINIPORT_DPC_ROUTINE CallbackRoutine, IN PVOID Context)475 {476 return FALSE;477 }478 479 void VBoxSetupVideoPortFunctions(PDEVICE_EXTENSION PrimaryExtension, VBOXVIDEOPORTPROCS *pCallbacks, PVIDEO_PORT_CONFIG_INFO pConfigInfo)480 {481 memset(pCallbacks, 0, sizeof(VBOXVIDEOPORTPROCS));482 483 if (vboxQueryWinVersion() <= WINNT4)484 {485 /* VideoPortGetProcAddress is available for >= win2k */486 pCallbacks->pfnWaitForSingleObject = vboxWaitForSingleObjectVoid;487 pCallbacks->pfnSetEvent = vboxSetEventVoid;488 pCallbacks->pfnClearEvent = vboxClearEventVoid;489 pCallbacks->pfnCreateEvent = vboxCreateEventVoid;490 pCallbacks->pfnDeleteEvent = vboxDeleteEventVoid;491 pCallbacks->pfnCreateSpinLock = vboxCreateSpinLockVoid;492 pCallbacks->pfnDeleteSpinLock = vboxDeleteSpinLockVoid;493 pCallbacks->pfnAcquireSpinLock = vboxAcquireSpinLockVoid;494 pCallbacks->pfnReleaseSpinLock = vboxReleaseSpinLockVoid;495 pCallbacks->pfnAcquireSpinLockAtDpcLevel = vboxAcquireSpinLockAtDpcLevelVoid;496 pCallbacks->pfnReleaseSpinLockFromDpcLevel = vboxReleaseSpinLockFromDpcLevelVoid;497 pCallbacks->pfnAllocatePool = vboxAllocatePoolVoid;498 pCallbacks->pfnFreePool = vboxFreePoolVoid;499 pCallbacks->pfnQueueDpc = vboxQueueDpcVoid;500 return;501 }502 503 pCallbacks->pfnWaitForSingleObject = (PFNWAITFORSINGLEOBJECT)(pConfigInfo->VideoPortGetProcAddress)504 (PrimaryExtension,505 (PUCHAR)"VideoPortWaitForSingleObject");506 Assert(pCallbacks->pfnWaitForSingleObject);507 508 pCallbacks->pfnSetEvent = (PFNSETEVENT)(pConfigInfo->VideoPortGetProcAddress)509 (PrimaryExtension,510 (PUCHAR)"VideoPortSetEvent");511 Assert(pCallbacks->pfnSetEvent);512 513 pCallbacks->pfnClearEvent = (PFNCLEAREVENT)(pConfigInfo->VideoPortGetProcAddress)514 (PrimaryExtension,515 (PUCHAR)"VideoPortClearEvent");516 Assert(pCallbacks->pfnClearEvent);517 518 pCallbacks->pfnCreateEvent = (PFNCREATEEVENT)(pConfigInfo->VideoPortGetProcAddress)519 (PrimaryExtension,520 (PUCHAR)"VideoPortCreateEvent");521 Assert(pCallbacks->pfnCreateEvent);522 523 pCallbacks->pfnDeleteEvent = (PFNDELETEEVENT)(pConfigInfo->VideoPortGetProcAddress)524 (PrimaryExtension,525 (PUCHAR)"VideoPortDeleteEvent");526 Assert(pCallbacks->pfnDeleteEvent);527 528 if(pCallbacks->pfnWaitForSingleObject529 && pCallbacks->pfnSetEvent530 && pCallbacks->pfnClearEvent531 && pCallbacks->pfnCreateEvent532 && pCallbacks->pfnDeleteEvent)533 {534 pCallbacks->fSupportedTypes |= VBOXVIDEOPORTPROCS_EVENT;535 }536 else537 {538 pCallbacks->pfnWaitForSingleObject = vboxWaitForSingleObjectVoid;539 pCallbacks->pfnSetEvent = vboxSetEventVoid;540 pCallbacks->pfnClearEvent = vboxClearEventVoid;541 pCallbacks->pfnCreateEvent = vboxCreateEventVoid;542 pCallbacks->pfnDeleteEvent = vboxDeleteEventVoid;543 }544 545 pCallbacks->pfnCreateSpinLock = (PFNCREATESPINLOCK)(pConfigInfo->VideoPortGetProcAddress)546 (PrimaryExtension,547 (PUCHAR)"VideoPortCreateSpinLock");548 Assert(pCallbacks->pfnCreateSpinLock);549 550 pCallbacks->pfnDeleteSpinLock = (PFNDELETESPINLOCK)(pConfigInfo->VideoPortGetProcAddress)551 (PrimaryExtension,552 (PUCHAR)"VideoPortDeleteSpinLock");553 Assert(pCallbacks->pfnDeleteSpinLock);554 555 pCallbacks->pfnAcquireSpinLock = (PFNACQUIRESPINLOCK)(pConfigInfo->VideoPortGetProcAddress)556 (PrimaryExtension,557 (PUCHAR)"VideoPortAcquireSpinLock");558 Assert(pCallbacks->pfnAcquireSpinLock);559 560 pCallbacks->pfnReleaseSpinLock = (PFNRELEASESPINLOCK)(pConfigInfo->VideoPortGetProcAddress)561 (PrimaryExtension,562 (PUCHAR)"VideoPortReleaseSpinLock");563 Assert(pCallbacks->pfnReleaseSpinLock);564 565 pCallbacks->pfnAcquireSpinLockAtDpcLevel = (PFNACQUIRESPINLOCKATDPCLEVEL)(pConfigInfo->VideoPortGetProcAddress)566 (PrimaryExtension,567 (PUCHAR)"VideoPortAcquireSpinLockAtDpcLevel");568 Assert(pCallbacks->pfnAcquireSpinLockAtDpcLevel);569 570 pCallbacks->pfnReleaseSpinLockFromDpcLevel = (PFNRELEASESPINLOCKFROMDPCLEVEL)(pConfigInfo->VideoPortGetProcAddress)571 (PrimaryExtension,572 (PUCHAR)"VideoPortReleaseSpinLockFromDpcLevel");573 Assert(pCallbacks->pfnReleaseSpinLockFromDpcLevel);574 575 if(pCallbacks->pfnCreateSpinLock576 && pCallbacks->pfnDeleteSpinLock577 && pCallbacks->pfnAcquireSpinLock578 && pCallbacks->pfnReleaseSpinLock579 && pCallbacks->pfnAcquireSpinLockAtDpcLevel580 && pCallbacks->pfnReleaseSpinLockFromDpcLevel)581 {582 pCallbacks->fSupportedTypes |= VBOXVIDEOPORTPROCS_SPINLOCK;583 }584 else585 {586 pCallbacks->pfnCreateSpinLock = vboxCreateSpinLockVoid;587 pCallbacks->pfnDeleteSpinLock = vboxDeleteSpinLockVoid;588 pCallbacks->pfnAcquireSpinLock = vboxAcquireSpinLockVoid;589 pCallbacks->pfnReleaseSpinLock = vboxReleaseSpinLockVoid;590 pCallbacks->pfnAcquireSpinLockAtDpcLevel = vboxAcquireSpinLockAtDpcLevelVoid;591 pCallbacks->pfnReleaseSpinLockFromDpcLevel = vboxReleaseSpinLockFromDpcLevelVoid;592 }593 594 pCallbacks->pfnAllocatePool = (PFNALLOCATEPOOL)(pConfigInfo->VideoPortGetProcAddress)595 (PrimaryExtension,596 (PUCHAR)"VideoPortAllocatePool");597 Assert(pCallbacks->pfnAllocatePool);598 599 pCallbacks->pfnFreePool = (PFNFREEPOOL)(pConfigInfo->VideoPortGetProcAddress)600 (PrimaryExtension,601 (PUCHAR)"VideoPortFreePool");602 Assert(pCallbacks->pfnFreePool);603 604 if(pCallbacks->pfnAllocatePool605 && pCallbacks->pfnFreePool)606 {607 pCallbacks->fSupportedTypes |= VBOXVIDEOPORTPROCS_POOL;608 }609 else610 {611 pCallbacks->pfnAllocatePool = vboxAllocatePoolVoid;612 pCallbacks->pfnFreePool = vboxFreePoolVoid;613 }614 615 pCallbacks->pfnQueueDpc = (PFNQUEUEDPC)(pConfigInfo->VideoPortGetProcAddress)616 (PrimaryExtension,617 (PUCHAR)"VideoPortQueueDpc");618 Assert(pCallbacks->pfnQueueDpc);619 620 if(pCallbacks->pfnQueueDpc)621 {622 pCallbacks->fSupportedTypes |= VBOXVIDEOPORTPROCS_DPC;623 }624 else625 {626 pCallbacks->pfnQueueDpc = vboxQueueDpcVoid;627 }628 629 #ifdef DEBUG_misha630 Assert(pCallbacks->fSupportedTypes & VBOXVIDEOPORTPROCS_EVENT);631 Assert(pCallbacks->fSupportedTypes & VBOXVIDEOPORTPROCS_SPINLOCK);632 #endif633 }634 #endif635 406 636 407 /** … … 1306 1077 1307 1078 /* pick up the host commands */ 1308 VBoxVideoHGSMIDpc(PrimaryExtension, NULL);1079 hgsmiProcessHostCommandQueue(commonFromDeviceExt(PrimaryExtension)); 1309 1080 1310 1081 HGSMICHANNEL * pChannel = HGSMIChannelFindById (&commonFromDeviceExt(PrimaryExtension)->channels, u8Channel);
Note:
See TracChangeset
for help on using the changeset viewer.