VirtualBox

Changeset 51357 in vbox


Ignore:
Timestamp:
May 22, 2014 5:11:17 PM (11 years ago)
Author:
vboxsync
Message:

wddm/crOpenGL/DevVGA: CmdVbva disable fixes

Location:
trunk/src/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVbva.cpp

    r51266 r51357  
    278278    LogFlowFunc(("\n"));
    279279
     280    vboxVBVAExCtlSubmitEnableDisable(pCtx, pHGSMICtx, false);
     281
    280282    pCtx->fHwBufferOverflow = false;
    281283    pCtx->pRecord           = NULL;
    282284    pCtx->pVBVA             = NULL;
    283 
    284     vboxVBVAExCtlSubmitEnableDisable(pCtx, pHGSMICtx, false);
    285285
    286286    return;
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp

    r51328 r51357  
    968968        VBoxMPCmnUnmapAdapterMemory(VBoxCommonFromDeviceExt(pDevExt), (void**)&pDevExt->pvVisibleVram);
    969969
    970     for (int i = VBoxCommonFromDeviceExt(pDevExt)->cDisplays-1; i >= 0; --i)
    971     {
    972         rc = vboxVbvaDisable(pDevExt, &pDevExt->aSources[i].Vbva);
     970    if (pDevExt->fCmdVbvaEnabled)
     971    {
     972        rc = VBoxCmdVbvaDisable(pDevExt, &pDevExt->CmdVbva);
     973        if (RT_SUCCESS(rc))
     974        {
     975            rc = VBoxCmdVbvaDestroy(pDevExt, &pDevExt->CmdVbva);
     976            if (RT_FAILURE(rc))
     977                WARN(("VBoxCmdVbvaDestroy failed %d", rc));
     978        }
     979        else
     980            WARN(("VBoxCmdVbvaDestroy failed %d", rc));
     981
     982    }
     983    else
     984    {
     985        for (int i = VBoxCommonFromDeviceExt(pDevExt)->cDisplays-1; i >= 0; --i)
     986        {
     987            rc = vboxVbvaDisable(pDevExt, &pDevExt->aSources[i].Vbva);
     988            AssertRC(rc);
     989            if (RT_SUCCESS(rc))
     990            {
     991                rc = vboxVbvaDestroy(pDevExt, &pDevExt->aSources[i].Vbva);
     992                AssertRC(rc);
     993                if (RT_FAILURE(rc))
     994                {
     995                    /* @todo: */
     996                }
     997            }
     998        }
     999
     1000        vboxVideoAMgrDestroy(pDevExt, &pDevExt->AllocMgr);
     1001
     1002        rc = vboxVdmaDisable(pDevExt, &pDevExt->u.primary.Vdma);
    9731003        AssertRC(rc);
    9741004        if (RT_SUCCESS(rc))
    9751005        {
    976             rc = vboxVbvaDestroy(pDevExt, &pDevExt->aSources[i].Vbva);
     1006#ifdef VBOX_VDMA_WITH_WATCHDOG
     1007            vboxWddmWdTerm(pDevExt);
     1008#endif
     1009            rc = vboxVdmaDestroy(pDevExt, &pDevExt->u.primary.Vdma);
    9771010            AssertRC(rc);
    978             if (RT_FAILURE(rc))
    979             {
    980                 /* @todo: */
    981             }
    982         }
    983     }
    984 
    985     vboxVideoAMgrDestroy(pDevExt, &pDevExt->AllocMgr);
    986 
    987     rc = vboxVdmaDisable(pDevExt, &pDevExt->u.primary.Vdma);
    988     AssertRC(rc);
    989     if (RT_SUCCESS(rc))
    990     {
    991 #ifdef VBOX_VDMA_WITH_WATCHDOG
    992         vboxWddmWdTerm(pDevExt);
    993 #endif
    994         rc = vboxVdmaDestroy(pDevExt, &pDevExt->u.primary.Vdma);
    995         AssertRC(rc);
    996     }
     1011        }
     1012    }
     1013
    9971014    return rc;
    9981015}
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r51349 r51357  
    46504650{
    46514651    PVGASTATE pThis = IDISPLAYPORT_2_VGASTATE(pInterface);
    4652     PDMDEV_ASSERT_EMT(VGASTATE2DEVINS(pThis));
     4652    /* this can be called from CmdVbva thread as a result of VBVA disable,
     4653     * there should be no problem with calling it from there afaics */
     4654//    PDMDEV_ASSERT_EMT(VGASTATE2DEVINS(pThis));
    46534655
    46544656    /* This is called both in VBVA mode and normal modes. */
  • trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp

    r51349 r51357  
    150150    VBVAEXHOST_DATA_TYPE_GUESTCTL
    151151} VBVAEXHOST_DATA_TYPE;
     152
     153static DECLCALLBACK(int) vdmaVBVANotifyDisable(PVGASTATE pVGAState);
     154
     155
    152156static VBVAEXHOST_DATA_TYPE VBoxVBVAExHPDataGet(struct VBVAEXHOSTCONTEXT *pCmdVbva, uint8_t **ppCmd, uint32_t *pcbCmd);
    153157
     
    12801284        if (fDoHgcmEnable)
    12811285        {
     1286            PVGASTATE pVGAState = pVdma->pVGAState;
     1287
    12821288            /* disable is a bit tricky
    12831289             * we need to ensure the host ctl commands do not come out of order
     
    12851291            rc = vboxVDMACrHgcmHandleEnable(pVdma);
    12861292            if (RT_SUCCESS(rc))
    1287                 return rc;
    1288 
    1289             PVGASTATE pVGAState = pVdma->pVGAState;
     1293            {
     1294                vdmaVBVANotifyDisable(pVGAState);
     1295                return VINF_SUCCESS;
     1296            }
     1297
    12901298            VBOXCRCMD_SVRENABLE_INFO Info;
    12911299            Info.hCltScr = pVGAState->pDrv;
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