Changeset 24053 in vbox for trunk/src/VBox/Devices/Graphics/HGSMI
- Timestamp:
- Oct 23, 2009 6:54:16 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp
r24044 r24053 346 346 } 347 347 348 349 /* The the guest has finished processing of a buffer previously submitted by the host. 350 * Called from HGSMI_IO_HOST write handler. 351 * @thread EMT 352 */ 353 void HGSMIHostWrite (HGSMIINSTANCE *pIns, 354 HGSMIOFFSET offBuffer) 355 { 356 LogFlowFunc(("pIns %p offBuffer 0x%x\n", pIns, offBuffer)); 357 348 static bool hgsmiProcessHostCmdCompletion (HGSMIINSTANCE *pIns, 349 HGSMIOFFSET offBuffer, 350 bool bCompleteFirst) 351 { 358 352 VM_ASSERT_EMT(pIns->pVM); 359 353 … … 369 363 Assert(pEntry->fl == (HGSMI_F_HOST_FIFO_ALLOCATED | HGSMI_F_HOST_FIFO_READ)); 370 364 371 if ( pEntry->offBuffer == offBuffer)365 if (bCompleteFirst || pEntry->offBuffer == offBuffer) 372 366 { 373 367 break; … … 386 380 LogFlowFunc(("read list entry: %p.\n", pEntry)); 387 381 388 Assert(pEntry );382 Assert(pEntry || bCompleteFirst); 389 383 390 384 if (pEntry) … … 409 403 hgsmiHostCommandFreeCallback(pEntry); 410 404 #endif 411 } 412 else 413 { 414 hgsmiFIFOUnlock(pIns); 405 return true; 406 } 407 408 hgsmiFIFOUnlock(pIns); 409 if(!bCompleteFirst) 415 410 LogRel(("HGSMI[%s]: ignored invalid write to the host FIFO: 0x%08X!!!\n", pIns->pszName, offBuffer)); 416 } 417 } 411 } 412 return false; 413 } 414 415 /* The the guest has finished processing of a buffer previously submitted by the host. 416 * Called from HGSMI_IO_HOST write handler. 417 * @thread EMT 418 */ 419 void HGSMIHostWrite (HGSMIINSTANCE *pIns, 420 HGSMIOFFSET offBuffer) 421 { 422 LogFlowFunc(("pIns %p offBuffer 0x%x\n", pIns, offBuffer)); 423 424 hgsmiProcessHostCmdCompletion (pIns, offBuffer, false); 418 425 } 419 426 … … 1531 1538 } 1532 1539 1540 void HGSMIReset (PHGSMIINSTANCE pIns) 1541 { 1542 while(hgsmiProcessHostCmdCompletion (pIns, 0, true)) {} 1543 1544 HGSMIHeapSetupUnitialized (&pIns->hostHeap); 1545 } 1546 1533 1547 void HGSMIDestroy (PHGSMIINSTANCE pIns) 1534 1548 {
Note:
See TracChangeset
for help on using the changeset viewer.