Changeset 51349 in vbox
- Timestamp:
- May 22, 2014 11:42:21 AM (11 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r51237 r51349 5550 5550 PVGASTATE pThis = PDMINS_2_DATA(pDevIns, PVGASTATE); 5551 5551 VBVAPause(pThis, (pThis->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED) == 0); 5552 return vboxVBVALoadStateDone(pDevIns, pSSM); 5552 int rc = vboxVBVALoadStateDone(pDevIns, pSSM); 5553 AssertRCReturn(rc, rc); 5554 # ifdef VBOX_WITH_VDMA 5555 rc = vboxVDMASaveLoadDone(pThis->pVdma); 5556 AssertRCReturn(rc, rc); 5557 # endif 5558 return VINF_SUCCESS; 5553 5559 #else 5554 5560 return VINF_SUCCESS; -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r51260 r51349 662 662 int vboxVDMASaveStateExecPerform(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM); 663 663 int vboxVDMASaveLoadExecPerform(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM, uint32_t u32Version); 664 int vboxVDMASaveLoadDone(struct VBOXVDMAHOST *pVdma); 664 665 # endif /* VBOX_WITH_VDMA */ 665 666 … … 669 670 void vboxCmdVBVACmdTimer(PVGASTATE pVGAState); 670 671 int vboxCmdVBVACmdCtl(PVGASTATE pVGAState, VBOXCMDVBVA_CTL *pCtl, uint32_t cbCtl); 672 bool vboxCmdVBVAIsEnabled(PVGASTATE pVGAState); 671 673 # endif /* VBOX_WITH_CRHGSMI */ 672 674 #endif /* VBOX_WITH_HGSMI */ -
trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
r51324 r51349 1867 1867 if (pView->pVBVA) 1868 1868 { 1869 Assert(!vboxCmdVBVAIsEnabled(pVGAState)); 1869 1870 vbvaEnable (iView, pVGAState, pCtx, pView->pVBVA, pView->u32VBVAOffset, true /* fRestored */); 1870 1871 vbvaResize (pVGAState, pView, &pView->screen); … … 2136 2137 case VBVA_INFO_VIEW: 2137 2138 { 2139 if (vboxCmdVBVAIsEnabled(pVGAState)) 2140 { 2141 AssertMsgFailed(("VBVA_INFO_VIEW is not acceptible for CmdVbva\n")); 2142 rc = VERR_INVALID_PARAMETER; 2143 break; 2144 } 2145 2138 2146 if (cbBuffer < sizeof (VBVAINFOVIEW)) 2139 2147 { … … 2194 2202 } 2195 2203 2204 if (vboxCmdVBVAIsEnabled(pVGAState)) 2205 { 2206 AssertMsgFailed(("VBVA_INFO_SCREEN is not acceptible for CmdVbva\n")); 2207 rc = VERR_INVALID_PARAMETER; 2208 break; 2209 } 2210 2196 2211 VBVAINFOSCREEN *pScreen = (VBVAINFOSCREEN *)pvBuffer; 2197 2212 VBVAINFOSCREEN Screen = *pScreen; … … 2201 2216 case VBVA_ENABLE: 2202 2217 { 2218 if (vboxCmdVBVAIsEnabled(pVGAState)) 2219 { 2220 AssertMsgFailed(("VBVA_ENABLE is not acceptible for CmdVbva\n")); 2221 rc = VERR_INVALID_PARAMETER; 2222 break; 2223 } 2224 2203 2225 if (cbBuffer < sizeof (VBVAENABLE)) 2204 2226 { -
trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp
r51260 r51349 103 103 VBVAEXHOSTCTL_TYPE_HH_SAVESTATE, 104 104 VBVAEXHOSTCTL_TYPE_HH_LOADSTATE, 105 VBVAEXHOSTCTL_TYPE_HH_LOADSTATE_DONE, 105 106 VBVAEXHOSTCTL_TYPE_HH_BE_OPAQUE, 106 107 VBVAEXHOSTCTL_TYPE_HH_ON_HGCM_UNLOAD, … … 1307 1308 switch (pCmd->enmType) 1308 1309 { 1310 case VBVAEXHOSTCTL_TYPE_GHH_BE_OPAQUE: 1311 { 1312 if (!VBoxVBVAExHSIsEnabled(&pVdma->CmdVbva)) 1313 { 1314 WARN(("VBVAEXHOSTCTL_TYPE_GHH_BE_OPAQUE for disabled vdma VBVA\n")); 1315 return VERR_INVALID_STATE; 1316 } 1317 return pVdma->CrSrvInfo.pfnHostCtl(pVdma->CrSrvInfo.hSvr, pCmd->u.cmd.pu8Cmd, pCmd->u.cmd.cbCmd); 1318 } 1319 case VBVAEXHOSTCTL_TYPE_GHH_DISABLE: 1320 { 1321 int rc = vdmaVBVADisableProcess(pVdma, true); 1322 if (RT_FAILURE(rc)) 1323 { 1324 WARN(("vdmaVBVADisableProcess failed %d\n", rc)); 1325 return rc; 1326 } 1327 1328 return VBoxVDMAThreadTerm(&pVdma->Thread, NULL, NULL, false); 1329 } 1330 case VBVAEXHOSTCTL_TYPE_HH_ON_HGCM_UNLOAD: 1331 { 1332 int rc = vdmaVBVADisableProcess(pVdma, false); 1333 if (RT_FAILURE(rc)) 1334 { 1335 WARN(("vdmaVBVADisableProcess failed %d\n", rc)); 1336 return rc; 1337 } 1338 1339 rc = VBoxVDMAThreadTerm(&pVdma->Thread, NULL, NULL, true); 1340 if (RT_FAILURE(rc)) 1341 { 1342 WARN(("VBoxVDMAThreadTerm failed %d\n", rc)); 1343 return rc; 1344 } 1345 1346 *pfContinue = false; 1347 return VINF_SUCCESS; 1348 } 1309 1349 case VBVAEXHOSTCTL_TYPE_HH_SAVESTATE: 1310 1350 { … … 1323 1363 PVGASTATE pVGAState = pVdma->pVGAState; 1324 1364 uint8_t * pu8VramBase = pVGAState->vram_ptrR3; 1365 1325 1366 int rc = VBoxVBVAExHSLoadState(&pVdma->CmdVbva, pu8VramBase, pCmd->u.state.pSSM, pCmd->u.state.u32Version); 1326 1367 if (RT_FAILURE(rc)) … … 1329 1370 return rc; 1330 1371 } 1331 return pVdma->CrSrvInfo.pfnLoadState(pVdma->CrSrvInfo.hSvr, pCmd->u.state.pSSM, pCmd->u.state.u32Version); 1332 } 1333 case VBVAEXHOSTCTL_TYPE_GHH_BE_OPAQUE: 1334 { 1335 if (!VBoxVBVAExHSIsEnabled(&pVdma->CmdVbva)) 1336 { 1337 WARN(("VBVAEXHOSTCTL_TYPE_GHH_BE_OPAQUE for disabled vdma VBVA\n")); 1338 return VERR_INVALID_STATE; 1339 } 1340 return pVdma->CrSrvInfo.pfnHostCtl(pVdma->CrSrvInfo.hSvr, pCmd->u.cmd.pu8Cmd, pCmd->u.cmd.cbCmd); 1341 } 1342 case VBVAEXHOSTCTL_TYPE_GHH_DISABLE: 1343 { 1344 int rc = vdmaVBVADisableProcess(pVdma, true); 1372 1373 rc = pVdma->CrSrvInfo.pfnLoadState(pVdma->CrSrvInfo.hSvr, pCmd->u.state.pSSM, pCmd->u.state.u32Version); 1345 1374 if (RT_FAILURE(rc)) 1346 1375 { 1347 WARN((" vdmaVBVADisableProcessfailed %d\n", rc));1376 WARN(("pfnLoadState failed %d\n", rc)); 1348 1377 return rc; 1349 1378 } 1350 1379 1351 return VBoxVDMAThreadTerm(&pVdma->Thread, NULL, NULL, false); 1352 } 1353 case VBVAEXHOSTCTL_TYPE_HH_ON_HGCM_UNLOAD: 1354 { 1355 int rc = vdmaVBVADisableProcess(pVdma, false); 1356 if (RT_FAILURE(rc)) 1357 { 1358 WARN(("vdmaVBVADisableProcess failed %d\n", rc)); 1359 return rc; 1360 } 1361 1362 rc = VBoxVDMAThreadTerm(&pVdma->Thread, NULL, NULL, true); 1363 if (RT_FAILURE(rc)) 1364 { 1365 WARN(("VBoxVDMAThreadTerm failed %d\n", rc)); 1366 return rc; 1367 } 1368 1369 *pfContinue = false; 1380 return VINF_SUCCESS; 1381 } 1382 case VBVAEXHOSTCTL_TYPE_HH_LOADSTATE_DONE: 1383 { 1384 PVGASTATE pVGAState = pVdma->pVGAState; 1385 1386 for (uint32_t i = 0; i < pVGAState->cMonitors; ++i) 1387 { 1388 VBVAINFOSCREEN CurScreen; 1389 VBVAINFOVIEW CurView; 1390 1391 int rc = VBVAGetInfoViewAndScreen(pVGAState, i, &CurView, &CurScreen); 1392 if (RT_FAILURE(rc)) 1393 { 1394 WARN(("VBVAGetInfoViewAndScreen failed %d\n", rc)); 1395 return rc; 1396 } 1397 1398 rc = VBVAInfoScreen(pVGAState, &CurScreen); 1399 if (RT_FAILURE(rc)) 1400 { 1401 WARN(("VBVAInfoScreen failed %d\n", rc)); 1402 return rc; 1403 } 1404 } 1405 1370 1406 return VINF_SUCCESS; 1371 1407 } … … 3220 3256 } 3221 3257 3258 bool vboxCmdVBVAIsEnabled(PVGASTATE pVGAState) 3259 { 3260 return VBoxVBVAExHSIsEnabled(&pVGAState->pVdma->CmdVbva); 3261 } 3222 3262 #endif 3223 3263 … … 3359 3399 return VINF_SUCCESS; 3360 3400 } 3401 3402 int vboxVDMASaveLoadDone(struct VBOXVDMAHOST *pVdma) 3403 { 3404 VBVAEXHOSTCTL* pHCtl = VBoxVBVAExHCtlCreate(&pVdma->CmdVbva, VBVAEXHOSTCTL_TYPE_HH_LOADSTATE_DONE); 3405 if (!pHCtl) 3406 { 3407 WARN(("VBoxVBVAExHCtlCreate failed\n")); 3408 return VERR_NO_MEMORY; 3409 } 3410 3411 /* sanity */ 3412 pHCtl->u.cmd.pu8Cmd = NULL; 3413 pHCtl->u.cmd.cbCmd = 0; 3414 3415 /* NULL completion will just free the ctl up */ 3416 int rc = vdmaVBVACtlSubmit(pVdma, pHCtl, VBVAEXHOSTCTL_SOURCE_HOST, NULL, NULL); 3417 if (RT_FAILURE(rc)) 3418 { 3419 Log(("vdmaVBVACtlSubmit failed rc %d\n", rc)); 3420 VBoxVBVAExHCtlFree(&pVdma->CmdVbva, pHCtl); 3421 return rc; 3422 } 3423 3424 return VINF_SUCCESS; 3425 } -
trunk/src/VBox/GuestHost/OpenGL/include/cr_version.h
r51260 r51349 43 43 #define SHCROGL_SSM_VERSION_CRCMD 44 44 44 #define SHCROGL_SSM_VERSION_WITH_SCREEN_MAP 45 45 #define SHCROGL_SSM_VERSION 45 45 #define SHCROGL_SSM_VERSION_WITH_SCREEN_MAP_REORDERED 46 46 #define SHCROGL_SSM_VERSION 46 46 47 47 48 /* These define the Chromium release number. -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_presenter.cpp
r51335 r51349 4920 4920 int rc; 4921 4921 int cDisplays = 0, i; 4922 4922 4923 for (i = 0; i < cr_server.screenCount; ++i) 4923 4924 { … … 4968 4969 AssertRCReturn(rc, rc); 4969 4970 4970 rc = SSMR3PutU32(pSSM, 0xffffffff); 4971 AssertRCReturn(rc, rc); 4972 4973 rc = CrFbSaveState(hFb, pSSM); 4971 rc = SSMR3PutU32(pSSM, hFb->ScreenInfo.u32StartOffset); 4974 4972 AssertRCReturn(rc, rc); 4975 4973 4976 4974 CR_FB_INFO *pFbInfo = &g_CrPresenter.aFbInfos[hFb->ScreenInfo.u32ViewIndex]; 4977 4975 rc = SSMR3PutMem(pSSM, pFbInfo->aTargetMap, sizeof (pFbInfo->aTargetMap)); 4976 AssertRCReturn(rc, rc); 4977 4978 rc = CrFbSaveState(hFb, pSSM); 4978 4979 AssertRCReturn(rc, rc); 4979 4980 } … … 5154 5155 AssertRCReturn(rc, rc); 5155 5156 5156 uint32_t offVram = 0; 5157 rc = SSMR3GetU32(pSSM, &offVram); 5157 rc = SSMR3GetU32(pSSM, &Screen.u32StartOffset); 5158 5158 AssertRCReturn(rc, rc); 5159 if ( offVram != 0xffffffff)5159 if (Screen.u32StartOffset == 0xffffffff) 5160 5160 { 5161 5161 WARN(("not expected offVram")); 5162 Screen.u32StartOffset = offVram;5162 Screen.u32StartOffset = 0; 5163 5163 } 5164 5164 5165 rc = CrFbLoadState(pFb, pSSM, version); 5166 AssertRCReturn(rc, rc); 5167 5168 if (version >= SHCROGL_SSM_VERSION_WITH_SCREEN_MAP) 5165 if (version >= SHCROGL_SSM_VERSION_WITH_SCREEN_MAP_REORDERED) 5169 5166 { 5170 5167 rc = SSMR3GetMem(pSSM, aTargetMap, sizeof (aTargetMap)); 5171 5168 AssertRCReturn(rc, rc); 5172 5169 } 5170 5171 if (version == SHCROGL_SSM_VERSION_WITH_SCREEN_MAP) 5172 { 5173 VBOXCMDVBVA_SCREENMAP_DECL(uint32_t, aEmptyTargetMap); 5174 5175 memset(aEmptyTargetMap, 0, sizeof (aEmptyTargetMap)); 5176 5177 rc = CrPMgrResize(&Screen, cr_server.fCrCmdEnabled ? NULL : CrFbGetVRAM(pFb), aEmptyTargetMap); 5178 AssertRCReturn(rc, rc); 5179 5180 rc = CrFbLoadState(pFb, pSSM, version); 5181 AssertRCReturn(rc, rc); 5182 5183 rc = SSMR3GetMem(pSSM, aTargetMap, sizeof (aTargetMap)); 5184 AssertRCReturn(rc, rc); 5185 } 5173 5186 } 5174 5187 5175 5188 rc = CrPMgrResize(&Screen, cr_server.fCrCmdEnabled ? NULL : CrFbGetVRAM(pFb), aTargetMap); 5176 5189 AssertRCReturn(rc, rc); 5190 5191 if (version >= SHCROGL_SSM_VERSION_WITH_FB_INFO && version != SHCROGL_SSM_VERSION_WITH_SCREEN_MAP) 5192 { 5193 rc = CrFbLoadState(pFb, pSSM, version); 5194 AssertRCReturn(rc, rc); 5195 } 5177 5196 } 5178 5197 -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c
r51082 r51349 946 946 } 947 947 948 PCR_BLITTER renderspuVBoxPresentBlitterGetAndEnter( WindowInfo *window, int32_t i32MakeCurrentUserData )949 { 950 PCR_BLITTER pBlitter = renderspuVBoxPresentBlitterGet(window);948 PCR_BLITTER renderspuVBoxPresentBlitterGetAndEnter( WindowInfo *window, int32_t i32MakeCurrentUserData, bool fRedraw ) 949 { 950 PCR_BLITTER pBlitter = fRedraw ? window->pBlitter : renderspuVBoxPresentBlitterGet(window); 951 951 if (pBlitter) 952 952 { … … 1001 1001 } 1002 1002 1003 void renderspuVBoxPresentCompositionGeneric( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR * pCompositor, const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry, int32_t i32MakeCurrentUserData ) 1004 { 1005 PCR_BLITTER pBlitter = renderspuVBoxPresentBlitterGetAndEnter(window, i32MakeCurrentUserData); 1003 void renderspuVBoxPresentCompositionGeneric( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR * pCompositor, 1004 const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry, int32_t i32MakeCurrentUserData, 1005 bool fRedraw ) 1006 { 1007 PCR_BLITTER pBlitter = renderspuVBoxPresentBlitterGetAndEnter(window, i32MakeCurrentUserData, fRedraw); 1006 1008 if (!pBlitter) 1007 1009 return; -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.h
r51064 r51349 418 418 extern int renderspuVBoxCompositorTryAcquire(WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR **ppCompositor); 419 419 extern void renderspuVBoxCompositorRelease( WindowInfo *window); 420 extern void renderspuVBoxPresentCompositionGeneric( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR * pCompositor, const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry, int32_t i32MakeCurrentUserData ); 420 extern void renderspuVBoxPresentCompositionGeneric( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR * pCompositor, 421 const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry, int32_t i32MakeCurrentUserData, 422 bool fRedraw); 421 423 extern PCR_BLITTER renderspuVBoxPresentBlitterGet( WindowInfo *window ); 422 424 void renderspuVBoxPresentBlitterCleanup( WindowInfo *window ); 423 425 extern int renderspuVBoxPresentBlitterEnter( PCR_BLITTER pBlitter, int32_t i32MakeCurrentUserData ); 424 extern PCR_BLITTER renderspuVBoxPresentBlitterGetAndEnter( WindowInfo *window, int32_t i32MakeCurrentUserData );426 extern PCR_BLITTER renderspuVBoxPresentBlitterGetAndEnter( WindowInfo *window, int32_t i32MakeCurrentUserData, bool fRedraw ); 425 427 extern PCR_BLITTER renderspuVBoxPresentBlitterEnsureCreated( WindowInfo *window, int32_t i32MakeCurrentUserData ); 426 428 void renderspuWindowTermBase( WindowInfo *window ); -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_agl.c
r50095 r51349 610 610 void renderspu_SystemVBoxPresentComposition( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR * pCompositor, const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry ) 611 611 { 612 renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry, 0 );612 renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry, 0, false); 613 613 } 614 614 -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_glx.c
r51064 r51349 584 584 if (pCompositor) 585 585 { 586 renderspuVBoxPresentCompositionGeneric(pWindow, pCompositor, NULL, 0 );586 renderspuVBoxPresentCompositionGeneric(pWindow, pCompositor, NULL, 0, true); 587 587 renderspuVBoxCompositorRelease(pWindow); 588 588 } … … 1981 1981 if (RT_SUCCESS(rc)) 1982 1982 { 1983 renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry, 0 );1983 renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry, 0, false); 1984 1984 renderspuVBoxCompositorRelease(window); 1985 1985 } -
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_wgl.c
r50626 r51349 446 446 pWindow->redraw_device_context = hDC; 447 447 448 renderspuVBoxPresentCompositionGeneric(pWindow, pCompositor, NULL, 1 );448 renderspuVBoxPresentCompositionGeneric(pWindow, pCompositor, NULL, 1, true); 449 449 450 450 bRc = EndPaint(pWindow->hWnd, &Paint); … … 1295 1295 if (RT_SUCCESS(rc)) 1296 1296 { 1297 renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry, 0 );1297 renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry, 0, false); 1298 1298 renderspuVBoxCompositorRelease(window); 1299 1299 }
Note:
See TracChangeset
for help on using the changeset viewer.