always enable DRI support

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-12-31 17:24:13 +01:00
committed by Enrico Weigelt
parent 3835502140
commit 43578845d8
5 changed files with 3 additions and 66 deletions

View File

@@ -53,11 +53,6 @@ AC_ARG_WITH(xorg-module-dir,
[moduledir="$withval"],
[moduledir=`$PKG_CONFIG --variable=moduledir xorg-server`])
AC_ARG_ENABLE(dri, AS_HELP_STRING([--disable-dri],
[Disable DRI support [[default=auto]]]),
[DRI="$enableval"],
[DRI=auto])
# Store the list of server defined optional extensions in REQUIRED_MODULES
XORG_DRIVER_CHECK_EXT(XINERAMA, xineramaproto)
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
@@ -71,36 +66,7 @@ PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1])
sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
# Checks for libraries.
if test "x$DRI" = xauto; then
AC_CHECK_FILE([${sdkdir}/dri.h],
[have_dri_h="yes"], [have_dri_h="no"])
AC_CHECK_FILE([${sdkdir}/sarea.h],
[have_sarea_h="yes"], [have_sarea_h="no"])
AC_CHECK_FILE([${sdkdir}/dristruct.h],
[have_dristruct_h="yes"], [have_dristruct_h="no"])
fi
AC_MSG_CHECKING([whether to include DRI support])
if test "x$DRI" = xauto; then
if test "x$have_dri_h" = xyes && \
test "x$have_sarea_h" = xyes && \
test "x$have_dristruct_h" = xyes; then
DRI="yes"
else
DRI="no"
fi
fi
AC_MSG_RESULT([$DRI])
AM_CONDITIONAL(DRI, test "x$DRI" = xyes)
if test "x$DRI" = xyes; then
PKG_CHECK_MODULES(DRI, [libdrm >= 2.0 xf86driproto])
AC_DEFINE(XF86DRI,1,[Enable DRI driver support])
AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
fi
PKG_CHECK_MODULES(DRI, [libdrm >= 2.0 xf86driproto])
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
AC_SUBST([moduledir])

View File

@@ -67,10 +67,6 @@ xgi_drv_la_SOURCES = \
xgi_video.c \
xgi_video.h \
xgi_videohw.c \
xgi_videohw.h
if DRI
xgi_drv_la_SOURCES += \
xgi_videohw.h \
xgi_dri.c \
xgi_dri.h
endif
xgi_dri.h

View File

@@ -156,8 +156,6 @@ extern Bool g_bRunTimeDebug;
#include "compat-api.h"
#ifdef XF86DRI
#include "xf86drm.h"
#include "sarea.h"
@@ -165,7 +163,6 @@ extern Bool g_bRunTimeDebug;
#include "dri.h"
#include "xgi_dri.h"
#endif
#define VENDOR_ID(p) (p)->vendor_id
#define DEVICE_ID(p) (p)->device_id
@@ -603,7 +600,6 @@ typedef struct {
*/
unsigned int agpWantedPages;
#ifdef XF86DRI
unsigned long agpHandle;
unsigned long agpAddr;
unsigned char *agpBase;
@@ -615,7 +611,6 @@ typedef struct {
xgiRegion agp;
Bool irqEnabled;
int irq;
#endif
unsigned long DRIheapstart, DRIheapend;
void (*RenderCallback)(ScrnInfoPtr);
@@ -656,11 +651,9 @@ typedef struct {
*/
Bool loadDRI;
#ifdef XF86DRI
Bool directRenderingEnabled;
DRIInfoPtr pDRIInfo;
int drmSubFD;
#endif
HW_DEVICE_EXTENSION xgi_HwDevExt; /* For new mode switching code */
XF86VideoAdaptorPtr adaptor;

View File

@@ -84,9 +84,7 @@
#include <X11/extensions/Xv.h>
#endif
#ifdef XF86DRI
#include "dri.h"
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -3447,7 +3445,6 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags)
}
/* Load the dri module if requested. */
#ifdef XF86DRI
if(pXGI->loadDRI) {
if (!xf86LoadSubModule(pScrn, "dri")) {
if (!IS_DUAL_HEAD(pXGI))
@@ -3455,8 +3452,6 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags)
"Remove >Load \"dri\"< from the Module section of your XF86Config file\n");
}
}
#endif
/* Now load and initialize VBE module for VESA and mode restoring. */
if (pXGI->pVbe) {
@@ -4035,7 +4030,6 @@ XGIScreenInit(ScreenPtr pScreen, int argc, char **argv)
pXGI->cmdQueueLen = 0; /* Force an EngineIdle() at start */
#ifdef XF86DRI
if(pXGI->loadDRI) {
/* No DRI in dual head mode */
if (IS_DUAL_HEAD(pXGI)) {
@@ -4054,7 +4048,6 @@ XGIScreenInit(ScreenPtr pScreen, int argc, char **argv)
PDEBUG(ErrorF("--- DRI supported \n"));
}
}
#endif
/*
* Call the framebuffer layer's ScreenInit function, and fill in other
@@ -4179,7 +4172,6 @@ XGIScreenInit(ScreenPtr pScreen, int argc, char **argv)
}
#endif
#ifdef XF86DRI
if (pXGI->directRenderingEnabled) {
/* Now that mi, drm and others have done their thing,
* complete the DRI setup.
@@ -4193,7 +4185,6 @@ XGIScreenInit(ScreenPtr pScreen, int argc, char **argv)
/* TODO */
/* XGISetLFBConfig(pXGI); */
}
#endif
/* Wrap some funcs and setup remaining SD flags */
@@ -4384,11 +4375,9 @@ XGIEnterVT(ScrnInfoPtr pScrn)
XGIAdjustFrame(pScrn, pScrn->frameX0, pScrn->frameY0);
#ifdef XF86DRI
if (pXGI->directRenderingEnabled) {
DRIUnlock(xf86ScrnToScreen(pScrn));
}
#endif
if ((!IS_DUAL_HEAD(pXGI) || !IS_SECOND_HEAD(pXGI)) && (pXGI->ResetXv)) {
(pXGI->ResetXv) (pScrn);
@@ -4407,7 +4396,6 @@ XGILeaveVT(ScrnInfoPtr pScrn)
{
vgaHWPtr hwp = VGAHWPTR(pScrn);
XGIPtr pXGI = XGIPTR(pScrn);
#ifdef XF86DRI
ScreenPtr pScreen;
PDEBUG(ErrorF("XGILeaveVT()\n"));
@@ -4415,7 +4403,6 @@ XGILeaveVT(ScrnInfoPtr pScrn)
pScreen = xf86ScrnToScreen(pScrn);
DRILock(pScreen, 0);
}
#endif
if (IS_DUAL_HEAD(pXGI) && IS_SECOND_HEAD(pXGI))
return;
@@ -4451,13 +4438,10 @@ XGICloseScreen(ScreenPtr pScreen)
vgaHWPtr hwp = VGAHWPTR(pScrn);
XGIPtr pXGI = XGIPTR(pScrn);
#ifdef XF86DRI
if (pXGI->directRenderingEnabled) {
XGIDRICloseScreen(pScreen);
pXGI->directRenderingEnabled = FALSE;
}
#endif
if (pScrn->vtSema) {
if (pXGI->CursorInfoPtr

View File

@@ -516,7 +516,6 @@ xgiOptions(ScrnInfoPtr pScrn)
if(!xf86GetOptValBool(pXGI->Options, OPTION_RUNTIME_DEBUG, &g_bRunTimeDebug))
g_bRunTimeDebug=0;
#ifdef XF86DRI
/* DRI */
from = X_DEFAULT;
if(xf86GetOptValBool(pXGI->Options, OPTION_DRI, &pXGI->loadDRI)) {
@@ -542,7 +541,6 @@ xgiOptions(ScrnInfoPtr pScrn)
}
}
}
#endif
/* NoXVideo
* Set this to TRUE to disable Xv hardware video acceleration