Changeset 22448 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Miniport
- Timestamp:
- Aug 25, 2009 11:12:49 PM (15 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
r22446 r22448 1158 1158 1159 1159 #ifdef VBOX_WITH_HGSMI 1160 VideoPortCreateSpinLock(HwDeviceExtension, &((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.pGHRWLock); 1160 VBoxSetupVideoPortFunctions((PDEVICE_EXTENSION)HwDeviceExtension, &((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.VideoPortProcs, ConfigInfo); 1161 ((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.VideoPortProcs.pfnCreateSpinLock(HwDeviceExtension, &((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.pGHRWLock); 1161 1162 #endif 1162 1163 … … 1998 1999 break; 1999 2000 } 2001 case IOCTL_VIDEO_HGSMI_QUERY_PORTPROCS: 2002 { 2003 dprintf(("VBoxVideo::VBoxVideoStartIO: IOCTL_VIDEO_HGSMI_QUERY_PORTPROCS\n")); 2004 2005 if (RequestPacket->OutputBufferLength < sizeof(HGSMIQUERYCPORTPROCS)) 2006 { 2007 dprintf(("VBoxVideo::VBoxVideoStartIO: Output buffer too small: %d needed: %d!!!\n", 2008 RequestPacket->OutputBufferLength, sizeof(HGSMIQUERYCPORTPROCS))); 2009 RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER; 2010 return FALSE; 2011 } 2012 2013 if (!pDevExt->pPrimary->u.primary.bHGSMI) 2014 { 2015 RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION; 2016 return FALSE; 2017 } 2018 2019 HGSMIQUERYCPORTPROCS *pInfo = (HGSMIQUERYCPORTPROCS *)RequestPacket->OutputBuffer; 2020 pInfo->pContext = pDevExt->pPrimary; 2021 pInfo->VideoPortProcs = pDevExt->pPrimary->u.primary.VideoPortProcs; 2022 2023 RequestPacket->StatusBlock->Information = sizeof(HGSMIQUERYCPORTPROCS); 2024 Result = TRUE; 2025 break; 2026 } 2000 2027 case IOCTL_VIDEO_HGSMI_HANDLER_ENABLE: 2001 2028 { -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h
r22446 r22448 40 40 RT_C_DECLS_END 41 41 42 43 42 #define VBE_DISPI_IOPORT_INDEX 0x01CE 44 43 #define VBE_DISPI_IOPORT_DATA 0x01CF … … 151 150 /* The IO Port Number for guest commands. */ 152 151 RTIOPORT IOPortGuest; 152 153 /* Video Port API dynamically picked up at runtime for binary backwards compatibility with older NT versions */ 154 VBOXVIDEOPORTPROCS VideoPortProcs; 153 155 #endif /* VBOX_WITH_HGSMI */ 154 156 } primary; … … 296 298 { 297 299 UCHAR oldIrql; 298 VideoPortAcquireSpinLock(PrimaryExtension,300 PrimaryExtension->u.primary.VideoPortProcs.pfnAcquireSpinLock(PrimaryExtension, 299 301 PrimaryExtension->u.primary.pGHRWLock, 300 302 &oldIrql); 301 303 VBoxVideoVBEWriteUlongLocked(dataType, data); 302 VideoPortReleaseSpinLock(PrimaryExtension,304 PrimaryExtension->u.primary.VideoPortProcs.pfnReleaseSpinLock(PrimaryExtension, 303 305 PrimaryExtension->u.primary.pGHRWLock, 304 306 oldIrql); … … 308 310 { 309 311 UCHAR oldIrql; 310 VideoPortAcquireSpinLock(PrimaryExtension,312 PrimaryExtension->u.primary.VideoPortProcs.pfnAcquireSpinLock(PrimaryExtension, 311 313 PrimaryExtension->u.primary.pGHRWLock, 312 314 &oldIrql); 313 315 VBoxVideoVBEWriteUshortLocked(dataType, data); 314 VideoPortReleaseSpinLock(PrimaryExtension,316 PrimaryExtension->u.primary.VideoPortProcs.pfnReleaseSpinLock(PrimaryExtension, 315 317 PrimaryExtension->u.primary.pGHRWLock, 316 318 oldIrql); … … 321 323 ULONG data; 322 324 UCHAR oldIrql; 323 VideoPortAcquireSpinLock(PrimaryExtension,325 PrimaryExtension->u.primary.VideoPortProcs.pfnAcquireSpinLock(PrimaryExtension, 324 326 PrimaryExtension->u.primary.pGHRWLock, 325 327 &oldIrql); 326 328 data = VBoxVideoVBEReadUlongLocked(dataType); 327 VideoPortReleaseSpinLock(PrimaryExtension,329 PrimaryExtension->u.primary.VideoPortProcs.pfnReleaseSpinLock(PrimaryExtension, 328 330 PrimaryExtension->u.primary.pGHRWLock, 329 331 oldIrql); … … 355 357 356 358 BOOLEAN VBoxHGSMIIsSupported (PDEVICE_EXTENSION PrimaryExtension); 359 360 void VBoxSetupVideoPortFunctions(PDEVICE_EXTENSION PrimaryExtension, 361 VBOXVIDEOPORTPROCS *pCallbacks, 362 PVIDEO_PORT_CONFIG_INFO pConfigInfo); 357 363 358 364 VOID VBoxSetupDisplaysHGSMI (PDEVICE_EXTENSION PrimaryExtension, -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/vboxioctl.h
r22136 r22448 60 60 #define IOCTL_VIDEO_HGSMI_HANDLER_DISABLE \ 61 61 CTL_CODE(FILE_DEVICE_VIDEO, 0x433, METHOD_BUFFERED, FILE_ANY_ACCESS) 62 63 #define IOCTL_VIDEO_HGSMI_QUERY_PORTPROCS \ 64 CTL_CODE(FILE_DEVICE_VIDEO, 0x434, METHOD_BUFFERED, FILE_ANY_ACCESS) 62 65 63 66 #endif /* VBOX_WITH_HGSMI */ … … 136 139 137 140 /** 141 * Data returned by IOCTL_VIDEO_HGSMI_QUERY_PORTPROCS 142 */ 143 typedef struct _HGSMIQUERYCPORTPROCS 144 { 145 PVOID pContext; 146 VBOXVIDEOPORTPROCS VideoPortProcs; 147 } HGSMIQUERYCPORTPROCS; 148 149 /** 138 150 * Data returned by IOCTL_VIDEO_HGSMI_HANDLER_ENABLE. 139 151 *
Note:
See TracChangeset
for help on using the changeset viewer.