Changeset 49474 in vbox
- Timestamp:
- Nov 14, 2013 6:49:54 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 90613
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/HostServices/VBoxCrOpenGLSvc.h
r46783 r49474 44 44 #define SHCRGL_HOST_FN_VIEWPORT_CHANGED (15) 45 45 #define SHCRGL_HOST_FN_SET_OUTPUT_REDIRECT (20) 46 #define SHCRGL_HOST_FN_CRCMD_NOTIFY_CMDS (21) 46 47 /* crOpenGL guest functions */ 47 48 #define SHCRGL_GUEST_FN_WRITE (2) … … 69 70 #define SHCRGL_CPARMS_WRITE_READ_BUFFERED (3) 70 71 #define SHCRGL_CPARMS_SET_OUTPUT_REDIRECT (1) 72 #define SHCRGL_CPARMS_CRCMD_NOTIFY_CMDS (0) 71 73 #define SHCRGL_CPARMS_VIEWPORT_CHANGED (5) 72 74 #define SHCRGL_CPARMS_GET_CAPS (1) -
trunk/include/VBox/VBoxVideo.h
r49365 r49474 1458 1458 }; 1459 1459 uint64_t cbVRam; 1460 struct VBOXCRCMD_CLTINFO *pCrCmdClientInfo; 1460 1461 } VBOXVDMACMD_CHROMIUM_CTL_CRHGSMI_SETUP, *PVBOXVDMACMD_CHROMIUM_CTL_CRHGSMI_SETUP; 1461 1462 … … 1567 1568 1568 1569 /* CrHgsmi command */ 1569 #define VBOXCMDVBVA_OPTYPE_CRCMD 1 1570 /* blit command (e.g. shadow to primary) */ 1571 #define VBOXCMDVBVA_OPTYPE_BLT 2 1570 #define VBOXCMDVBVA_OPTYPE_CRCMD 1 1571 /* special case for blitting to primary */ 1572 #define VBOXCMDVBVA_OPTYPE_BLT_TOPRIMARY 2 1573 /* blit command that does blitting of allocations identified by VRAM offset or host id 1574 * for VRAM-offset ones the size and format are same as primary */ 1575 #define VBOXCMDVBVA_OPTYPE_BLT_OFFPRIMSZFMT_OR_ID 3 1576 /* allocation paging transfer request */ 1577 #define VBOXCMDVBVA_OPTYPE_PAGING_TRANSFER 4 1578 /* allocation paging fill request */ 1579 #define VBOXCMDVBVA_OPTYPE_PAGING_FILL 5 1572 1580 /* nop - is a one-bit command. The buffer size to skip is determined by VBVA buffer size */ 1573 #define VBOXCMDVBVA_OPTYPE_NOP 0x80 1581 #define VBOXCMDVBVA_OPTYPE_NOP 0x80 1582 1583 /* u8Flags flags */ 1584 /* source allocation is specified with the host id. if not set - source allocation is specified with VRAM offset */ 1585 #define VBOXCMDVBVA_OPF_ALLOC_SRCID 0x80 1586 /* destination allocation is specified with the host id. if not set - destination allocation is specified with VRAM offset */ 1587 #define VBOXCMDVBVA_OPF_ALLOC_DSTID 0x40 1588 1589 /* transfer from RAM to Allocation */ 1590 #define VBOXCMDVBVA_OPF_PAGING_TRANSFER_IN 0x20 1591 1574 1592 1575 1593 /* trying to make the header as small as possible, … … 1580 1598 /* one VBOXCMDVBVA_OPTYPE_XXX, ecxept NOP, see comments above */ 1581 1599 uint8_t u8OpCode; 1582 /* reserved, must be null */ 1583 uint8_t u8Reserved; 1600 /* command-specific 1601 * VBOXCMDVBVA_OPTYPE_CRCMD - must be null 1602 * VBOXCMDVBVA_OPTYPE_BLT_TOPRIMARY - OR-ed VBOXCMDVBVA_OPF_ALLOC_XXX flags 1603 * VBOXCMDVBVA_OPTYPE_BLT_OFFPRIMSZFMT_OR_ID - OR-ed VBOXCMDVBVA_OPF_ALLOC_XXX flags 1604 * VBOXCMDVBVA_OPTYPE_NOP - must be null */ 1605 uint8_t u8Flags; 1584 1606 /* one of VBOXCMDVBVA_STATE_XXX*/ 1585 1607 volatile uint8_t u8State; 1586 /* result, 0 on success, otherwise contains the failure code TBD */ 1587 int8_t u8Result; 1608 union 1609 { 1610 /* result, 0 on success, otherwise contains the failure code TBD */ 1611 int8_t i8Result; 1612 uint8_t u8PrimaryID; 1613 }; 1588 1614 /* DXGK DDI fence ID */ 1589 1615 uint32_t u32FenceID; 1590 1616 } VBOXCMDVBVA_HDR; 1591 1617 1618 typedef uint32_t VBOXCMDVBVAOFFSET; 1619 typedef uint64_t VBOXCMDVBVAPHADDR; 1620 1592 1621 typedef struct VBOXCMDVBVA_CRCMD 1593 1622 { 1594 1623 VBOXCMDVBVA_HDR Hdr; 1595 VBOX VIDEOOFFSET offCmd;1624 VBOXCMDVBVAOFFSET offCmd; 1596 1625 } VBOXCMDVBVA_CRCMD; 1626 1627 typedef struct VBOXCMDVBVA_ALLOCINFO 1628 { 1629 union 1630 { 1631 VBOXCMDVBVAOFFSET offVRAM; 1632 uint32_t id; 1633 }; 1634 } VBOXCMDVBVA_ALLOCINFO; 1635 1636 typedef struct VBOXCMDVBVA_RECT 1637 { 1638 /** Coordinates of affected rectangle. */ 1639 int16_t x; 1640 int16_t y; 1641 uint16_t w; 1642 uint16_t h; 1643 } VBOXCMDVBVA_RECT; 1644 1645 typedef struct VBOXCMDVBVA_BLT_TOPRIMARY 1646 { 1647 VBOXCMDVBVA_HDR Hdr; 1648 VBOXCMDVBVA_ALLOCINFO src; 1649 /* the rects count is determined from the command size */ 1650 VBOXCMDVBVA_RECT aRects[1]; 1651 } VBOXCMDVBVA_BLT_TOPRIMARY; 1652 1653 typedef struct VBOXCMDVBVA_BLT_OFFPRIMSZFMT_OR_ID 1654 { 1655 VBOXCMDVBVA_HDR Hdr; 1656 VBOXCMDVBVA_ALLOCINFO src; 1657 VBOXCMDVBVA_ALLOCINFO dst; 1658 /* the rects count is determined from the command size */ 1659 VBOXCMDVBVA_RECT aRects[1]; 1660 } VBOXCMDVBVA_BLT_OFFPRIMSZFMT_OR_ID; 1661 1662 typedef struct VBOXCMDVBVA_PAGING_TRANSFER 1663 { 1664 VBOXCMDVBVA_HDR Hdr; 1665 VBOXCMDVBVAPHADDR Addr; 1666 /* for now can only contain offVRAM. 1667 * paging transfer can NOT be initiated for allocations having host 3D object (hostID) associated */ 1668 VBOXCMDVBVA_ALLOCINFO Alloc; 1669 } VBOXCMDVBVA_PAGING_TRANSFER; 1670 1671 typedef struct VBOXCMDVBVA_PAGING_FILL 1672 { 1673 VBOXCMDVBVA_HDR Hdr; 1674 uint32_t cbFill; 1675 uint32_t Pattern; 1676 /* paging transfer can NOT be initiated for allocations having host 3D object (hostID) associated */ 1677 VBOXCMDVBVAOFFSET offVRAM; 1678 } VBOXCMDVBVA_PAGING_FILL; 1597 1679 1598 1680 # pragma pack() -
trunk/include/VBox/VBoxVideo3D.h
r48491 r49474 140 140 #define VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_3DDATA 2 141 141 142 143 /* interface between the VGA device and 3D Server Backend 144 * VGA device and 3D backend work together in processing the VBVA-based ring buffer commands comming from guest. 145 * With this interaction VGA device acts like a client, while 3D backend acts as a server. 146 * VGA device can process some commands itself, while some of them are delegated to the 3D backend. 147 * 148 * */ 149 /* client handle, passed to client callbacks (see below) */ 150 typedef struct VBOXVDMAHOST *HVBOXCRCMDCLT; 151 152 153 typedef struct VBOXCMDVBVA_HDR *PVBOXCMDVBVA_HDR; 154 155 /* server queries client for the next command, 156 * the obtained command must be returned to the client right after it gets processed, 157 * the next PFNVBOXCRCMD_CLT_CMDGET call completes the previously submitted command, 158 * Must not be called from the EMT thread.*/ 159 typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_CLT_CMDGET)(HVBOXCRCMDCLT hClt, PVBOXCMDVBVA_HDR *ppNextCmd, uint32_t *pcbNextCmd); 160 161 /* Client callbacks (i.e. those client exposes to the server) */ 162 typedef struct VBOXCRCMD_CLTINFO 163 { 164 HVBOXCRCMDCLT hClient; 165 PFNVBOXCRCMD_CLT_CMDGET pfnCmdGet; 166 } VBOXCRCMD_CLTINFO; 167 168 169 142 170 #endif /* #ifndef ___VBox_VBoxVideo3D_h */ -
trunk/include/VBox/vmm/pdmifs.h
r49420 r49474 750 750 * @thread The emulation thread. 751 751 */ 752 DECLR3CALLBACKMEMBER(int, pfnCrCmdNotifyCmds, (PPDMIDISPLAYCONNECTOR pInterface)); 753 754 /** 755 * Process the guest chromium command. 756 * 757 * @param pInterface Pointer to this interface. 758 * @param pCmd Video HW Acceleration Command to be processed. 759 * @thread The emulation thread. 760 */ 752 761 DECLR3CALLBACKMEMBER(void, pfnCrHgsmiCommandProcess, (PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd)); 753 762 -
trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp
r44528 r49474 26 26 #include "HGSMI/HGSMIHostHlp.h" 27 27 28 #include <VBox/VBoxVideo3D.h> 29 28 30 #ifdef VBOX_VDMA_WITH_WORKERTHREAD 29 31 typedef enum … … 206 208 } 207 209 210 static DECLCALLBACK(int) vboxVDMACrCmdCltCmdGet(HVBOXCRCMDCLT hClt, PVBOXCMDVBVA_HDR *ppNextCmd, uint32_t *pcbNextCmd) 211 { 212 return VERR_NOT_IMPLEMENTED; 213 } 214 208 215 static int vboxVDMACrCtlHgsmiSetup(struct VBOXVDMAHOST *pVdma) 209 216 { … … 213 220 if (pCmd) 214 221 { 222 VBOXCRCMD_CLTINFO CltInfo; 223 CltInfo.hClient = pVdma; 224 CltInfo.pfnCmdGet = vboxVDMACrCmdCltCmdGet; 215 225 PVGASTATE pVGAState = pVdma->pVGAState; 216 226 pCmd->pvVRamBase = pVGAState->vram_ptrR3; 217 227 pCmd->cbVRam = pVGAState->vram_size; 228 pCmd->pCrCmdClientInfo = &CltInfo; 218 229 int rc = vboxVDMACrCtlPost(pVGAState, &pCmd->Hdr, sizeof (*pCmd)); 219 230 Assert(RT_SUCCESS(rc) || rc == VERR_NOT_SUPPORTED); -
trunk/src/VBox/GuestHost/OpenGL/include/cr_protocol.h
r46966 r49474 103 103 unsigned int *pcbWriteback; 104 104 unsigned int cbWriteback; 105 bool fCompleteNeeded; 105 106 } CRVBOXHGSMI_CMDDATA, *PCRVBOXHGSMI_CMDDATA; 106 107 … … 140 141 #endif 141 142 143 #define CRVBOXHGSMI_CMDDATA_IS_COMPLETE_NEEDED(_pData) (!!(_pData)->fCompleteNeeded) 142 144 #define CRVBOXHGSMI_CMDDATA_IS_SET(_pData) (!!(_pData)->pCmd) 143 145 #define CRVBOXHGSMI_CMDDATA_IS_SETWB(_pData) (!!(_pData)->pWriteback) … … 149 151 } while (0) 150 152 151 #define CRVBOXHGSMI_CMDDATA_SET(_pData, _pCmd, _pHdr ) do { \153 #define CRVBOXHGSMI_CMDDATA_SET(_pData, _pCmd, _pHdr, _fCompleteNeeded) do { \ 152 154 CRVBOXHGSMI_CMDDATA_ASSERT_CLEANED(_pData); \ 153 155 (_pData)->pCmd = (_pCmd); \ 154 156 (_pData)->pCmdRc = &(_pHdr)->result; \ 155 CRVBOXHGSMI_CMDDATA_ASSERT_CONSISTENT(_pData); \ 156 } while (0) 157 158 #define CRVBOXHGSMI_CMDDATA_SETWB(_pData, _pCmd, _pHdr, _pWb, _cbWb, _pcbWb) do { \ 159 CRVBOXHGSMI_CMDDATA_SET(_pData, _pCmd, _pHdr); \ 157 (_pData)->fCompleteNeeded = _fCompleteNeeded; \ 158 CRVBOXHGSMI_CMDDATA_ASSERT_CONSISTENT(_pData); \ 159 } while (0) 160 161 #define CRVBOXHGSMI_CMDDATA_SETWB(_pData, _pCmd, _pHdr, _pWb, _cbWb, _pcbWb, _fCompleteNeeded) do { \ 162 CRVBOXHGSMI_CMDDATA_SET(_pData, _pCmd, _pHdr, _fCompleteNeeded); \ 160 163 (_pData)->pWriteback = (_pWb); \ 161 164 (_pData)->pcbWriteback = (_pcbWb); \ -
trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h
r48099 r49474 34 34 #endif 35 35 #include <VBox/Hardware/VBoxVideoVBE.h> 36 #include <VBox/VBoxVideo3D.h> 36 37 37 38 #include "cr_vreg.h" … … 456 457 uint32_t fBlitterMode; 457 458 CR_BLITTER Blitter; 459 460 VBOXCRCMD_CLTINFO CltInfo; 458 461 459 462 CR_SERVER_RPW RpwWorker; … … 611 614 extern DECLEXPORT(int32_t) crVBoxServerCrHgsmiCmd(struct VBOXVDMACMD_CHROMIUM_CMD *pCmd, uint32_t cbCmd); 612 615 extern DECLEXPORT(int32_t) crVBoxServerCrHgsmiCtl(struct VBOXVDMACMD_CHROMIUM_CTL *pCtl, uint32_t cbCtl); 616 617 extern DECLEXPORT(int32_t) crVBoxServerCrCmdNotifyCmds(); 613 618 #endif 614 619 -
trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp
r49163 r49474 953 953 switch (u32Function) 954 954 { 955 case SHCRGL_HOST_FN_CRCMD_NOTIFY_CMDS: 956 { 957 rc = crVBoxServerCrCmdNotifyCmds(); 958 } break; 955 959 #ifdef VBOX_WITH_CRHGSMI 956 960 case SHCRGL_HOST_FN_CRHGSMI_CMD: -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h
r49172 r49474 48 48 49 49 #define VBOXCRHGSMI_CMD_CHECK_COMPLETE(_pData, _rc) do { \ 50 if (CRVBOXHGSMI_CMDDATA_IS_ SET(_pData)) { \50 if (CRVBOXHGSMI_CMDDATA_IS_COMPLETE_NEEDED(_pData) && CRVBOXHGSMI_CMDDATA_IS_SET(_pData)) { \ 51 51 VBOXCRHGSMI_CMD_COMPLETE(_pData, _rc); \ 52 52 } \ -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c
r48798 r49474 3056 3056 * NOTE: it is ALWAYS responsibility of the crVBoxServerCrHgsmiCmd to complete the command! 3057 3057 * */ 3058 int32_t crVBoxServerCrHgsmiCmd(struct VBOXVDMACMD_CHROMIUM_CMD *pCmd, uint32_t cbCmd)3058 static int32_t crVBoxServerCrHgsmiCmdProcess(struct VBOXVDMACMD_CHROMIUM_CMD *pCmd, bool fCompleteNeeded) 3059 3059 { 3060 3060 int32_t rc; … … 3070 3070 { 3071 3071 crWarning("g_pvVRamBase is not initialized"); 3072 if (!fCompleteNeeded) 3073 return VERR_INVALID_STATE; 3074 3072 3075 crServerCrHgsmiCmdComplete(pCmd, VERR_INVALID_STATE); 3073 3076 return VINF_SUCCESS; … … 3077 3080 { 3078 3081 crWarning("zero buffers passed in!"); 3082 if (!fCompleteNeeded) 3083 return VERR_INVALID_PARAMETER; 3084 3079 3085 crServerCrHgsmiCmdComplete(pCmd, VERR_INVALID_PARAMETER); 3080 3086 return VINF_SUCCESS; … … 3088 3094 { 3089 3095 crWarning("invalid header buffer!"); 3096 if (!fCompleteNeeded) 3097 return VERR_INVALID_PARAMETER; 3098 3090 3099 crServerCrHgsmiCmdComplete(pCmd, VERR_INVALID_PARAMETER); 3091 3100 return VINF_SUCCESS; … … 3095 3104 { 3096 3105 crWarning("invalid header buffer size!"); 3106 if (!fCompleteNeeded) 3107 return VERR_INVALID_PARAMETER; 3108 3097 3109 crServerCrHgsmiCmdComplete(pCmd, VERR_INVALID_PARAMETER); 3098 3110 return VINF_SUCCESS; … … 3144 3156 pClient->conn->pBuffer = pBuffer; 3145 3157 pClient->conn->cbBuffer = cbBuffer; 3146 CRVBOXHGSMI_CMDDATA_SET(&pClient->conn->CmdData, pCmd, pHdr );3158 CRVBOXHGSMI_CMDDATA_SET(&pClient->conn->CmdData, pCmd, pHdr, fCompleteNeeded); 3147 3159 rc = crVBoxServerInternalClientWriteRead(pClient); 3148 3160 CRVBOXHGSMI_CMDDATA_ASSERT_CLEANED(&pClient->conn->CmdData); … … 3199 3211 pClient->conn->pBuffer = pBuffer; 3200 3212 pClient->conn->cbBuffer = cbBuffer; 3201 CRVBOXHGSMI_CMDDATA_SET(&pClient->conn->CmdData, pCmd, pHdr );3213 CRVBOXHGSMI_CMDDATA_SET(&pClient->conn->CmdData, pCmd, pHdr, fCompleteNeeded); 3202 3214 rc = crVBoxServerInternalClientWriteRead(pClient); 3203 3215 CRVBOXHGSMI_CMDDATA_ASSERT_CLEANED(&pClient->conn->CmdData); … … 3255 3267 /* the read command is never pended, complete it right away */ 3256 3268 pHdr->result = rc; 3269 3270 if (!fCompleteNeeded) 3271 return VINF_SUCCESS; 3272 3257 3273 crServerCrHgsmiCmdComplete(pCmd, VINF_SUCCESS); 3258 3274 return VINF_SUCCESS; … … 3319 3335 pClient->conn->pBuffer = pBuffer; 3320 3336 pClient->conn->cbBuffer = cbBuffer; 3321 CRVBOXHGSMI_CMDDATA_SETWB(&pClient->conn->CmdData, pCmd, pHdr, pWriteback, cbWriteback, &pFnCmd->cbWriteback );3337 CRVBOXHGSMI_CMDDATA_SETWB(&pClient->conn->CmdData, pCmd, pHdr, pWriteback, cbWriteback, &pFnCmd->cbWriteback, fCompleteNeeded); 3322 3338 rc = crVBoxServerInternalClientWriteRead(pClient); 3323 3339 CRVBOXHGSMI_CMDDATA_ASSERT_CLEANED(&pClient->conn->CmdData); … … 3356 3372 CRASSERT(RT_FAILURE(rc)); 3357 3373 pHdr->result = rc; 3374 3375 if (!fCompleteNeeded) 3376 return rc; 3377 3358 3378 crServerCrHgsmiCmdComplete(pCmd, VINF_SUCCESS); 3359 3379 return rc; 3380 } 3381 3382 int32_t crVBoxServerCrHgsmiCmd(struct VBOXVDMACMD_CHROMIUM_CMD *pCmd, uint32_t cbCmd) 3383 { 3384 return crVBoxServerCrHgsmiCmdProcess(pCmd, true); 3360 3385 } 3361 3386 … … 3371 3396 g_pvVRamBase = (uint8_t*)pSetup->pvVRamBase; 3372 3397 g_cbVRam = pSetup->cbVRam; 3398 cr_server.CltInfo = *pSetup->pCrCmdClientInfo; 3373 3399 rc = VINF_SUCCESS; 3374 3400 break; … … 3399 3425 return rc; 3400 3426 } 3401 #endif 3427 3428 static int32_t crVBoxServerCrCmdProcess(PVBOXCMDVBVA_HDR pCmd, uint32_t cbCmd) 3429 { 3430 switch (pCmd->u8OpCode) 3431 { 3432 case VBOXCMDVBVA_OPTYPE_CRCMD: 3433 { 3434 VBOXCMDVBVA_CRCMD *pCrCmdDr = (VBOXCMDVBVA_CRCMD*)pCmd; 3435 VBOXCMDVBVAOFFSET offCmd = pCrCmdDr->offCmd; 3436 if (offCmd < g_cbVRam && offCmd + cbCmd < g_cbVRam) 3437 { 3438 VBOXVDMACMD_CHROMIUM_CMD *pCrCmd = (VBOXVDMACMD_CHROMIUM_CMD*)(g_pvVRamBase + offCmd); 3439 crVBoxServerCrHgsmiCmdProcess(pCrCmd, false); 3440 /* success */ 3441 pCmd->i8Result = 0; 3442 } 3443 else 3444 { 3445 crWarning("incorrect command info!"); 3446 pCmd->i8Result = -1; 3447 } 3448 break; 3449 } 3450 default: 3451 crWarning("unsupported command"); 3452 pCmd->i8Result = -1; 3453 } 3454 return VINF_SUCCESS; 3455 } 3456 3457 int32_t crVBoxServerCrCmdNotifyCmds() 3458 { 3459 PVBOXCMDVBVA_HDR pCmd = NULL; 3460 uint32_t cbCmd; 3461 3462 for (;;) 3463 { 3464 int rc = cr_server.CltInfo.pfnCmdGet(cr_server.CltInfo.hClient, &pCmd, &cbCmd); 3465 if (rc == VINF_EOF) 3466 return VINF_SUCCESS; 3467 if (!RT_SUCCESS(rc)) 3468 return rc; 3469 3470 rc = crVBoxServerCrCmdProcess(pCmd, cbCmd); 3471 if (!RT_SUCCESS(rc)) 3472 return rc; 3473 } 3474 3475 /* should not be here! */ 3476 AssertFailed(); 3477 return VERR_INTERNAL_ERROR; 3478 } 3479 #endif -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c
r48726 r49474 318 318 } 319 319 320 static bool crServerVBoxTranslateIntersectRect(CRMuralInfo *mural, const RTRECT *pSrcRect, PRTRECT pDstRect)321 {322 int32_t xLeft = RT_MAX(mural->gX, pSrcRect->xRight);323 int32_t yTop = RT_MAX(mural->gY, pSrcRect->yBottom);324 int32_t xRight = RT_MIN(mural->gX + mural->width, pSrcRect->xLeft);325 int32_t yBottom = RT_MIN(mural->gY + mural->height, pSrcRect->yTop);326 327 if (xLeft < xRight && yTop < yBottom)328 {329 pDstRect->xLeft = xLeft;330 pDstRect->yTop = yTop;331 pDstRect->xRight = xRight;332 pDstRect->yBottom = yBottom;333 return true;334 }335 336 return false;337 }338 339 320 static void crServerVBoxRootVrTranslateForMural(CRMuralInfo *mural) 340 321 { -
trunk/src/VBox/Main/include/DisplayImpl.h
r49420 r49474 150 150 #endif 151 151 #ifdef VBOX_WITH_CRHGSMI 152 void handleCrHgsmiCommandProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd); 153 void handleCrHgsmiControlProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CTL pCtl, uint32_t cbCtl); 152 int handleCrCmdNotifyCmds(); 153 void handleCrHgsmiCommandProcess(PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd); 154 void handleCrHgsmiControlProcess(PVBOXVDMACMD_CHROMIUM_CTL pCtl, uint32_t cbCtl); 154 155 155 156 void handleCrHgsmiCommandCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam); … … 229 230 230 231 #ifdef VBOX_WITH_CRHGSMI 232 static DECLCALLBACK(int) displayCrCmdNotifyCmds(PPDMIDISPLAYCONNECTOR pInterface); 231 233 static DECLCALLBACK(void) displayCrHgsmiCommandProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd); 232 234 static DECLCALLBACK(void) displayCrHgsmiControlProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CTL pCtl, uint32_t cbCtl); -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r49420 r49474 3860 3860 } 3861 3861 3862 void Display::handleCrHgsmiCommandProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd) 3862 int Display::handleCrCmdNotifyCmds() 3863 { 3864 int rc = VERR_INVALID_FUNCTION; 3865 3866 if (mhCrOglSvc) 3867 { 3868 VBOXHGCMSVCPARM dummy; 3869 VMMDev *pVMMDev = mParent->getVMMDev(); 3870 if (pVMMDev) 3871 { 3872 /* no completion callback is specified with this call, 3873 * the CrOgl code will complete the CrHgsmi command once it processes it */ 3874 rc = pVMMDev->hgcmHostFastCallAsync(mhCrOglSvc, SHCRGL_HOST_FN_CRCMD_NOTIFY_CMDS, &dummy, NULL, NULL); 3875 AssertRC(rc); 3876 } 3877 else 3878 rc = VERR_INVALID_STATE; 3879 } 3880 3881 return rc; 3882 } 3883 3884 void Display::handleCrHgsmiCommandProcess(PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd) 3863 3885 { 3864 3886 int rc = VERR_INVALID_FUNCTION; … … 3888 3910 } 3889 3911 3890 void Display::handleCrHgsmiControlProcess(P PDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CTL pCtl, uint32_t cbCtl)3912 void Display::handleCrHgsmiControlProcess(PVBOXVDMACMD_CHROMIUM_CTL pCtl, uint32_t cbCtl) 3891 3913 { 3892 3914 int rc = VERR_INVALID_FUNCTION; … … 3914 3936 } 3915 3937 3938 DECLCALLBACK(int) Display::displayCrCmdNotifyCmds(PPDMIDISPLAYCONNECTOR pInterface) 3939 { 3940 PDRVMAINDISPLAY pDrv = PDMIDISPLAYCONNECTOR_2_MAINDISPLAY(pInterface); 3941 3942 return pDrv->pDisplay->handleCrCmdNotifyCmds(); 3943 } 3916 3944 3917 3945 DECLCALLBACK(void) Display::displayCrHgsmiCommandProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd) … … 3919 3947 PDRVMAINDISPLAY pDrv = PDMIDISPLAYCONNECTOR_2_MAINDISPLAY(pInterface); 3920 3948 3921 pDrv->pDisplay->handleCrHgsmiCommandProcess(p Interface, pCmd, cbCmd);3949 pDrv->pDisplay->handleCrHgsmiCommandProcess(pCmd, cbCmd); 3922 3950 } 3923 3951 … … 3926 3954 PDRVMAINDISPLAY pDrv = PDMIDISPLAYCONNECTOR_2_MAINDISPLAY(pInterface); 3927 3955 3928 pDrv->pDisplay->handleCrHgsmiControlProcess(p Interface, pCmd, cbCmd);3956 pDrv->pDisplay->handleCrHgsmiControlProcess(pCmd, cbCmd); 3929 3957 } 3930 3958 … … 4499 4527 #endif 4500 4528 #ifdef VBOX_WITH_CRHGSMI 4529 pThis->IConnector.pfnCrCmdNotifyCmds = Display::displayCrCmdNotifyCmds; 4501 4530 pThis->IConnector.pfnCrHgsmiCommandProcess = Display::displayCrHgsmiCommandProcess; 4502 4531 pThis->IConnector.pfnCrHgsmiControlProcess = Display::displayCrHgsmiControlProcess;
Note:
See TracChangeset
for help on using the changeset viewer.