Changeset 82053 in vbox
- Timestamp:
- Nov 20, 2019 8:49:19 PM (5 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
r82050 r82053 3002 3002 * 3003 3003 * @returns VBox status code (fully asserted). 3004 * @param pDevIns The device instance. 3004 3005 * @param pThis VGA device instance data. 3005 3006 * @param uExtCmd The command to execute on the FIFO thread. … … 3008 3009 * milliseconds. 3009 3010 */ 3010 static int vmsvgaR3RunExtCmdOnFifoThread(P VGASTATE pThis, uint8_t uExtCmd, void *pvParam, RTMSINTERVAL cMsWait)3011 static int vmsvgaR3RunExtCmdOnFifoThread(PPDMDEVINS pDevIns, PVGASTATE pThis, uint8_t uExtCmd, void *pvParam, RTMSINTERVAL cMsWait) 3011 3012 { 3012 3013 Assert(cMsWait >= RT_MS_1SEC * 5); … … 3032 3033 3033 3034 /* Resume the thread. */ 3034 rc = PDM R3ThreadResume(pThread);3035 rc = PDMDevHlpThreadResume(pDevIns, pThread); 3035 3036 AssertLogRelRC(rc); 3036 3037 if (RT_SUCCESS(rc)) … … 3046 3047 /* suspend the thread */ 3047 3048 pThis->svga.fFifoExtCommandWakeup = false; 3048 int rc2 = PDM R3ThreadSuspend(pThread);3049 int rc2 = PDMDevHlpThreadSuspend(pDevIns, pThread); 3049 3050 AssertLogRelRC(rc2); 3050 3051 if (RT_FAILURE(rc2) && RT_SUCCESS(rc)) … … 5369 5370 * surfaces to VMSVGA3DMIPMAPLEVEL::pSurfaceData heap buffers. 5370 5371 * 5372 * @param pDevIns The device instance. 5371 5373 * @param pThis The VGA device instance data. 5372 5374 * @param sid Either UINT32_MAX or the ID of a specific … … 5374 5376 * are processed. 5375 5377 */ 5376 void vmsvga3dSurfaceUpdateHeapBuffersOnFifoThread(P VGASTATE pThis, uint32_t sid)5378 void vmsvga3dSurfaceUpdateHeapBuffersOnFifoThread(PPDMDEVINS pDevIns, PVGASTATE pThis, uint32_t sid) 5377 5379 { 5378 vmsvgaR3RunExtCmdOnFifoThread(p This, VMSVGA_FIFO_EXTCMD_UPDATE_SURFACE_HEAP_BUFFERS, (void *)(uintptr_t)sid,5380 vmsvgaR3RunExtCmdOnFifoThread(pDevIns, pThis, VMSVGA_FIFO_EXTCMD_UPDATE_SURFACE_HEAP_BUFFERS, (void *)(uintptr_t)sid, 5379 5381 sid == UINT32_MAX ? 10 * RT_MS_1SEC : RT_MS_1MIN); 5380 5382 } … … 5421 5423 fInvY = true; 5422 5424 5423 vmsvga3dInfoSurfaceWorker( PDMINS_2_DATA(pDevIns, PVGASTATE), pHlp, sid, fVerbose, cxAscii, fInvY, NULL);5425 vmsvga3dInfoSurfaceWorker(pDevIns, PDMINS_2_DATA(pDevIns, PVGASTATE), pHlp, sid, fVerbose, cxAscii, fInvY, NULL); 5424 5426 } 5425 5427 … … 5446 5448 const uint32_t cxAscii = 0; /* No ASCII */ 5447 5449 const bool fInvY = false; /* Do not invert. */ 5448 vmsvga3dInfoSurfaceWorker( PDMINS_2_DATA(pDevIns, PVGASTATE), pHlp, sid, fVerbose, cxAscii, fInvY, pszBitmapPath);5450 vmsvga3dInfoSurfaceWorker(pDevIns, PDMINS_2_DATA(pDevIns, PVGASTATE), pHlp, sid, fVerbose, cxAscii, fInvY, pszBitmapPath); 5449 5451 } 5450 5452 … … 5680 5682 LoadState.uVersion = uVersion; 5681 5683 LoadState.uPass = uPass; 5682 rc = vmsvgaR3RunExtCmdOnFifoThread(p This, VMSVGA_FIFO_EXTCMD_LOADSTATE, &LoadState, RT_INDEFINITE_WAIT);5684 rc = vmsvgaR3RunExtCmdOnFifoThread(pDevIns, pThis, VMSVGA_FIFO_EXTCMD_LOADSTATE, &LoadState, RT_INDEFINITE_WAIT); 5683 5685 AssertLogRelRCReturn(rc, rc); 5684 5686 … … 5794 5796 * Must save some state (3D in particular) in the FIFO thread. 5795 5797 */ 5796 rc = vmsvgaR3RunExtCmdOnFifoThread(p This, VMSVGA_FIFO_EXTCMD_SAVESTATE, pSSM, RT_INDEFINITE_WAIT);5798 rc = vmsvgaR3RunExtCmdOnFifoThread(pDevIns, pThis, VMSVGA_FIFO_EXTCMD_SAVESTATE, pSSM, RT_INDEFINITE_WAIT); 5797 5799 AssertLogRelRCReturn(rc, rc); 5798 5800 … … 6059 6061 /* Reset the FIFO processing as well as the 3d state (if we have one). */ 6060 6062 pThis->svga.pFIFOR3[SVGA_FIFO_NEXT_CMD] = pThis->svga.pFIFOR3[SVGA_FIFO_STOP] = 0; /** @todo should probably let the FIFO thread do this ... */ 6061 int rc = vmsvgaR3RunExtCmdOnFifoThread(p This, VMSVGA_FIFO_EXTCMD_RESET, NULL /*pvParam*/, 10000 /*ms*/);6063 int rc = vmsvgaR3RunExtCmdOnFifoThread(pDevIns, pThis, VMSVGA_FIFO_EXTCMD_RESET, NULL /*pvParam*/, 10000 /*ms*/); 6062 6064 6063 6065 /* Reset other stuff. */ … … 6107 6109 if (pThis->svga.pFIFOIOThread) 6108 6110 { 6109 int rc = vmsvgaR3RunExtCmdOnFifoThread(p This, VMSVGA_FIFO_EXTCMD_TERMINATE, NULL /*pvParam*/, 30000 /*ms*/);6111 int rc = vmsvgaR3RunExtCmdOnFifoThread(pDevIns, pThis, VMSVGA_FIFO_EXTCMD_TERMINATE, NULL /*pvParam*/, 30000 /*ms*/); 6110 6112 AssertLogRelRC(rc); 6111 6113 6112 rc = PDM R3ThreadDestroy(pThis->svga.pFIFOIOThread, NULL);6114 rc = PDMDevHlpThreadDestroy(pDevIns, pThis->svga.pFIFOIOThread, NULL); 6113 6115 AssertLogRelRC(rc); 6114 6116 pThis->svga.pFIFOIOThread = NULL; -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp
r81617 r82053 2079 2079 2080 2080 2081 void vmsvga3dInfoSurfaceWorker(PVGASTATE pThis, PCDBGFINFOHLP pHlp, uint32_t sid, bool fVerbose, uint32_t cxAscii, bool fInvY, const char *pszBitmapPath) 2081 void vmsvga3dInfoSurfaceWorker(PPDMDEVINS pDevIns, PVGASTATE pThis, PCDBGFINFOHLP pHlp, uint32_t sid, bool fVerbose, 2082 uint32_t cxAscii, bool fInvY, const char *pszBitmapPath) 2082 2083 { 2083 2084 /* Warning! This code is currently racing papSurfaces reallocation! */ … … 2098 2099 { 2099 2100 if (fVerbose) 2100 vmsvga3dSurfaceUpdateHeapBuffersOnFifoThread(p This, sid);2101 vmsvga3dSurfaceUpdateHeapBuffersOnFifoThread(pDevIns, pThis, sid); 2101 2102 vmsvga3dInfoSurfaceWorkerOne(pHlp, pSurface, fVerbose, cxAscii, fInvY); 2102 2103 if (pszBitmapPath && *pszBitmapPath) … … 2113 2114 */ 2114 2115 if (fVerbose) 2115 vmsvga3dSurfaceUpdateHeapBuffersOnFifoThread(p This, UINT32_MAX);2116 vmsvga3dSurfaceUpdateHeapBuffersOnFifoThread(pDevIns, pThis, UINT32_MAX); 2116 2117 uint32_t cSurfaces = pState->cSurfaces; 2117 2118 pHlp->pfnPrintf(pHlp, "cSurfaces=%d\n", cSurfaces); -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d.h
r82048 r82053 52 52 53 53 /* DevVGA-SVGA.cpp: */ 54 void vmsvga3dSurfaceUpdateHeapBuffersOnFifoThread(P VGASTATE pThis, uint32_t sid);54 void vmsvga3dSurfaceUpdateHeapBuffersOnFifoThread(PPDMDEVINS pDevIns, PVGASTATE pThis, uint32_t sid); 55 55 56 56 … … 120 120 void vmsvga3dUpdateHeapBuffersForSurfaces(PVGASTATE pThis, uint32_t sid); 121 121 void vmsvga3dInfoContextWorker(PVGASTATE pThis, PCDBGFINFOHLP pHlp, uint32_t cid, bool fVerbose); 122 void vmsvga3dInfoSurfaceWorker(PVGASTATE pThis, PCDBGFINFOHLP pHlp, uint32_t sid, bool fVerbose, uint32_t cxAscii, bool fInvY, const char *pszBitmapPath); 122 void vmsvga3dInfoSurfaceWorker(PPDMDEVINS pDevIns, PVGASTATE pThis, PCDBGFINFOHLP pHlp, uint32_t sid, bool fVerbose, 123 uint32_t cxAscii, bool fInvY, const char *pszBitmapPath); 123 124 124 125 /* DevVGA-SVGA3d-shared.cpp: */
Note:
See TracChangeset
for help on using the changeset viewer.