VirtualBox

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


Ignore:
Timestamp:
Jun 17, 2014 1:02:43 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
94384
Message:

vga: saved state fixes

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGASavedState.h

    r51005 r51631  
    2323#define Graphics_DevVGASavedState_h
    2424
    25 #define VGA_SAVEDSTATE_VERSION              13
     25#define VGA_SAVEDSTATE_VERSION              14
     26#define VGA_SAVEDSTATE_VERSION_FIXED_PENDVHWA 14
    2627#define VGA_SAVEDSTATE_VERSION_3D           13
    2728#define VGA_SAVEDSTATE_VERSION_HGSMIMA      12 /* HGSMI memory allocator. */
  • trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp

    r51358 r51631  
    14781478    {
    14791479        case VBOXVBVASAVEDSTATE_VHWAAVAILABLE_MAGIC:
     1480            pData->ab2DOn[iDisplay] = true;
    14801481            return true;
    14811482        case VBOXVBVASAVEDSTATE_VHWAUNAVAILABLE_MAGIC:
     1483            pData->ab2DOn[iDisplay] = false;
    14821484            return false;
    14831485        default:
     
    16551657        }
    16561658    }
     1659
     1660    /* no pending commands */
     1661    SSMR3PutU32(pSSM, 0);
    16571662#endif
    16581663    return rc;
     
    18301835                    vbvaVHWAHHCommandRelease(pCmd);
    18311836                    AssertRCReturn(rc, rc);
    1832 
    1833                     rc = vbvaVHWACommandLoadPending(pVGAState, pSSM, u32Version);
     1837                    bool fLoadCommands = false;
     1838
     1839                    if (u32Version < VGA_SAVEDSTATE_VERSION_FIXED_PENDVHWA)
     1840                    {
     1841                        /* prev versions have a bug that does not allow to distinguish between the sate made with VHWA not available (on solaris box)
     1842                         * and VHWA disabled */
     1843
     1844                        for (uint32_t i = 0; i < pVGAState->cMonitors; ++i)
     1845                        {
     1846                            if (VhwaData.ab2DOn[i])
     1847                            {
     1848                                fLoadCommands = true;
     1849                                break;
     1850                            }
     1851                        }
     1852                    }
     1853                    else
     1854                        fLoadCommands = true;
     1855
     1856                    if (fLoadCommands)
     1857                    {
     1858                        rc = vbvaVHWACommandLoadPending(pVGAState, pSSM, u32Version);
     1859                        AssertRCReturn(rc, rc);
     1860                    }
     1861                }
     1862                else
     1863                {
     1864                    rc = VERR_OUT_OF_RESOURCES;
     1865                }
     1866#else
     1867                uint32_t u32;
     1868
     1869                for (uint32_t i = 0; i < pVGAState->cMonitors; ++i)
     1870                {
     1871                    rc = SSMR3PGetU32(pSSM, &u32);
    18341872                    AssertRCReturn(rc, rc);
    1835                 }
    1836                 else
    1837                 {
    1838                     rc = VERR_OUT_OF_RESOURCES;
    1839                 }
    1840 #else
    1841                 rc = SSMR3SkipToEndOfUnit(pSSM);
    1842                 AssertRCReturn(rc, rc);
     1873
     1874                    if (u32 != VBOXVBVASAVEDSTATE_VHWAUNAVAILABLE_MAGIC)
     1875                    {
     1876                        LogRel(("2D data while 2D is not supported\n"));
     1877                        return VERR_NOT_SUPPORTED;
     1878                    }
     1879                }
     1880
     1881                if (u32Version >= VGA_SAVEDSTATE_VERSION_FIXED_PENDVHWA)
     1882                {
     1883                    rc = SSMR3GetU32(pSSM, &u32);
     1884                    AssertRCReturn(rc, rc);
     1885                }
     1886
     1887                if (u32)
     1888                {
     1889                    LogRel(("2D pending command while 2D is not supported\n"));
     1890                    return VERR_NOT_SUPPORTED;
     1891                }
    18431892#endif
    18441893            }
Note: See TracChangeset for help on using the changeset viewer.

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