summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-07-17 09:17:31 +1000
committerDave Airlie <airlied@linux.ie>2007-07-17 09:17:31 +1000
commit1e169be25b2e4ab34afd4b8ae8ae0041f6069125 (patch)
tree496cc552b9b398e41547c645fad8530ab25a4e7e
parentff2be3995d33f9e4b7f63b380f166b6168c9b9c6 (diff)
intel: don't try and use TTM memory manager with old libdrm interface
I probably need to release a libdrm with this interface in it now..
-rw-r--r--configure.ac4
-rw-r--r--src/i830.h6
-rw-r--r--src/i830_driver.c82
3 files changed, 2 insertions, 90 deletions
diff --git a/configure.ac b/configure.ac
index ec303762..48c8cb2b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,7 +85,7 @@ XORG_DRIVER_CHECK_EXT(XF86DRI, xextproto x11)
XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server xproto xvmc fontsproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XORG, [pixman xorg-server xproto xvmc fontsproto $REQUIRED_MODULES])
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.5.0], have_pciaccess=yes, have_pciaccess=no)
@@ -183,7 +183,7 @@ if test "$DRI" = yes; then
PKG_CHECK_MODULES(DRI, [libdrm xf86driproto])
AC_DEFINE(XF86DRI,1,[Enable DRI driver support])
AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
- PKG_CHECK_MODULES(DRI_MM, [libdrm >= 2.2],[DRI_MM=yes], [DRI_MM=no])
+ PKG_CHECK_MODULES(DRI_MM, [libdrm >= 2.3.2],[DRI_MM=yes], [DRI_MM=no])
if test "x$DRI_MM" = xyes; then
AC_DEFINE(XF86DRI_MM,1,[Extended DRI memory management])
fi
diff --git a/src/i830.h b/src/i830.h
index b85ee269..aa2b240c 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -750,10 +750,4 @@ extern const int I830CopyROP[16];
#define _845_DRAM_RW_CONTROL 0x90
#define DRAM_WRITE 0x33330000
-/*
- * Xserver MM compatibility. Remove code guarded by this when the
- * XServer contains the libdrm mm code
- */
-#undef XSERVER_LIBDRM_MM
-
#endif /* _I830_H_ */
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 51a17f04..3e90eeab 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2116,83 +2116,6 @@ IntelEmitInvarientState(ScrnInfoPtr pScrn)
}
}
-#ifdef XF86DRI_MM
-#ifndef XSERVER_LIBDRM_MM
-
-static int
-I830DrmMMInit(int drmFD, unsigned long pageOffs, unsigned long pageSize,
- unsigned memType)
-{
-
- drm_mm_init_arg_t arg;
- int ret;
-
- memset(&arg, 0, sizeof(arg));
- arg.req.op = mm_init;
- arg.req.p_offset = pageOffs;
- arg.req.p_size = pageSize;
- arg.req.mem_type = memType;
-
- ret = ioctl(drmFD, DRM_IOCTL_MM_INIT, &arg);
-
- if (ret)
- return -errno;
-
- return 0;
-
-}
-
-static int
-I830DrmMMTakedown(int drmFD, unsigned memType)
-{
- drm_mm_init_arg_t arg;
- int ret = 0;
-
- memset(&arg, 0, sizeof(arg));
- arg.req.op = mm_takedown;
- arg.req.mem_type = memType;
- if (ioctl(drmFD, DRM_IOCTL_MM_INIT, &arg)) {
- ret = -errno;
- }
-
- return ret;
-}
-
-static int I830DrmMMLock(int fd, unsigned memType)
-{
- drm_mm_init_arg_t arg;
- int ret;
-
- memset(&arg, 0, sizeof(arg));
- arg.req.op = mm_lock;
- arg.req.mem_type = memType;
-
- do{
- ret = ioctl(fd, DRM_IOCTL_MM_INIT, &arg);
- } while (ret && errno == EAGAIN);
-
- return ret;
-}
-
-static int I830DrmMMUnlock(int fd, unsigned memType)
-{
- drm_mm_init_arg_t arg;
- int ret;
-
- memset(&arg, 0, sizeof(arg));
- arg.req.op = mm_unlock;
- arg.req.mem_type = memType;
-
- do{
- ret = ioctl(fd, DRM_IOCTL_MM_INIT, &arg);
- } while (ret && errno == EAGAIN);
-
- return ret;
-}
-
-#endif
-#endif /* XF86DRI_MM */
-
static Bool
I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
{
@@ -2866,13 +2789,8 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
unsigned long aperStart = ROUND_TO(pI830->memory_manager->offset,
GTT_PAGE_SIZE) / GTT_PAGE_SIZE;
-#ifndef XSERVER_LIBDRM_MM
- if (I830DrmMMInit(pI830->drmSubFD, aperStart, aperEnd - aperStart,
- DRM_BO_MEM_TT)) {
-#else
if (drmMMInit(pI830->drmSubFD, aperStart, aperEnd - aperStart,
DRM_BO_MEM_TT)) {
-#endif
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Could not initialize the DRM memory manager.\n");