[Intel-gfx] [PATCH 11/14] Remove XF86DRM_MODE.
Eric Anholt
eric at anholt.net
Wed Apr 22 01:13:33 CEST 2009
We now depend on server 1.6 and current libdrm, so no need to ifdef it.
---
configure.ac | 7 -------
src/drmmode_display.c | 3 ---
src/i830.h | 2 --
src/i830_dri.c | 7 +------
src/i830_driver.c | 11 -----------
5 files changed, 1 insertions(+), 29 deletions(-)
diff --git a/configure.ac b/configure.ac
index 18fe983..14a1c6b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,13 +163,6 @@ if test "$DRI" = yes; then
AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
fi
-dnl Server 1.5's set_mode_major required for DRM_MODE.
-PKG_CHECK_MODULES(DRM_MODE, [xorg-server >= 1.5],
- [DRM_MODE=yes], [DRM_MODE=no])
-if test "x$DRM_MODE" = xyes; then
- AC_DEFINE(XF86DRM_MODE,1,[DRM kernel modesetting])
-fi
-
AM_CONDITIONAL(VIDEO_DEBUG, test x$VIDEO_DEBUG = xyes)
if test "$VIDEO_DEBUG" = yes; then
AC_DEFINE(VIDEO_DEBUG,1,[Enable debug support])
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 298c471..15ffc29 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -31,7 +31,6 @@
#include "xorgVersion.h"
-#ifdef XF86DRM_MODE
#include "i830.h"
#include "intel_bufmgr.h"
#include "xf86drmMode.h"
@@ -921,5 +920,3 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
return TRUE;
}
-
-#endif
diff --git a/src/i830.h b/src/i830.h
index 386ac03..a030df6 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -684,9 +684,7 @@ i830_pipe_a_require_deactivate (ScrnInfoPtr scrn);
Bool I830DRI2ScreenInit(ScreenPtr pScreen);
void I830DRI2CloseScreen(ScreenPtr pScreen);
-#ifdef XF86DRM_MODE
extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp);
-#endif
extern Bool I830AccelInit(ScreenPtr pScreen);
extern void I830SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir,
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 7a41fae..6b3eddb 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -262,15 +262,10 @@ Bool I830DRI2ScreenInit(ScreenPtr pScreen)
pI830->PciInfo->dev,
pI830->PciInfo->func);
- info.fd = -1;
-
-#ifdef XF86DRM_MODE
/* Use the already opened (master) fd from modesetting */
if (pI830->use_drm_mode)
info.fd = pI830->drmSubFD;
-#endif
-
- if (info.fd < 0)
+ else
info.fd = drmOpen("i915", buf);
if (info.fd < 0) {
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 16dbed0..1a346eb 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -208,10 +208,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <sys/ioctl.h>
#include "i915_drm.h"
-
-#ifdef XF86DRM_MODE
#include <xf86drmMode.h>
-#endif
#define BIT(x) (1 << (x))
#define MAX(a,b) ((a) > (b) ? (a) : (b))
@@ -1179,7 +1176,6 @@ i830SetHotkeyControl(ScrnInfoPtr pScrn, int mode)
pI830->writeControl(pI830, GRX, 0x18, gr18);
}
-#ifdef XF86DRM_MODE
/*
* DRM mode setting Linux only at this point... later on we could
* add a wrapper here.
@@ -1210,9 +1206,6 @@ static Bool i830_kernel_mode_enabled(ScrnInfoPtr pScrn)
return TRUE;
}
-#else
-#define i830_kernel_mode_enabled(x) FALSE
-#endif
static Bool
i830_detect_chipset(ScrnInfoPtr pScrn)
@@ -1623,7 +1616,6 @@ I830AccelMethodInit(ScrnInfoPtr pScrn)
static Bool
I830DrmModeInit(ScrnInfoPtr pScrn)
{
-#ifdef XF86DRM_MODE
I830Ptr pI830 = I830PTR(pScrn);
char *bus_id;
int ret;
@@ -1654,7 +1646,6 @@ I830DrmModeInit(ScrnInfoPtr pScrn)
pI830->directRenderingType = DRI_NONE;
i830_init_bufmgr(pScrn);
-#endif
return TRUE;
}
@@ -2770,10 +2761,8 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
}
if (pI830->use_drm_mode) {
-#ifdef XF86DRM_MODE
pI830->stolen_size = 0;
pScrn->videoRam = INT_MAX / KB(1);
-#endif
} else {
I830AdjustMemory(pScreen);
}
--
1.6.2.2
More information about the Intel-gfx
mailing list