Changeset 51013 in vbox
- Timestamp:
- Apr 9, 2014 2:00:52 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmifs.h
r50962 r51013 3073 3073 * @param pCmd The Video HW Acceleration Command that was 3074 3074 * completed. 3075 * @todo r=bird: if async means asynchronous; then 3076 * s/pfnVHWACommandCompleteAsynch/pfnVHWACommandCompleteAsync/; 3077 * fi 3078 */ 3079 DECLR3CALLBACKMEMBER(int, pfnVHWACommandCompleteAsynch, (PPDMIDISPLAYVBVACALLBACKS pInterface, 3075 */ 3076 DECLR3CALLBACKMEMBER(int, pfnVHWACommandCompleteAsync, (PPDMIDISPLAYVBVACALLBACKS pInterface, 3080 3077 PVBOXVHWACMD pCmd)); 3081 3078 … … 3095 3092 } PDMIDISPLAYVBVACALLBACKS; 3096 3093 /** PDMIDISPLAYVBVACALLBACKS */ 3097 #define PDMIDISPLAYVBVACALLBACKS_IID " 193b2975-215f-480a-abef-42f029ae890f"3094 #define PDMIDISPLAYVBVACALLBACKS_IID "ddac0bd0-332d-4671-8853-732921a80216" 3098 3095 3099 3096 /** Pointer to a PCI raw connector interface. */ -
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r51005 r51013 5983 5983 #if defined(VBOX_WITH_HGSMI) 5984 5984 # if defined(VBOX_WITH_VIDEOHWACCEL) 5985 pThis->IVBVACallbacks.pfnVHWACommandCompleteAsync h = vbvaVHWACommandCompleteAsynch;5985 pThis->IVBVACallbacks.pfnVHWACommandCompleteAsync = vbvaVHWACommandCompleteAsync; 5986 5986 # endif 5987 5987 #if defined(VBOX_WITH_CRHGSMI) -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r51005 r51013 605 605 606 606 # ifdef VBOX_WITH_VIDEOHWACCEL 607 int vbvaVHWACommandCompleteAsync h(PPDMIDISPLAYVBVACALLBACKS pInterface, PVBOXVHWACMD pCmd);607 int vbvaVHWACommandCompleteAsync(PPDMIDISPLAYVBVACALLBACKS pInterface, PVBOXVHWACMD pCmd); 608 608 int vbvaVHWAConstruct (PVGASTATE pVGAState); 609 609 int vbvaVHWAReset (PVGASTATE pVGAState); -
trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
r50940 r51013 802 802 { 803 803 Assert(pCommand->Flags & VBOXVHWACMD_FLAG_HG_ASYNCH); 804 vbvaVHWACommandCompleteAsync h(&pVGAState->IVBVACallbacks, pCommand);804 vbvaVHWACommandCompleteAsync(&pVGAState->IVBVACallbacks, pCommand); 805 805 } 806 806 else … … 1241 1241 } 1242 1242 1243 int vbvaVHWACommandCompleteAsync h(PPDMIDISPLAYVBVACALLBACKS pInterface, PVBOXVHWACMD pCmd)1243 int vbvaVHWACommandCompleteAsync(PPDMIDISPLAYVBVACALLBACKS pInterface, PVBOXVHWACMD pCmd) 1244 1244 { 1245 1245 int rc; -
trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp
r51007 r51013 1334 1334 } 1335 1335 1336 rc = VBoxVDMAThreadTerm(&pVdma->Thread, NULL, NULL, false);1336 rc = VBoxVDMAThreadTerm(&pVdma->Thread, NULL, NULL, true); 1337 1337 if (RT_FAILURE(rc)) 1338 1338 { … … 2752 2752 } 2753 2753 else 2754 WARN(("vdmaVBVACtlSubmit failed %d\n", rc));2754 Log(("vdmaVBVACtlSubmit failed %d\n", rc)); 2755 2755 2756 2756 RTSemEventDestroy(Data.hEvent); -
trunk/src/VBox/Main/include/DisplayImpl.h
r50940 r51013 244 244 245 245 #if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL) 246 void crViewportNotify(class VMMDev *pVMMDev,ULONG aScreenId, ULONG x, ULONG y, ULONG width, ULONG height);246 int crViewportNotify(ULONG aScreenId, ULONG x, ULONG y, ULONG width, ULONG height); 247 247 #endif 248 248 … … 346 346 /* for fast host hgcm calls */ 347 347 HGCMCVSHANDLE mhCrOglSvc; 348 RTCRITSECTRW mCrOglLock; 348 349 #endif 349 350 #ifdef VBOX_WITH_CROGL -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r50963 r51013 152 152 #ifdef VBOX_WITH_CRHGSMI 153 153 mhCrOglSvc = NULL; 154 rc = RTCritSectRwInit(&mCrOglLock); 155 AssertRC(rc); 154 156 #endif 155 157 #ifdef VBOX_WITH_CROGL … … 182 184 RT_ZERO(mSaveSeamlessRectLock); 183 185 } 186 187 #ifdef VBOX_WITH_CRHGSMI 188 if (RTCritSectRwIsInitialized (&mCrOglLock)) 189 { 190 RTCritSectRwDelete (&mCrOglLock); 191 RT_ZERO(mCrOglLock); 192 } 193 #endif 184 194 BaseFinalRelease(); 185 195 } … … 3486 3496 { 3487 3497 #ifdef VBOX_WITH_VIDEOHWACCEL 3488 mpDrv->pVBVACallbacks->pfnVHWACommandCompleteAsync h(mpDrv->pVBVACallbacks, (PVBOXVHWACMD)pCommand);3498 mpDrv->pVBVACallbacks->pfnVHWACommandCompleteAsync(mpDrv->pVBVACallbacks, (PVBOXVHWACMD)pCommand); 3489 3499 return S_OK; 3490 3500 #else … … 3508 3518 if (is3denabled) 3509 3519 { 3510 VMMDev *pVMMDev = mParent->getVMMDev(); 3511 3512 if (pVMMDev) 3513 { 3514 crViewportNotify(pVMMDev, aScreenId, x, y, width, height); 3515 } 3516 else 3520 int rc = crViewportNotify(aScreenId, x, y, width, height); 3521 if (RT_FAILURE(rc)) 3517 3522 { 3518 3523 DISPLAYFBINFO *pFb = &maFramebuffers[aScreenId]; … … 3611 3616 3612 3617 #if defined(VBOX_WITH_HGCM) && defined(VBOX_WITH_CROGL) 3613 void Display::crViewportNotify(VMMDev *pVMMDev, ULONG aScreenId, ULONG x, ULONG y, ULONG width, ULONG height) 3614 { 3618 int Display::crViewportNotify(ULONG aScreenId, ULONG x, ULONG y, ULONG width, ULONG height) 3619 { 3620 VMMDev *pVMMDev = mParent->getVMMDev(); 3621 if (!pVMMDev) 3622 return VERR_INVALID_STATE; 3623 3615 3624 struct { 3616 3625 VBOXCRCMDCTL_HGCM data; … … 3636 3645 s.data.aParms[4].u.uint32 = height; 3637 3646 3638 crCtlSubmitSync(&s.data.Hdr, RT_OFFSETOF(VBOXCRCMDCTL_HGCM, aParms[5]));3647 return crCtlSubmitSync(&s.data.Hdr, RT_OFFSETOF(VBOXCRCMDCTL_HGCM, aParms[5])); 3639 3648 } 3640 3649 #endif … … 3645 3654 VMMDev *pVMMDev = mParent->getVMMDev(); 3646 3655 Assert(pVMMDev); 3647 int rc = VERR_GENERAL_FAILURE; 3656 int rc = RTCritSectRwEnterExcl(&mCrOglLock); 3657 AssertRC(rc); 3658 3648 3659 if (pVMMDev) 3649 3660 rc = pVMMDev->hgcmHostSvcHandleCreate("VBoxSharedCrOpenGL", &mhCrOglSvc); 3661 else 3662 rc = VERR_GENERAL_FAILURE; 3650 3663 3651 3664 if (RT_SUCCESS(rc)) … … 3666 3679 rc = pVMMDev->hgcmHostCall("VBoxSharedCrOpenGL", SHCRGL_HOST_FN_CRHGSMI_CTL, 1, &parm); 3667 3680 if (RT_SUCCESS(rc)) 3668 {3669 3681 mCrOglCallbacks = Completion.MainInterface; 3670 3671 return; 3672 } 3673 3674 AssertMsgFailed(("VBOXVDMACMD_CHROMIUM_CTL_TYPE_CRHGSMI_SETUP_COMPLETION failed rc %d", rc)); 3675 } 3676 3682 else 3683 AssertMsgFailed(("VBOXVDMACMD_CHROMIUM_CTL_TYPE_CRHGSMI_SETUP_COMPLETION failed rc %d", rc)); 3684 } 3685 3686 if (RT_FAILURE(rc)) 3687 mhCrOglSvc = NULL; 3688 3689 RTCritSectRwLeaveExcl(&mCrOglLock); 3690 } 3691 3692 void Display::destructCrHgsmiData(void) 3693 { 3694 int rc = RTCritSectRwEnterExcl(&mCrOglLock); 3695 AssertRC(rc); 3677 3696 mhCrOglSvc = NULL; 3678 } 3679 3680 void Display::destructCrHgsmiData(void) 3681 { 3682 mhCrOglSvc = NULL; 3697 RTCritSectRwLeaveExcl(&mCrOglLock); 3683 3698 } 3684 3699 #endif … … 4350 4365 continue; 4351 4366 4352 crViewportNotify(pVMMDev, ul, pFb->pendingViewportInfo.x, pFb->pendingViewportInfo.y, pFb->pendingViewportInfo.width, pFb->pendingViewportInfo.height); 4353 pFb->pendingViewportInfo.fPending = false; 4367 rc = crViewportNotify(ul, pFb->pendingViewportInfo.x, pFb->pendingViewportInfo.y, pFb->pendingViewportInfo.width, pFb->pendingViewportInfo.height); 4368 if (RT_SUCCESS(rc)) 4369 pFb->pendingViewportInfo.fPending = false; 4370 else 4371 { 4372 AssertMsgFailed(("crViewportNotify failed %d\n", rc)); 4373 rc = VINF_SUCCESS; 4374 } 4354 4375 } 4355 4376 } … … 4439 4460 int Display::crCtlSubmit(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd, PFNCRCTLCOMPLETION pfnCompletion, void *pvCompletion) 4440 4461 { 4441 return mpDrv->pVBVACallbacks->pfnCrCtlSubmit(mpDrv->pVBVACallbacks, pCmd, cbCmd, pfnCompletion, pvCompletion); 4462 int rc = RTCritSectRwEnterShared(&mCrOglLock); 4463 if (RT_SUCCESS(rc)) 4464 { 4465 if (mhCrOglSvc) 4466 rc = mpDrv->pVBVACallbacks->pfnCrCtlSubmit(mpDrv->pVBVACallbacks, pCmd, cbCmd, pfnCompletion, pvCompletion); 4467 else 4468 rc = VERR_NOT_SUPPORTED; 4469 4470 RTCritSectRwLeaveShared(&mCrOglLock); 4471 } 4472 return rc; 4442 4473 } 4443 4474 4444 4475 int Display::crCtlSubmitSync(struct VBOXCRCMDCTL* pCmd, uint32_t cbCmd) 4445 4476 { 4446 return mpDrv->pVBVACallbacks->pfnCrCtlSubmitSync(mpDrv->pVBVACallbacks, pCmd, cbCmd); 4477 int rc = RTCritSectRwEnterShared(&mCrOglLock); 4478 if (RT_SUCCESS(rc)) 4479 { 4480 if (mhCrOglSvc) 4481 rc = mpDrv->pVBVACallbacks->pfnCrCtlSubmitSync(mpDrv->pVBVACallbacks, pCmd, cbCmd); 4482 else 4483 rc = VERR_NOT_SUPPORTED; 4484 4485 RTCritSectRwLeaveShared(&mCrOglLock); 4486 } 4487 return rc; 4447 4488 } 4448 4489
Note:
See TracChangeset
for help on using the changeset viewer.