VirtualBox

Changeset 82053 in vbox


Ignore:
Timestamp:
Nov 20, 2019 8:49:19 PM (5 years ago)
Author:
vboxsync
Message:

DevVGA: PDMR3Thread -> PDMDevHlpThread. bugref:9218

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp

    r82050 r82053  
    30023002 *
    30033003 * @returns VBox status code (fully asserted).
     3004 * @param   pDevIns         The device instance.
    30043005 * @param   pThis           VGA device instance data.
    30053006 * @param   uExtCmd         The command to execute on the FIFO thread.
     
    30083009 *                          milliseconds.
    30093010 */
    3010 static int vmsvgaR3RunExtCmdOnFifoThread(PVGASTATE pThis, uint8_t uExtCmd, void *pvParam, RTMSINTERVAL cMsWait)
     3011static int vmsvgaR3RunExtCmdOnFifoThread(PPDMDEVINS pDevIns, PVGASTATE pThis, uint8_t uExtCmd, void *pvParam, RTMSINTERVAL cMsWait)
    30113012{
    30123013    Assert(cMsWait >= RT_MS_1SEC * 5);
     
    30323033
    30333034        /* Resume the thread. */
    3034         rc = PDMR3ThreadResume(pThread);
     3035        rc = PDMDevHlpThreadResume(pDevIns, pThread);
    30353036        AssertLogRelRC(rc);
    30363037        if (RT_SUCCESS(rc))
     
    30463047            /* suspend the thread */
    30473048            pThis->svga.fFifoExtCommandWakeup = false;
    3048             int rc2 = PDMR3ThreadSuspend(pThread);
     3049            int rc2 = PDMDevHlpThreadSuspend(pDevIns, pThread);
    30493050            AssertLogRelRC(rc2);
    30503051            if (RT_FAILURE(rc2) && RT_SUCCESS(rc))
     
    53695370 * surfaces to VMSVGA3DMIPMAPLEVEL::pSurfaceData heap buffers.
    53705371 *
     5372 * @param   pDevIns             The device instance.
    53715373 * @param   pThis               The VGA device instance data.
    53725374 * @param   sid                 Either UINT32_MAX or the ID of a specific
     
    53745376 *                              are processed.
    53755377 */
    5376 void vmsvga3dSurfaceUpdateHeapBuffersOnFifoThread(PVGASTATE pThis, uint32_t sid)
     5378void vmsvga3dSurfaceUpdateHeapBuffersOnFifoThread(PPDMDEVINS pDevIns, PVGASTATE pThis, uint32_t sid)
    53775379{
    5378     vmsvgaR3RunExtCmdOnFifoThread(pThis, 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,
    53795381                                  sid == UINT32_MAX ? 10 * RT_MS_1SEC : RT_MS_1MIN);
    53805382}
     
    54215423        fInvY = true;
    54225424
    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);
    54245426}
    54255427
     
    54465448    const uint32_t cxAscii = 0; /* No ASCII */
    54475449    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);
    54495451}
    54505452
     
    56805682    LoadState.uVersion = uVersion;
    56815683    LoadState.uPass    = uPass;
    5682     rc = vmsvgaR3RunExtCmdOnFifoThread(pThis, VMSVGA_FIFO_EXTCMD_LOADSTATE, &LoadState, RT_INDEFINITE_WAIT);
     5684    rc = vmsvgaR3RunExtCmdOnFifoThread(pDevIns, pThis, VMSVGA_FIFO_EXTCMD_LOADSTATE, &LoadState, RT_INDEFINITE_WAIT);
    56835685    AssertLogRelRCReturn(rc, rc);
    56845686
     
    57945796     * Must save some state (3D in particular) in the FIFO thread.
    57955797     */
    5796     rc = vmsvgaR3RunExtCmdOnFifoThread(pThis, VMSVGA_FIFO_EXTCMD_SAVESTATE, pSSM, RT_INDEFINITE_WAIT);
     5798    rc = vmsvgaR3RunExtCmdOnFifoThread(pDevIns, pThis, VMSVGA_FIFO_EXTCMD_SAVESTATE, pSSM, RT_INDEFINITE_WAIT);
    57975799    AssertLogRelRCReturn(rc, rc);
    57985800
     
    60596061    /* Reset the FIFO processing as well as the 3d state (if we have one). */
    60606062    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(pThis, VMSVGA_FIFO_EXTCMD_RESET, NULL /*pvParam*/, 10000 /*ms*/);
     6063    int rc = vmsvgaR3RunExtCmdOnFifoThread(pDevIns, pThis, VMSVGA_FIFO_EXTCMD_RESET, NULL /*pvParam*/, 10000 /*ms*/);
    60626064
    60636065    /* Reset other stuff. */
     
    61076109    if (pThis->svga.pFIFOIOThread)
    61086110    {
    6109         int rc = vmsvgaR3RunExtCmdOnFifoThread(pThis, VMSVGA_FIFO_EXTCMD_TERMINATE, NULL /*pvParam*/, 30000 /*ms*/);
     6111        int rc = vmsvgaR3RunExtCmdOnFifoThread(pDevIns, pThis, VMSVGA_FIFO_EXTCMD_TERMINATE, NULL /*pvParam*/, 30000 /*ms*/);
    61106112        AssertLogRelRC(rc);
    61116113
    6112         rc = PDMR3ThreadDestroy(pThis->svga.pFIFOIOThread, NULL);
     6114        rc = PDMDevHlpThreadDestroy(pDevIns, pThis->svga.pFIFOIOThread, NULL);
    61136115        AssertLogRelRC(rc);
    61146116        pThis->svga.pFIFOIOThread = NULL;
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp

    r81617 r82053  
    20792079
    20802080
    2081 void vmsvga3dInfoSurfaceWorker(PVGASTATE pThis, PCDBGFINFOHLP pHlp, uint32_t sid, bool fVerbose, uint32_t cxAscii, bool fInvY, const char *pszBitmapPath)
     2081void vmsvga3dInfoSurfaceWorker(PPDMDEVINS pDevIns, PVGASTATE pThis, PCDBGFINFOHLP pHlp, uint32_t sid, bool fVerbose,
     2082                               uint32_t cxAscii, bool fInvY, const char *pszBitmapPath)
    20822083{
    20832084    /* Warning! This code is currently racing papSurfaces reallocation! */
     
    20982099                {
    20992100                    if (fVerbose)
    2100                         vmsvga3dSurfaceUpdateHeapBuffersOnFifoThread(pThis, sid);
     2101                        vmsvga3dSurfaceUpdateHeapBuffersOnFifoThread(pDevIns, pThis, sid);
    21012102                    vmsvga3dInfoSurfaceWorkerOne(pHlp, pSurface, fVerbose, cxAscii, fInvY);
    21022103                    if (pszBitmapPath && *pszBitmapPath)
     
    21132114             */
    21142115            if (fVerbose)
    2115                 vmsvga3dSurfaceUpdateHeapBuffersOnFifoThread(pThis, UINT32_MAX);
     2116                vmsvga3dSurfaceUpdateHeapBuffersOnFifoThread(pDevIns, pThis, UINT32_MAX);
    21162117            uint32_t cSurfaces = pState->cSurfaces;
    21172118            pHlp->pfnPrintf(pHlp, "cSurfaces=%d\n", cSurfaces);
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d.h

    r82048 r82053  
    5252
    5353/* DevVGA-SVGA.cpp: */
    54 void vmsvga3dSurfaceUpdateHeapBuffersOnFifoThread(PVGASTATE pThis, uint32_t sid);
     54void vmsvga3dSurfaceUpdateHeapBuffersOnFifoThread(PPDMDEVINS pDevIns, PVGASTATE pThis, uint32_t sid);
    5555
    5656
     
    120120void vmsvga3dUpdateHeapBuffersForSurfaces(PVGASTATE pThis, uint32_t sid);
    121121void 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);
     122void vmsvga3dInfoSurfaceWorker(PPDMDEVINS pDevIns, PVGASTATE pThis, PCDBGFINFOHLP pHlp, uint32_t sid, bool fVerbose,
     123                               uint32_t cxAscii, bool fInvY, const char *pszBitmapPath);
    123124
    124125/* DevVGA-SVGA3d-shared.cpp: */
Note: See TracChangeset for help on using the changeset viewer.

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