Changeset 32989 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm
- Timestamp:
- Oct 7, 2010 3:47:31 PM (14 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVbva.cpp
r31763 r32989 22 22 { 23 23 int rc = VERR_NO_MEMORY; 24 void *p = vboxHGSMIBufferAlloc ( pDevExt,24 void *p = vboxHGSMIBufferAlloc (commonFromDeviceExt(pDevExt), 25 25 sizeof (VBVAENABLE_EX), 26 26 HGSMI_CH_VBVA, … … 43 43 pEnable->i32Result = VERR_NOT_SUPPORTED; 44 44 45 vboxHGSMIBufferSubmit ( pDevExt, p);45 vboxHGSMIBufferSubmit (commonFromDeviceExt(pDevExt), p); 46 46 47 47 if (bEnable) … … 53 53 rc = VINF_SUCCESS; 54 54 55 vboxHGSMIBufferFree ( pDevExt, p);55 vboxHGSMIBufferFree (commonFromDeviceExt(pDevExt), p); 56 56 } 57 57 return rc; … … 151 151 { 152 152 /* Issue the flush command. */ 153 void *p = vboxHGSMIBufferAlloc ( pDevExt,153 void *p = vboxHGSMIBufferAlloc (commonFromDeviceExt(pDevExt), 154 154 sizeof (VBVAFLUSH), 155 155 HGSMI_CH_VBVA, … … 166 166 pFlush->u32Reserved = 0; 167 167 168 vboxHGSMIBufferSubmit ( pDevExt, p);169 170 vboxHGSMIBufferFree ( pDevExt, p);168 vboxHGSMIBufferSubmit (commonFromDeviceExt(pDevExt), p); 169 170 vboxHGSMIBufferFree (commonFromDeviceExt(pDevExt), p); 171 171 } 172 172 -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVdma.cpp
r32889 r32989 1002 1002 static int vboxWddmVdmaSubmitHgsmi(struct _DEVICE_EXTENSION* pDevExt, PVBOXVDMAINFO pInfo, HGSMIOFFSET offDr) 1003 1003 { 1004 VBoxHGSMIGuestWrite( hgsmiFromDeviceExt(pDevExt), offDr);1004 VBoxHGSMIGuestWrite(commonFromDeviceExt(pDevExt), offDr); 1005 1005 return VINF_SUCCESS; 1006 1006 } … … 1012 1012 int rc = VINF_SUCCESS; 1013 1013 1014 PVBOXVDMA_CTL pCmd = (PVBOXVDMA_CTL)VBoxSHGSMICommandAlloc(& hgsmiFromDeviceExt(pDevExt)->hgsmiAdapterHeap, sizeof (VBOXVDMA_CTL), HGSMI_CH_VBVA, VBVA_VDMA_CTL);1014 PVBOXVDMA_CTL pCmd = (PVBOXVDMA_CTL)VBoxSHGSMICommandAlloc(&commonFromDeviceExt(pDevExt)->hgsmiAdapterHeap, sizeof (VBOXVDMA_CTL), HGSMI_CH_VBVA, VBVA_VDMA_CTL); 1015 1015 if (pCmd) 1016 1016 { … … 1019 1019 pCmd->i32Result = VERR_NOT_SUPPORTED; 1020 1020 1021 const VBOXSHGSMIHEADER* pHdr = VBoxSHGSMICommandPrepSynch(& hgsmiFromDeviceExt(pDevExt)->hgsmiAdapterHeap, pCmd);1021 const VBOXSHGSMIHEADER* pHdr = VBoxSHGSMICommandPrepSynch(&commonFromDeviceExt(pDevExt)->hgsmiAdapterHeap, pCmd); 1022 1022 Assert(pHdr); 1023 1023 if (pHdr) … … 1025 1025 do 1026 1026 { 1027 HGSMIOFFSET offCmd = VBoxSHGSMICommandOffset(& hgsmiFromDeviceExt(pDevExt)->hgsmiAdapterHeap, pHdr);1027 HGSMIOFFSET offCmd = VBoxSHGSMICommandOffset(&commonFromDeviceExt(pDevExt)->hgsmiAdapterHeap, pHdr); 1028 1028 Assert(offCmd != HGSMIOFFSET_VOID); 1029 1029 if (offCmd != HGSMIOFFSET_VOID) … … 1033 1033 if (RT_SUCCESS(rc)) 1034 1034 { 1035 rc = VBoxSHGSMICommandDoneSynch(& hgsmiFromDeviceExt(pDevExt)->hgsmiAdapterHeap, pHdr);1035 rc = VBoxSHGSMICommandDoneSynch(&commonFromDeviceExt(pDevExt)->hgsmiAdapterHeap, pHdr); 1036 1036 AssertRC(rc); 1037 1037 if (RT_SUCCESS(rc)) … … 1046 1046 rc = VERR_INVALID_PARAMETER; 1047 1047 /* fail to submit, cancel it */ 1048 VBoxSHGSMICommandCancelSynch(& hgsmiFromDeviceExt(pDevExt)->hgsmiAdapterHeap, pHdr);1048 VBoxSHGSMICommandCancelSynch(&commonFromDeviceExt(pDevExt)->hgsmiAdapterHeap, pHdr); 1049 1049 } while (0); 1050 1050 } 1051 1051 1052 VBoxSHGSMICommandFree (& hgsmiFromDeviceExt(pDevExt)->hgsmiAdapterHeap, pCmd);1052 VBoxSHGSMICommandFree (&commonFromDeviceExt(pDevExt)->hgsmiAdapterHeap, pCmd); 1053 1053 } 1054 1054 else -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVhwa.cpp
r32823 r32989 45 45 if(!cRefs) 46 46 { 47 vboxHGSMIBufferFree( pDevExt, pCmd);47 vboxHGSMIBufferFree(commonFromDeviceExt(pDevExt), pCmd); 48 48 } 49 49 } … … 61 61 vbvaVhwaCommandRetain(pDevExt, pCmd); 62 62 63 vboxHGSMIBufferSubmit( pDevExt, pCmd);63 vboxHGSMIBufferSubmit(commonFromDeviceExt(pDevExt), pCmd); 64 64 65 65 if(!(pCmd->Flags & VBOXVHWACMD_FLAG_HG_ASYNCH) … … 100 100 VBVA_VHWA_CMD); 101 101 #else 102 VBOXVHWACMD* pHdr = (VBOXVHWACMD*)vboxHGSMIBufferAlloc( pDevExt,102 VBOXVHWACMD* pHdr = (VBOXVHWACMD*)vboxHGSMIBufferAlloc(commonFromDeviceExt(pDevExt), 103 103 cbCmd + VBOXVHWACMD_HEADSIZE(), 104 104 HGSMI_CH_VBVA, -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp
r32930 r32989 107 107 NTSTATUS vboxWddmGhDisplayPostInfoScreenBySDesc (PDEVICE_EXTENSION pDevExt, PVBOXWDDM_SURFACE_DESC pDesc, POINT * pVScreenPos, uint16_t fFlags) 108 108 { 109 void *p = vboxHGSMIBufferAlloc ( pDevExt,109 void *p = vboxHGSMIBufferAlloc (commonFromDeviceExt(pDevExt), 110 110 sizeof (VBVAINFOSCREEN), 111 111 HGSMI_CH_VBVA, … … 126 126 pScreen->u16Flags = fFlags; 127 127 128 vboxHGSMIBufferSubmit ( pDevExt, p);129 130 vboxHGSMIBufferFree ( pDevExt, p);128 vboxHGSMIBufferSubmit (commonFromDeviceExt(pDevExt), p); 129 130 vboxHGSMIBufferFree (commonFromDeviceExt(pDevExt), p); 131 131 } 132 132 … … 150 150 151 151 /* Issue the screen info command. */ 152 void *p = vboxHGSMIBufferAlloc ( pDevExt,152 void *p = vboxHGSMIBufferAlloc (commonFromDeviceExt(pDevExt), 153 153 sizeof (VBVAINFOVIEW), 154 154 HGSMI_CH_VBVA, … … 165 165 pView->u32MaxScreenSize = pView->u32ViewSize; 166 166 167 vboxHGSMIBufferSubmit ( pDevExt, p);168 169 vboxHGSMIBufferFree ( pDevExt, p);167 vboxHGSMIBufferSubmit (commonFromDeviceExt(pDevExt), p); 168 169 vboxHGSMIBufferFree (commonFromDeviceExt(pDevExt), p); 170 170 } 171 171 … … 268 268 return &pDevExt->u.primary.Vdma.CmdHeap; 269 269 #endif 270 if (HGSMIAreaContainsOffset(& hgsmiFromDeviceExt(pDevExt)->hgsmiAdapterHeap.area, offCmd))271 return & hgsmiFromDeviceExt(pDevExt)->hgsmiAdapterHeap;270 if (HGSMIAreaContainsOffset(&commonFromDeviceExt(pDevExt)->hgsmiAdapterHeap.area, offCmd)) 271 return &commonFromDeviceExt(pDevExt)->hgsmiAdapterHeap; 272 272 return NULL; 273 273 } … … 288 288 return VBOXWDDM_HGSMICMD_TYPE_DMACMD; 289 289 #endif 290 if (HGSMIAreaContainsOffset(& hgsmiFromDeviceExt(pDevExt)->hgsmiAdapterHeap.area, offCmd))290 if (HGSMIAreaContainsOffset(&commonFromDeviceExt(pDevExt)->hgsmiAdapterHeap.area, offCmd)) 291 291 return VBOXWDDM_HGSMICMD_TYPE_CTL; 292 292 return VBOXWDDM_HGSMICMD_TYPE_UNDEFINED; … … 421 421 if (VBoxHGSMIIsSupported (pContext)) 422 422 { 423 hgsmiFromDeviceExt(pContext)->IOPortHost = (RTIOPORT)VGA_PORT_HGSMI_HOST;424 hgsmiFromDeviceExt(pContext)->IOPortGuest = (RTIOPORT)VGA_PORT_HGSMI_GUEST;423 commonFromDeviceExt(pContext)->IOPortHost = (RTIOPORT)VGA_PORT_HGSMI_HOST; 424 commonFromDeviceExt(pContext)->IOPortGuest = (RTIOPORT)VGA_PORT_HGSMI_GUEST; 425 425 426 426 PCM_RESOURCE_LIST pRcList = pDeviceInfo->TranslatedResourceList; … … 580 580 */ 581 581 VBoxSetupDisplaysHGSMI(pContext, AdapterMemorySize); 582 if ( hgsmiFromDeviceExt(pContext)->bHGSMI)582 if (commonFromDeviceExt(pContext)->bHGSMI) 583 583 { 584 584 drprintf(("VBoxVideoWddm: using HGSMI\n")); … … 794 794 { 795 795 /* read the command offset */ 796 HGSMIOFFSET offCmd = VBoxHGSMIGuestRead( hgsmiFromDeviceExt(pDevExt));796 HGSMIOFFSET offCmd = VBoxHGSMIGuestRead(commonFromDeviceExt(pDevExt)); 797 797 Assert(offCmd != HGSMIOFFSET_VOID); 798 798 if (offCmd != HGSMIOFFSET_VOID) … … 811 811 case VBOXWDDM_HGSMICMD_TYPE_CTL: 812 812 pList = &CtlList; 813 pHeap = & hgsmiFromDeviceExt(pDevExt)->hgsmiAdapterHeap;813 pHeap = &commonFromDeviceExt(pDevExt)->hgsmiAdapterHeap; 814 814 break; 815 815 default: … … 888 888 if (bOur) 889 889 { 890 HGSMIClearIrq ( hgsmiFromDeviceExt(pDevExt));890 HGSMIClearIrq (commonFromDeviceExt(pDevExt)); 891 891 #ifdef DEBUG_misha 892 892 /* this is not entirely correct since host may concurrently complete some commands and raise a new IRQ while we are here, … … 974 974 if (!vboxSHGSMIListIsEmpty(&context.data.CtlList)) 975 975 { 976 int rc = VBoxSHGSMICommandPostprocessCompletion (& hgsmiFromDeviceExt(pDevExt)->hgsmiAdapterHeap, &context.data.CtlList);976 int rc = VBoxSHGSMICommandPostprocessCompletion (&commonFromDeviceExt(pDevExt)->hgsmiAdapterHeap, &context.data.CtlList); 977 977 AssertRC(rc); 978 978 }
Note:
See TracChangeset
for help on using the changeset viewer.