VirtualBox

Ignore:
Timestamp:
Aug 10, 2009 2:05:23 PM (15 years ago)
Author:
vboxsync
Message:

video hw accel: fix cmd loss

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Display
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/dd.c

    r22099 r22136  
    15851585        ASMAtomicIncU32(&pCurrDesc->cPendingFlipsCurr);
    15861586        ASMAtomicIncU32(&pTargDesc->cPendingFlipsTarg);
     1587#ifdef DEBUG
     1588        ASMAtomicIncU32(&pCurrDesc->cFlipsCurr);
     1589        ASMAtomicIncU32(&pTargDesc->cFlipsTarg);
     1590#endif
    15871591
    15881592        if(pTargDesc->UpdatedMemRegion.bValid)
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/driver.h

    r22028 r22136  
    108108    volatile uint32_t cPendingFlipsCurr;
    109109    volatile uint32_t cPendingFlipsTarg;
     110#ifdef DEBUG
     111    volatile uint64_t cFlipsCurr;
     112    volatile uint64_t cFlipsTarg;
     113#endif
    110114//    uint32_t cBitsPerPixel;
    111115    bool bHidden;
     
    200204
    201205    HVBOXVIDEOHGSMI hMpHGSMI; /* context handler passed to miniport HGSMI callbacks */
     206    PFNVBOXVIDEOHGSMIPOSTCOMMAND pfnHGSMIGHCommandPost; /* called to post the guest command (offset) to the host */
    202207    PFNVBOXVIDEOHGSMICOMPLETION pfnHGSMICommandComplete; /* called to complete the command we receive from the miniport */
    203208    PFNVBOXVIDEOHGSMICOMMANDS   pfnHGSMIRequestCommands; /* called to requests the commands posted to us from the host */
     
    225230
    226231#ifdef VBOX_WITH_HGSMI
    227 #define VBE_DISPI_IOPORT_INDEX          0x01CE
    228 #define VBE_DISPI_IOPORT_DATA           0x01CF
    229 #define VBE_DISPI_INDEX_VBVA_GUEST      0xc
     232//#define VBE_DISPI_IOPORT_INDEX          0x01CE
     233//#define VBE_DISPI_IOPORT_DATA           0x01CF
     234//#define VBE_DISPI_INDEX_VBVA_GUEST      0xc
    230235#endif /* VBOX_WITH_HGSMI */
    231236
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/screen.c

    r20961 r22136  
    123123
    124124            ppdev->hMpHGSMI = Callbacks.hContext;
     125            ppdev->pfnHGSMIGHCommandPost = Callbacks.pfnHGSMIGHCommandPost;
    125126            ppdev->pfnHGSMICommandComplete = Callbacks.pfnCompletionHandler;
    126127            ppdev->pfnHGSMIRequestCommands = Callbacks.pfnRequestCommandsHandler;
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/vbox.c

    r21939 r22136  
    345345    HGSMIOFFSET offBuffer = HGSMIHeapBufferOffset (&ppdev->hgsmiDisplayHeap, p);
    346346
    347     ASMOutU16 (VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_VBVA_GUEST);
    348     ASMOutU32 (VBE_DISPI_IOPORT_DATA, offBuffer);
     347    ppdev->pfnHGSMIGHCommandPost(ppdev->hMpHGSMI, offBuffer);
     348//    ASMOutU16 (VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_VBVA_GUEST);
     349//    ASMOutU32 (VBE_DISPI_IOPORT_DATA, offBuffer);
    349350}
    350351
     
    757758        default:
    758759        {
     760                Assert(0);
    759761            vboxVBVAHostCommandComplete(ppdev, pCmd);
    760762        }
     
    764766void vboxVHWACommandCheckHostCmds(PPDEV ppdev)
    765767{
    766     VBVAHOSTCMD * pCmd;
     768    VBVAHOSTCMD * pCmd, * pNextCmd;
    767769    int rc = ppdev->pfnHGSMIRequestCommands(ppdev->hMpHGSMI, HGSMI_CH_VBVA, &pCmd);
     770    Assert(RT_SUCCESS(rc));
    768771    if(RT_SUCCESS(rc))
    769772    {
    770         for(; pCmd; pCmd = pCmd->u.pNext)
    771         {
     773        for(;pCmd; pCmd = pNextCmd)
     774        {
     775                pNextCmd = pCmd->u.pNext;
    772776            vboxVBVAHostCommandHanlder(ppdev, pCmd);
    773777        }
     
    784788    pCmd->Flags |= VBOXVHWACMD_FLAG_GH_ASYNCH_EVENT;
    785789    vboxHGSMIBufferSubmit (ppdev, pCmd);
    786 
     790    //TODO: dbg
     791#if 0
    787792    if(!(ASMAtomicReadU32((volatile uint32_t *)&pCmd->Flags)  & VBOXVHWACMD_FLAG_HG_ASYNCH))
    788793    {
     
    790795        EngSetEvent(pEvent);
    791796    }
     797#endif
    792798}
    793799
     
    823829
    824830    vboxHGSMIBufferSubmit (ppdev, pCmd);
    825 
     831    //TODO: dbg
     832#if 0
    826833    if(!(pCmd->Flags & VBOXVHWACMD_FLAG_HG_ASYNCH))
    827834    {
     
    829836        pfnCompletion(ppdev, pCmd, pContext);
    830837    }
     838#endif
    831839}
    832840
     
    844852
    845853    vboxHGSMIBufferSubmit (ppdev, pCmd);
    846 
     854    //TODO: dbg
     855#if 0
    847856    if(!(pCmd->Flags & VBOXVHWACMD_FLAG_HG_ASYNCH)
    848857            || pCmd->Flags & VBOXVHWACMD_FLAG_HG_ASYNCH_RETURNED)
     
    851860        vboxVHWAFreeCmdCompletion(ppdev, pCmd, NULL);
    852861    }
     862#endif
    853863}
    854864
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