VirtualBox

Ignore:
Timestamp:
Nov 25, 2013 11:56:00 AM (11 years ago)
Author:
vboxsync
Message:

Additions/x11/vboxvideo: fix virtual consoles if KMS is not present.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c

    r49628 r49639  
    12271227        DRILock(xf86ScrnToScreen(pScrn), 0);
    12281228#elif defined(VBOX_DRI)  /* DRI2 */
    1229     if (pVBox->drmFD >= 0)
     1229    if (   pVBox->drmFD < 0
    12301230        /* Tell the kernel driver, if present, that it can use the framebuffer
    12311231         * driver again. */
    1232         drmIoctl(pVBox->drmFD, VBOXVIDEO_IOCTL_ENABLE_HGSMI, NULL);
    1233     else
     1232        || drmIoctl(pVBox->drmFD, VBOXVIDEO_IOCTL_ENABLE_HGSMI, NULL) < 0)
    12341233#endif
    12351234        VBOXRestoreMode(pScrn);
     
    12511250    }
    12521251#ifdef VBOX_DRI
    1253 # ifndef VBOX_DRI_OLD  /* DRI2 */
    1254     if (pVBox->drmFD >= 0)
    1255         /* Tell the kernel driver, if present, that we are going away. */
    1256         drmIoctl(pVBox->drmFD, VBOXVIDEO_IOCTL_ENABLE_HGSMI, NULL);
    1257 # endif
    12581252    if (pVBox->useDRI)
    12591253        VBOXDRICloseScreen(pScreen, pVBox);
    12601254    pVBox->useDRI = false;
    1261 #endif
    1262 
    1263     if (pScrn->vtSema) {
    1264         VBOXRestoreMode(pScrn);
     1255# ifndef VBOX_DRI_OLD  /* DRI2 */
     1256    if (   pVBox->drmFD < 0
     1257        /* Tell the kernel driver, if present, that we are going away. */
     1258        || drmIoctl(pVBox->drmFD, VBOXVIDEO_IOCTL_ENABLE_HGSMI, NULL) < 0)
     1259# endif
     1260#endif
     1261        if (pScrn->vtSema)
     1262            VBOXRestoreMode(pScrn);
     1263    if (pScrn->vtSema)
    12651264        VBOXUnmapVidMem(pScrn);
    1266     }
    12671265    pScrn->vtSema = FALSE;
    12681266
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