VirtualBox

Changeset 53426 in vbox for trunk/src


Ignore:
Timestamp:
Dec 2, 2014 9:17:02 PM (10 years ago)
Author:
vboxsync
Message:

Additions/x11/vboxvideo: fix VT switching without a kernel driver.

Location:
trunk/src/VBox/Additions/x11
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/undefined_xorg

    r52225 r53426  
    2929drmGetVersion
    3030drmIoctl
     31drmModeGetResources
     32drmModeFreeResources
    3133drmSetMaster
    3234___errno
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c

    r53346 r53426  
    115115#ifdef VBOX_DRI
    116116# include "xf86drm.h"
     117# include "xf86drmMode.h"
    117118#endif
    118119
     
    12011202        DRILock(xf86ScrnToScreen(pScrn), 0);
    12021203#elif defined(VBOX_DRI)  /* DRI2 */
    1203     /* Expected failure mode: KMS not supported, drmDropMaster() fails. */
    1204     if (pVBox->drmFD < 0 || drmDropMaster(pVBox->drmFD) < 0)
    1205         VBOXRestoreMode(pScrn);
    1206 #endif
    1207 #if !defined(VBOX_DRI) || defined(VBOX_DRI_OLD)
     1204    if (pVBox->drmFD >= 0)
     1205        drmDropMaster(pVBox->drmFD);
     1206#endif
    12081207    VBOXRestoreMode(pScrn);
    1209 #endif
    12101208#ifdef SET_HAVE_VT_PROPERTY
    12111209    updateHasVTProperty(pScrn, FALSE);
     
    13961394    VBOXPtr pVBox = VBOXGetRec(pScrn);
    13971395    vgaRegPtr vgaReg;
     1396#ifdef VBOX_DRI
     1397    drmModeResPtr pRes;
     1398#endif
    13981399
    13991400    TRACE_ENTRY();
     1401#ifdef VBOX_DRI
     1402    /* Do not try to re-set the VGA state if a mode-setting driver is loaded. */
     1403    if (   pVBox->drmFD >= 0
     1404        && LoaderSymbol("drmModeGetResources") != NULL
     1405        && (pRes == drmModeGetResources(pVBox->drmFD)) != NULL)
     1406    {
     1407        drmModeFreeResources(pRes);
     1408        return;
     1409    }
     1410#endif
    14001411    vgaReg = &VGAHWPTR(pScrn)->SavedReg;
    14011412    vgaHWRestore(pScrn, vgaReg, VGA_SR_ALL);
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