VirtualBox

Changeset 34129 in vbox for trunk/src/VBox/Devices/Graphics


Ignore:
Timestamp:
Nov 16, 2010 10:31:39 PM (14 years ago)
Author:
vboxsync
Message:

2d: fix save state deadlock (xtracker#5335)

Location:
trunk/src/VBox/Devices/Graphics
Files:
3 edited

Legend:

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

    r34024 r34129  
    52205220}
    52215221
     5222static DECLCALLBACK(int) vgaR3SaveDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
     5223{
     5224#ifdef VBOX_WITH_VIDEOHWACCEL
     5225    return vboxVBVASaveStateDone(pDevIns, pSSM);
     5226#else
     5227    return VINF_SUCCESS;
     5228#endif
     5229}
    52225230
    52235231/**
     
    60076015    rc = PDMDevHlpSSMRegisterEx(pDevIns, VGA_SAVEDSTATE_VERSION, sizeof(*pThis), NULL,
    60086016                                NULL,          vgaR3LiveExec, NULL,
    6009                                 vgaR3SavePrep, vgaR3SaveExec, NULL,
     6017                                vgaR3SavePrep, vgaR3SaveExec, vgaR3SaveDone,
    60106018                                NULL,          vgaR3LoadExec, vgaR3LoadDone);
    60116019    if (RT_FAILURE(rc))
  • trunk/src/VBox/Devices/Graphics/DevVGA.h

    r33855 r34129  
    529529int vbvaVHWACommandCompleteAsynch(PPDMIDISPLAYVBVACALLBACKS pInterface, PVBOXVHWACMD pCmd);
    530530int vbvaVHWAConstruct (PVGASTATE pVGAState);
    531 int vbvaVHWADisable (PVGASTATE pVGAState);
    532531int vbvaVHWAReset (PVGASTATE pVGAState);
    533532
    534533int vboxVBVASaveStatePrep (PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
     534int vboxVBVASaveStateDone (PPDMDEVINS pDevIns, PSSMHANDLE pSSM);
    535535# endif
    536536
  • trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp

    r33540 r34129  
    11911191
    11921192/* @todo call this also on reset? */
    1193 int vbvaVHWADisable (PVGASTATE pVGAState)
    1194 {
    1195     VBOXVHWACMD *pCmd = vbvaVHWAHHCommandCreate(pVGAState, VBOXVHWACMD_TYPE_DISABLE, 0, 0);
     1193int vbvaVHWAEnable (PVGASTATE pVGAState, bool bEnable)
     1194{
     1195    const VBOXVHWACMD_TYPE enmType = bEnable ? VBOXVHWACMD_TYPE_HH_ENABLE : VBOXVHWACMD_TYPE_HH_DISABLE;
     1196    VBOXVHWACMD *pCmd = vbvaVHWAHHCommandCreate(pVGAState,
     1197                        enmType,
     1198                    0, 0);
    11961199    Assert(pCmd);
    11971200    if(pCmd)
     
    12201223            if (iDisplay >= pVGAState->cMonitors)
    12211224                break;
    1222             vbvaVHWAHHCommandReinit(pCmd, VBOXVHWACMD_TYPE_DISABLE, (int32_t)iDisplay);
     1225            vbvaVHWAHHCommandReinit(pCmd, enmType, (int32_t)iDisplay);
    12231226
    12241227        } while (true);
     
    12341237{
    12351238    /* ensure we have no pending commands */
    1236     return vbvaVHWADisable(PDMINS_2_DATA(pDevIns, PVGASTATE));
     1239    return vbvaVHWAEnable(PDMINS_2_DATA(pDevIns, PVGASTATE), false);
     1240}
     1241
     1242int vboxVBVASaveStateDone (PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
     1243{
     1244    /* ensure we have no pending commands */
     1245    return vbvaVHWAEnable(PDMINS_2_DATA(pDevIns, PVGASTATE), true);
    12371246}
    12381247
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