VirtualBox

Changeset 84802 in vbox


Ignore:
Timestamp:
Jun 11, 2020 10:44:48 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
138607
Message:

Devices/Graphics: experimental GLX graphics output: reset screens on power off

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

Legend:

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

    r84754 r84802  
    31063106            Log(("vmsvgaR3FifoLoop: reset the fifo thread.\n"));
    31073107            Assert(pThisCC->svga.pvFIFOExtCmdParam == NULL);
     3108
     3109            vmsvgaR3ResetScreens(pThisCC);
    31083110# ifdef VBOX_WITH_VMSVGA3D
    31093111            if (pThis->svga.f3DEnabled)
    31103112            {
    31113113                /* The 3d subsystem must be reset from the fifo thread. */
    3112                 vmsvgaR3ResetScreens(pThisCC); /** @todo Also destroy screens on PowerOff. */
    31133114                vmsvga3dReset(pThisCC);
    31143115            }
    31153116# endif
     3117            break;
     3118
     3119        case VMSVGA_FIFO_EXTCMD_POWEROFF:
     3120            Log(("vmsvgaR3FifoLoop: power off.\n"));
     3121            Assert(pThisCC->svga.pvFIFOExtCmdParam == NULL);
     3122
     3123            /* The screens must be reset on the FIFO thread, because they may use 3D resources. */
     3124            vmsvgaR3ResetScreens(pThisCC);
    31163125            break;
    31173126
     
    69186927}
    69196928
     6929/**
     6930 * Power Off notification.
     6931 *
     6932 * @param   pDevIns     The device instance data.
     6933 *
     6934 * @remarks Caller enters the device critical section.
     6935 */
     6936DECLCALLBACK(void) vmsvgaR3PowerOff(PPDMDEVINS pDevIns)
     6937{
     6938    PVGASTATE   pThis   = PDMDEVINS_2_DATA(pDevIns, PVGASTATE);
     6939    PVGASTATECC pThisCC = PDMDEVINS_2_DATA_CC(pDevIns, PVGASTATECC);
     6940
     6941    /*
     6942     * Notify the FIFO thread.
     6943     */
     6944    if (pThisCC->svga.pFIFOIOThread)
     6945    {
     6946        int rc = vmsvgaR3RunExtCmdOnFifoThread(pDevIns, pThis, pThisCC,  VMSVGA_FIFO_EXTCMD_POWEROFF,
     6947                                               NULL /*pvParam*/, 30000 /*ms*/);
     6948        AssertLogRelRC(rc);
     6949    }
     6950}
     6951
    69206952#endif /* IN_RING3 */
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.h

    r84742 r84802  
    7272#define VMSVGA_FIFO_EXTCMD_RESET                        4
    7373#define VMSVGA_FIFO_EXTCMD_UPDATE_SURFACE_HEAP_BUFFERS  5
     74#define VMSVGA_FIFO_EXTCMD_POWEROFF                     6
    7475
    7576/** Size of the region to backup when switching into svga mode. */
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r84722 r84802  
    61806180# endif
    61816181    VBVAOnResume(pDevIns, pThis, pThisCC);
     6182}
     6183
     6184
     6185/**
     6186 * @interface_method_impl{PDMDEVREG,pfnPowerOff}
     6187 */
     6188static DECLCALLBACK(void) vgaR3PowerOff(PPDMDEVINS pDevIns)
     6189{
     6190    PVGASTATE   pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE);
     6191    PVGASTATECC pThisCC = PDMDEVINS_2_DATA_CC(pDevIns, PVGASTATECC);
     6192    RT_NOREF(pThis, pThisCC);
     6193# ifdef VBOX_WITH_VMSVGA
     6194    vmsvgaR3PowerOff(pDevIns);
     6195# endif
    61826196}
    61836197
     
    74397453    /* .pfnQueryInterface = */      NULL,
    74407454    /* .pfnInitComplete = */        NULL,
    7441     /* .pfnPowerOff = */            NULL,
     7455    /* .pfnPowerOff = */            vgaR3PowerOff,
    74427456    /* .pfnSoftReset = */           NULL,
    74437457    /* .pfnReserved0 = */           NULL,
Note: See TracChangeset for help on using the changeset viewer.

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