VirtualBox

Changeset 59194 in vbox


Ignore:
Timestamp:
Dec 18, 2015 6:59:14 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
104817
Message:

bugref:8087: Additions/x11: support non-root X server: remove DRI support from the X.Org vboxvideo driver as it is no longer needed now that we are replacing libGL.so.1 fully.

Location:
trunk/src/VBox/Additions/x11/vboxvideo
Files:
2 deleted
3 edited

Legend:

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

    r58944 r59194  
    2727vboxvideo_15_DEFS := \
    2828        $(vboxvideo_13_DEFS) NO_ANSIC PCIACCESS XSERVER_LIBPCIACCESS _XORG_SERVER_H_ _DIX_CONFIG_H_
    29 if1of ($(KBUILD_TARGET), linux solaris)
    30  vboxvideo_15_DEFS += \
    31         VBOX_DRI
    32 endif
    3329vboxvideo_xorg_INCS = \
    34         $(VBOX_PATH_X11_ROOT)/dri2proto-2.8 \
    3530        $(VBOX_PATH_X11_ROOT)/fontsproto-2.1.0 \
    3631        $(VBOX_PATH_X11_ROOT)/glproto-1.4.10 \
     
    3833        $(VBOX_PATH_X11_ROOT)/inputproto-1.9.99.902 \
    3934        $(VBOX_PATH_X11_ROOT)/kbproto-1.0.6 \
    40         $(VBOX_PATH_X11_ROOT)/libdrm-2.4.13 \
    4135        $(VBOX_PATH_X11_ROOT)/libpciaccess-0.10.8 \
    4236        $(VBOX_PATH_X11_ROOT)/libXext-1.3.1 \
     
    4539        $(VBOX_PATH_X11_ROOT)/renderproto-0.11 \
    4640        $(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \
    47         $(VBOX_PATH_X11_ROOT)/xf86driproto-2.1.0 \
    4841        $(VBOX_PATH_X11_ROOT)/xproto-7.0.18
    4942
     
    194187vboxvideo_drv_15_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
    195188vboxvideo_drv_15_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=10503000
    196 if1of ($(KBUILD_TARGET), linux solaris)
    197  vboxvideo_drv_15_DEFS += \
    198         VBOX_DRI_OLD
    199 endif
    200189vboxvideo_drv_15_INCS = \
    201190        $(vboxvideo_xorg_INCS) \
     
    203192vboxvideo_drv_15_INCS += $(PATH_ROOT)/src/VBox/Runtime/include
    204193vboxvideo_drv_15_SOURCES  = $(vboxvideo_drv_13_SOURCES)
    205 if1of ($(KBUILD_TARGET), linux solaris)
    206  vboxvideo_drv_15_SOURCES += \
    207         vboxvideo_dri.c
    208 endif
    209194
    210195
     
    216201vboxvideo_drv_16_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
    217202vboxvideo_drv_16_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=10600000
    218 if1of ($(KBUILD_TARGET), linux solaris)
    219  vboxvideo_drv_16_DEFS += \
    220         VBOX_DRI_OLD
    221 endif
    222203vboxvideo_drv_16_INCS = \
    223204        $(vboxvideo_xorg_INCS) \
     
    239220vboxvideo_drv_17_INCS += $(PATH_ROOT)/src/VBox/Runtime/include
    240221vboxvideo_drv_17_SOURCES := $(vboxvideo_drv_13_SOURCES)
    241 if1of ($(KBUILD_TARGET), linux solaris)
    242  vboxvideo_drv_17_SOURCES += \
    243         vboxvideo_dri2.c
    244 endif
    245222
    246223
     
    409386        $(PATH_ROOT)/src/VBox/Runtime/include \
    410387        /usr/include/x11 \
    411         /usr/include/X11/dri \
    412         /usr/include/libdrm \
    413388        /usr/include/xorg \
    414389        /usr/include/pixman-1
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c

    r58130 r59194  
    7979/* VGA hardware functions for setting and restoring text mode */
    8080#include "vgaHW.h"
    81 #ifdef VBOX_DRI
    82 # include "xf86drm.h"
    83 # include "xf86drmMode.h"
    84 #endif
    8581#ifdef VBOXVIDEO_13
    8682/* X.org 1.3+ mode setting */
     
    286282    pScrn->displayWidth = pScrn->virtualX = adjustedWidth;
    287283    pScrn->virtualY = height;
    288 #ifdef VBOX_DRI_OLD
    289     if (pVBox->useDRI)
    290         VBOXDRIUpdateStride(pScrn, pVBox);
    291 #endif
    292284    return TRUE;
    293285}
     
    863855        return FALSE;
    864856
    865 #ifdef VBOX_DRI_OLD
    866     /* Load the dri module. */
    867     if (!xf86LoadSubModule(pScrn, "dri"))
    868         return FALSE;
    869 #else
    870 # ifdef VBOX_DRI
    871     /* Load the dri module. */
    872     if (!xf86LoadSubModule(pScrn, "dri2"))
    873         return FALSE;
    874 # endif
    875 #endif
    876 
    877857#ifndef PCIACCESS
    878858    if (pVBox->pEnt->location.type != BUS_PCI)
     
    947927#endif /* !VBOXVIDEO_13 */
    948928
    949     /* Needed before we initialise DRI. */
    950929    pScrn->displayWidth = pScrn->virtualX;
    951930
     
    12081187    if (!miSetPixmapDepths())
    12091188        return (FALSE);
    1210 
    1211 #ifdef VBOX_DRI
    1212     pVBox->useDRI = VBOXDRIScreenInit(pScrn, pScreen, pVBox);
    1213 # ifndef VBOX_DRI_OLD  /* DRI2 */
    1214     if (pVBox->drmFD >= 0)
    1215         /* Tell the kernel driver, if present, that we are taking over. */
    1216         drmIoctl(pVBox->drmFD, VBOXVIDEO_IOCTL_DISABLE_HGSMI, NULL);
    1217 # endif
    1218 #endif
    12191189
    12201190    if (!fbScreenInit(pScreen, pVBox->base,
     
    13671337                   "Unable to start the VirtualBox mouse pointer integration with the host system.\n");
    13681338
    1369 #ifdef VBOX_DRI_OLD
    1370     if (pVBox->useDRI)
    1371         pVBox->useDRI = VBOXDRIFinishScreenInit(pScreen);
    1372 #endif
    1373 
    13741339    return (TRUE);
    13751340}
     
    13901355    TRACE_ENTRY();
    13911356    updateGraphicsCapability(pScrn, TRUE);
    1392 #ifdef VBOX_DRI_OLD
    1393     if (pVBox->useDRI)
    1394         DRIUnlock(xf86ScrnToScreen(pScrn));
    1395 #elif defined(VBOX_DRI)  /* DRI2 */
    1396     if (pVBox->drmFD >= 0)
    1397     {
    1398         /* Tell the kernel driver, if present, that we are taking over. */
    1399         drmSetMaster(pVBox->drmFD);
    1400     }
    1401 #endif
    14021357    vbvxSetUpHGSMIHeapInGuest(pVBox, pScrn->videoRam * 1024);
    14031358    vboxEnableVbva(pScrn);
     
    14331388    vboxDisableVbva(pScrn);
    14341389    vbvxClearVRAM(pScrn, ((size_t)pScrn->virtualX) * pScrn->virtualY * (pScrn->bitsPerPixel / 8), 0);
    1435 #ifdef VBOX_DRI_OLD
    1436     if (pVBox->useDRI)
    1437         DRILock(xf86ScrnToScreen(pScrn), 0);
    1438 #elif defined(VBOX_DRI)  /* DRI2 */
    1439     if (pVBox->drmFD >= 0)
    1440         drmDropMaster(pVBox->drmFD);
    1441 #endif
    14421390    VBOXRestoreMode(pScrn);
    14431391    TRACE_EXIT();
     
    14481396    ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
    14491397    VBOXPtr pVBox = VBOXGetRec(pScrn);
    1450 #if defined(VBOX_DRI) && !defined(VBOX_DRI_OLD)  /* DRI2 */
    1451     BOOL fRestore = TRUE;
    1452 #endif
    14531398    BOOL ret;
    14541399
     
    14641409        vbvxClearVRAM(pScrn, ((size_t)pScrn->virtualX) * pScrn->virtualY * (pScrn->bitsPerPixel / 8), 0);
    14651410    }
    1466 #ifdef VBOX_DRI
    1467 # ifndef VBOX_DRI_OLD  /* DRI2 */
    1468     if (   pVBox->drmFD >= 0
    1469         /* Tell the kernel driver, if present, that we are going away. */
    1470         && drmIoctl(pVBox->drmFD, VBOXVIDEO_IOCTL_ENABLE_HGSMI, NULL) >= 0)
    1471         fRestore = false;
    1472 # endif
    1473     if (pVBox->useDRI)
    1474         VBOXDRICloseScreen(pScreen, pVBox);
    1475     pVBox->useDRI = false;
    1476 #endif
    1477 #if defined(VBOX_DRI) && !defined(VBOX_DRI_OLD)  /* DRI2 */
    1478     if (fRestore)
    1479 #endif
    1480         if (pScrn->vtSema)
    1481             VBOXRestoreMode(pScrn);
     1411    if (pScrn->vtSema)
     1412        VBOXRestoreMode(pScrn);
    14821413    if (pScrn->vtSema)
    14831414        VBOXUnmapVidMem(pScrn);
     
    16021533    VBOXPtr pVBox = VBOXGetRec(pScrn);
    16031534    vgaRegPtr vgaReg;
    1604 #ifdef VBOX_DRI
    1605     drmModeResPtr pRes;
    1606 #endif
    16071535
    16081536    TRACE_ENTRY();
    1609 #ifdef VBOX_DRI
    1610     /* Do not try to re-set the VGA state if a mode-setting driver is loaded. */
    1611     if (   pVBox->drmFD >= 0
    1612         && LoaderSymbol("drmModeGetResources") != NULL
    1613         && (pRes = drmModeGetResources(pVBox->drmFD)) != NULL)
    1614     {
    1615         drmModeFreeResources(pRes);
    1616         return;
    1617     }
    1618 #endif
    16191537    vgaReg = &VGAHWPTR(pScrn)->SavedReg;
    16201538    vgaHWRestore(pScrn, vgaReg, VGA_SR_ALL);
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.h

    r58130 r59194  
    112112#define VBOX_DRIVER_NAME        "vboxvideo"
    113113
    114 #ifdef VBOX_DRI_OLD
    115 /* DRI support */
    116 #define _XF86DRI_SERVER_
    117 /* Hack to work around a libdrm header which is broken on Solaris */
    118 #define u_int64_t uint64_t
    119 /* Get rid of a warning due to a broken header file */
    120 enum drm_bo_type { DRM_BO_TYPE };
    121 #include "dri.h"
    122 #undef u_int64_t
    123 #include "sarea.h"
    124 #include "GL/glxint.h"
    125 
    126 /* For some reason this is not in the header files. */
    127 extern void GlxSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs,
    128                                 void **configprivs);
    129 #endif
    130 
    131114#define VBOX_VIDEO_MAJOR  VBOX_VERSION_MAJOR
    132115#define VBOX_VIDEO_MINOR  VBOX_VERSION_MINOR
    133 #define VBOX_DRM_DRIVER_NAME  "vboxvideo"  /* For now, as this driver is basically a stub. */
    134 #define VBOX_DRI_DRIVER_NAME  "vboxvideo"  /* For starters. */
    135 #define VBOX_MAX_DRAWABLES    256          /* At random. */
    136116
    137117#define VBOX_VIDEO_MIN_SIZE    64
     
    226206    /** Unrestricted horizontal resolution flag. */
    227207    Bool fAnyX;
    228 #ifdef VBOX_DRI
    229     Bool useDRI;
    230 #ifdef VBOX_DRI_OLD
    231     int cVisualConfigs;
    232     __GLXvisualConfig *pVisualConfigs;
    233     DRIInfoRec *pDRIInfo;
    234 # endif
    235     int drmFD;
    236 #endif
    237208} VBOXRec, *VBOXPtr;
    238209
     
    287258extern void vbvxCleanUpLinuxACPI(ScreenPtr pScreen);
    288259
    289 /* DRI stuff */
    290 extern Bool VBOXDRIScreenInit(ScrnInfoPtr pScrn, ScreenPtr pScreen,
    291                               VBOXPtr pVBox);
    292 extern Bool VBOXDRIFinishScreenInit(ScreenPtr pScreen);
    293 extern void VBOXDRIUpdateStride(ScrnInfoPtr pScrn, VBOXPtr pVBox);
    294 extern void VBOXDRICloseScreen(ScreenPtr pScreen, VBOXPtr pVBox);
    295 
    296260#endif /* _VBOXVIDEO_H_ */
    297261
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