vbox的更動 32241 路徑 trunk/src/VBox/Devices/Graphics/HGSMI
- 時間撮記:
- 2010-9-6 上午04:52:56 (14 年 以前)
- 位置:
- trunk/src/VBox/Devices/Graphics/HGSMI
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp
r28800 r32241 148 148 HGSMILIST hostFIFOProcessed; /* Processed by the guest. */ 149 149 HGSMILIST hostFIFOFree; /* Buffers for reuse. */ 150 #ifdef VBOX VDMA150 #ifdef VBOXWDDM 151 151 HGSMILIST guestCmdCompleted; /* list of completed guest commands to be returned to the guest*/ 152 152 #endif … … 210 210 static DECLCALLBACK(void) hgsmiHostCommandFreeCallback (void *pvCallback); 211 211 212 #ifdef VBOX VDMA212 #ifdef VBOXWDDM 213 213 214 214 typedef struct _HGSMIGUESTCOMPLENTRY … … 369 369 } 370 370 371 #ifdef VBOXWDDM 372 static HGSMIOFFSET hgsmiProcessGuestCmdCompletion(HGSMIINSTANCE *pIns) 373 { 374 HGSMIOFFSET offCmd = HGSMIOFFSET_VOID; 375 int rc = hgsmiFIFOLock(pIns); 376 AssertRC(rc); 377 if(RT_SUCCESS(rc)) 378 { 379 /* Get the host FIFO head entry. */ 380 HGSMILISTENTRY *pHead = pIns->guestCmdCompleted.pHead; 381 if(pHead) 382 hgsmiListRemove (&pIns->guestCmdCompleted, pHead, NULL); 383 384 if(!pIns->guestCmdCompleted.pHead) 385 pIns->pHGFlags->u32HostFlags &= (~HGSMIHOSTFLAGS_GCOMMAND_COMPLETED); 386 387 hgsmiFIFOUnlock(pIns); 388 389 if (pHead) 390 { 391 HGSMIGUESTCOMPLENTRY *pEntry = HGSMILISTENTRY_2_HGSMIGUESTCOMPLENTRY(pHead); 392 offCmd = pEntry->offBuffer; 393 394 LogFlowFunc(("host FIFO head %p.\n", pEntry)); 395 396 hgsmiGuestCompletionFIFOFree (pIns, pEntry); 397 } 398 } 399 return offCmd; 400 } 401 #endif 402 403 371 404 /* Called from HGSMI_IO_GUEST read handler. */ 372 405 HGSMIOFFSET HGSMIGuestRead (PHGSMIINSTANCE pIns) … … 378 411 VM_ASSERT_EMT(pIns->pVM); 379 412 380 #ifndef VBOX VDMA413 #ifndef VBOXWDDM 381 414 /* Currently there is no functionality here. */ 382 415 NOREF(pIns); … … 386 419 /* use this to speedup guest cmd completion 387 420 * this mechanism is alternative to submitting H->G command for notification */ 388 HGSMIOFFSET offCmd = HGSMIOFFSET_VOID; 389 int rc = hgsmiFIFOLock(pIns); 390 AssertRC(rc); 391 if(RT_SUCCESS(rc)) 392 { 393 /* Get the host FIFO head entry. */ 394 HGSMILISTENTRY *pHead = pIns->guestCmdCompleted.pHead; 395 if(pHead) 396 hgsmiListRemove (&pIns->guestCmdCompleted, pHead, NULL); 397 398 if(!pIns->guestCmdCompleted.pHead) 399 pIns->pHGFlags->u32HostFlags &= (~HGSMIHOSTFLAGS_GCOMMAND_COMPLETED); 400 401 hgsmiFIFOUnlock(pIns); 402 403 if (pHead) 404 { 405 HGSMIGUESTCOMPLENTRY *pEntry = HGSMILISTENTRY_2_HGSMIGUESTCOMPLENTRY(pHead); 406 offCmd = pEntry->offBuffer; 407 408 LogFlowFunc(("host FIFO head %p.\n", pEntry)); 409 410 hgsmiGuestCompletionFIFOFree (pIns, pEntry); 411 } 412 } 413 /* Special value that means there is no host buffers to be processed. */ 421 HGSMIOFFSET offCmd = hgsmiProcessGuestCmdCompletion(pIns); 414 422 return offCmd; 415 423 #endif … … 1248 1256 rc = hgsmiHostSaveFifoLocked (&pIns->hostFIFORead, pSSM); AssertRC(rc); 1249 1257 rc = hgsmiHostSaveFifoLocked (&pIns->hostFIFOProcessed, pSSM); AssertRC(rc); 1258 #ifdef VBOXWDDM 1259 rc = hgsmiHostSaveFifoLocked (&pIns->guestCmdCompleted, pSSM); AssertRC(rc); 1260 #endif 1250 1261 1251 1262 hgsmiFIFOUnlock (pIns); … … 1311 1322 if (RT_SUCCESS(rc)) 1312 1323 rc = hgsmiHostLoadFifoLocked (pIns, &pIns->hostFIFOProcessed, pSSM); 1324 #ifdef VBOXWDDM 1325 if (RT_SUCCESS(rc) && u32Version > VGA_SAVEDSTATE_VERSION_PRE_WDDM) 1326 rc = hgsmiHostLoadFifoLocked (pIns, &pIns->hostFIFOProcessed, pSSM); 1327 #endif 1313 1328 1314 1329 hgsmiFIFOUnlock (pIns); … … 1632 1647 while(hgsmiProcessHostCmdCompletion (pIns, 0, true)) {} 1633 1648 1649 #ifdef VBOXWDDM 1650 while(hgsmiProcessGuestCmdCompletion(pIns) != HGSMIOFFSET_VOID) {} 1651 #endif 1652 1634 1653 HGSMIHeapSetupUnitialized (&pIns->hostHeap); 1635 1654 … … 1666 1685 } 1667 1686 1668 #ifdef VBOX VDMA1687 #ifdef VBOXWDDM 1669 1688 1670 1689 static int hgsmiGuestCommandComplete (HGSMIINSTANCE *pIns, HGSMIOFFSET offMem) -
trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.h
r28800 r32241 132 132 int HGSMIHostSaveStateExec (PHGSMIINSTANCE pIns, PSSMHANDLE pSSM); 133 133 134 #ifdef VBOX VDMA134 #ifdef VBOXWDDM 135 135 int HGSMICompleteGuestCommand(PHGSMIINSTANCE pIns, void *pvMem, bool bDoIrq); 136 136 #endif
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器