VirtualBox

Ignore:
Timestamp:
Oct 23, 2009 6:54:16 PM (15 years ago)
Author:
vboxsync
Message:

2d accel: perform data reset VGA device reset

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp

    r24044 r24053  
    346346}
    347347
    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 
     348static bool hgsmiProcessHostCmdCompletion (HGSMIINSTANCE *pIns,
     349                     HGSMIOFFSET offBuffer,
     350                     bool bCompleteFirst)
     351{
    358352    VM_ASSERT_EMT(pIns->pVM);
    359353
     
    369363            Assert(pEntry->fl == (HGSMI_F_HOST_FIFO_ALLOCATED | HGSMI_F_HOST_FIFO_READ));
    370364
    371             if (pEntry->offBuffer == offBuffer)
     365            if (bCompleteFirst || pEntry->offBuffer == offBuffer)
    372366            {
    373367                break;
     
    386380        LogFlowFunc(("read list entry: %p.\n", pEntry));
    387381
    388         Assert(pEntry);
     382        Assert(pEntry || bCompleteFirst);
    389383
    390384        if (pEntry)
     
    409403            hgsmiHostCommandFreeCallback(pEntry);
    410404#endif
    411         }
    412         else
    413         {
    414             hgsmiFIFOUnlock(pIns);
     405            return true;
     406        }
     407
     408        hgsmiFIFOUnlock(pIns);
     409        if(!bCompleteFirst)
    415410            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 */
     419void HGSMIHostWrite (HGSMIINSTANCE *pIns,
     420                     HGSMIOFFSET offBuffer)
     421{
     422    LogFlowFunc(("pIns %p offBuffer 0x%x\n", pIns, offBuffer));
     423
     424    hgsmiProcessHostCmdCompletion (pIns, offBuffer, false);
    418425}
    419426
     
    15311538}
    15321539
     1540void HGSMIReset (PHGSMIINSTANCE pIns)
     1541{
     1542    while(hgsmiProcessHostCmdCompletion (pIns, 0, true)) {}
     1543
     1544    HGSMIHeapSetupUnitialized (&pIns->hostHeap);
     1545}
     1546
    15331547void HGSMIDestroy (PHGSMIINSTANCE pIns)
    15341548{
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette