Changeset 33165 in vbox
- Timestamp:
- Oct 15, 2010 4:04:33 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/VBoxVideo.cpp
r33048 r33165 1700 1700 * with old guest additions. 1701 1701 */ 1702 VBoxSetupDisplaysHGSMI((PDEVICE_EXTENSION)HwDeviceExtension, ConfigInfo, AdapterMemorySize );1702 VBoxSetupDisplaysHGSMI((PDEVICE_EXTENSION)HwDeviceExtension, ConfigInfo, AdapterMemorySize, 0); 1703 1703 1704 1704 if (commonFromDeviceExt((PDEVICE_EXTENSION)HwDeviceExtension)->bHGSMI) -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h
r33085 r33165 220 220 */ 221 221 222 /** Host HGSMI capabilities the guest can handle */ 223 uint32_t fCaps; 224 222 225 BOOLEAN bHGSMI; /* Whether HGSMI is enabled. */ 223 226 … … 232 235 233 236 /* The IO Port Number for guest commands. */ 234 RTIOPORT IOPortGuest; 237 RTIOPORT IOPortGuest; 235 238 } VBOXVIDEO_COMMON, *PVBOXVIDEO_COMMON; 236 239 … … 886 889 PVIDEO_PORT_CONFIG_INFO pConfigInfo, 887 890 #endif 888 ULONG AdapterMemorySize );891 ULONG AdapterMemorySize, uint32_t fCaps); 889 892 BOOLEAN vboxUpdatePointerShape (PDEVICE_EXTENSION DeviceExtension, 890 893 PVIDEO_POINTER_ATTRIBUTES pointerAttr, -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideoHGSMI.cpp
r33085 r33165 316 316 } 317 317 318 static int vboxQueryConfHGSMI (P DEVICE_EXTENSION PrimaryExtension, uint32_t u32Index, ULONG *pulValue)318 static int vboxQueryConfHGSMI (PVBOXVIDEO_COMMON pCommon, uint32_t u32Index, ULONG *pulValue) 319 319 { 320 320 dprintf(("VBoxVideo::vboxQueryConf: u32Index = %d\n", u32Index)); … … 325 325 context.pulValue = pulValue; 326 326 327 int rc = vboxCallVBVA ( commonFromDeviceExt(PrimaryExtension),327 int rc = vboxCallVBVA (pCommon, 328 328 VBVA_QUERY_CONF32, 329 329 sizeof (VBVACONF32), … … 389 389 return VERR_INTERNAL_ERROR; 390 390 } 391 #e lse392 int vbvaInitInfoCaps (PVBOXVIDEO_COMMON , void *pvContext, void *pvData)391 #endif 392 int vbvaInitInfoCaps (PVBOXVIDEO_COMMON pCommon, void *pvContext, void *pvData) 393 393 { 394 394 VBVACAPS *pCaps = (VBVACAPS*)pvData; 395 395 pCaps->rc = VERR_NOT_IMPLEMENTED; 396 pCaps->fCaps = VBVACAPS_COMPLETEGCMD_BY_IOREAD | VBVACAPS_IRQ;396 pCaps->fCaps = pCommon->fCaps; 397 397 return VINF_SUCCESS; 398 398 } … … 405 405 return pCaps->rc; 406 406 } 407 #endif408 407 409 408 static int vbvaInitInfoHeap (PVBOXVIDEO_COMMON pCommon, void *pvContext, void *pvData) … … 445 444 NULL); 446 445 AssertRC(rc); 447 if(RT_SUCCESS (rc))448 {449 446 #ifndef VBOX_WITH_WDDM 447 if (RT_SUCCESS(rc)) 448 { 450 449 rc = VBoxHGSMISendViewInfo (commonFromDeviceExt(PrimaryExtension), 451 450 PrimaryExtension->u.primary.cDisplays, … … 453 452 (void *) PrimaryExtension); 454 453 AssertRC(rc); 455 if (RT_SUCCESS (rc)) 456 #else 457 /* in case of WDDM we do not control the framebuffer location, 458 * i.e. it is assigned by Video Memory Manager, 459 * The FB information should be passed to guest from our DxgkDdiSetVidPnSourceAddress callback */ 460 454 } 455 /* in case of WDDM we do not control the framebuffer location, 456 * i.e. it is assigned by Video Memory Manager, 457 * The FB information should be passed to guest from our 458 * DxgkDdiSetVidPnSourceAddress callback */ 459 #endif 460 if (RT_SUCCESS(rc) && commonFromDeviceExt(PrimaryExtension)->fCaps) 461 { 461 462 /* Inform about caps */ 462 463 rc = vboxCallVBVA (commonFromDeviceExt(PrimaryExtension), … … 467 468 NULL); 468 469 AssertRC(rc); 469 if (RT_SUCCESS (rc)) 470 #endif 471 { 472 /* Report the host heap location. */ 473 rc = vboxCallVBVA (commonFromDeviceExt(PrimaryExtension), 474 VBVA_INFO_HEAP, 475 sizeof (VBVAINFOHEAP), 476 vbvaInitInfoHeap, 477 NULL, 478 NULL); 479 AssertRC(rc); 480 } 470 } 471 if (RT_SUCCESS (rc)) 472 { 473 /* Report the host heap location. */ 474 rc = vboxCallVBVA (commonFromDeviceExt(PrimaryExtension), 475 VBVA_INFO_HEAP, 476 sizeof (VBVAINFOHEAP), 477 vbvaInitInfoHeap, 478 NULL, 479 NULL); 480 AssertRC(rc); 481 481 } 482 482 … … 721 721 PVIDEO_PORT_CONFIG_INFO pConfigInfo, 722 722 #endif 723 ULONG AdapterMemorySize )723 ULONG AdapterMemorySize, uint32_t fCaps) 724 724 { 725 725 VP_STATUS rc = NO_ERROR; … … 750 750 commonFromDeviceExt(PrimaryExtension)->pHostFlags = NULL; 751 751 PrimaryExtension->u.primary.ulMaxFrameBufferSize = 0; 752 commonFromDeviceExt(PrimaryExtension)->bHGSMI = VBoxHGSMIIsSupported (); 752 commonFromDeviceExt(PrimaryExtension)->fCaps = fCaps; 753 commonFromDeviceExt(PrimaryExtension)->bHGSMI = VBoxHGSMIIsSupported (); 753 754 VBoxVideoCmnMemZero(&commonFromDeviceExt(PrimaryExtension)->areaHostHeap, sizeof(HGSMIAREA)); 754 755 VBoxVideoCmnMemZero(&PrimaryExtension->areaDisplay, sizeof(HGSMIAREA)); … … 803 804 /* The miniport heap is used for the host buffers. */ 804 805 ULONG cbMiniportHeap = 0; 805 vboxQueryConfHGSMI ( PrimaryExtension, VBOX_VBVA_CONF32_HOST_HEAP_SIZE, &cbMiniportHeap);806 vboxQueryConfHGSMI (commonFromDeviceExt(PrimaryExtension), VBOX_VBVA_CONF32_HOST_HEAP_SIZE, &cbMiniportHeap); 806 807 807 808 if (cbMiniportHeap != 0) … … 887 888 /* Query the configured number of displays. */ 888 889 ULONG cDisplays = 0; 889 vboxQueryConfHGSMI ( PrimaryExtension, VBOX_VBVA_CONF32_MONITOR_COUNT, &cDisplays);890 vboxQueryConfHGSMI (commonFromDeviceExt(PrimaryExtension), VBOX_VBVA_CONF32_MONITOR_COUNT, &cDisplays); 890 891 891 892 dprintf(("VBoxVideo::VBoxSetupDisplays: cDisplays = %d\n", … … 1247 1248 } 1248 1249 1250 #ifndef VBOX_WITH_WDDM 1249 1251 typedef struct _VBVAMINIPORT_CHANNELCONTEXT 1250 1252 { … … 1352 1354 } 1353 1355 1354 #ifndef VBOX_WITH_WDDM1355 1356 DECLCALLBACK(void) hgsmiHostCmdComplete (HVBOXVIDEOHGSMI hHGSMI, struct _VBVAHOSTCMD * pCmd) 1356 1357 { … … 1401 1402 return VERR_INVALID_PARAMETER; 1402 1403 } 1403 #endif1404 1404 1405 1405 static DECLCALLBACK(int) vboxVBVAChannelGenericHandler(void *pvHandler, uint16_t u16ChannelInfo, void *pvBuffer, HGSMISIZE cbBuffer) … … 1610 1610 return VERR_GENERAL_FAILURE; 1611 1611 } 1612 #endif /* !VBOX_WITH_WDDM */ 1612 1613 1613 1614 /** @todo Mouse pointer position to be read from VMMDev memory, address of the memory region -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp
r33146 r33165 579 579 * with old guest additions. 580 580 */ 581 VBoxSetupDisplaysHGSMI(pContext, AdapterMemorySize); 581 VBoxSetupDisplaysHGSMI(pContext, AdapterMemorySize, 582 VBVACAPS_COMPLETEGCMD_BY_IOREAD | VBVACAPS_IRQ); 582 583 if (commonFromDeviceExt(pContext)->bHGSMI) 583 584 {
Note:
See TracChangeset
for help on using the changeset viewer.