summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-10-06 17:00:08 -0700
committerEric Anholt <eric@anholt.net>2008-10-06 17:26:43 -0700
commit3a4151b69daa478ac6edf042d604ee41e8429c0d (patch)
treefff1ba0ece972c7b593a01ae7f3bc9681d63aae5 /src
parent3621183cf4acef23414e8d69c34b1e587f52ec67 (diff)
Fix driver build against server 1.4.2.
This disables UXA and DRM modesetting pre-1.5, due to privates handling issues.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am9
-rw-r--r--src/i830_accel.c6
-rw-r--r--src/i830_driver.c2
-rw-r--r--src/i830_exa.c25
4 files changed, 29 insertions, 13 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 8966bd68..9b322151 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -32,14 +32,17 @@ SUBDIRS = xvmc bios_reader ch7017 ch7xxx ivch sil164 tfp410 $(REGDUMPER)
AM_CFLAGS = @WARN_CFLAGS@ @XORG_CFLAGS@ @DRM_CFLAGS@ @DRI_CFLAGS@ \
@PCIACCESS_CFLAGS@ @UXA_CFLAGS@ \
- @XMODES_CFLAGS@ -DI830_XV -DI830_USE_XAA -DI830_USE_EXA -DI830_USE_UXA
+ @XMODES_CFLAGS@ -DI830_XV -DI830_USE_XAA -DI830_USE_EXA
intel_drv_la_LTLIBRARIES = intel_drv.la
intel_drv_la_LDFLAGS = -module -avoid-version
intel_drv_ladir = @moduledir@/drivers
-intel_drv_la_LIBADD = -lm ../uxa/libuxa.la
+intel_drv_la_LIBADD = -lm -ldrm_intel
+if BUILD_UXA
+intel_drv_la_LIBADD += ../uxa/libuxa.la
+endif
if XSERVER_LIBPCIACCESS
-intel_drv_la_LIBADD += @PCIACCESS_LIBS@ @DRM_LIBS@ -ldrm_intel
+intel_drv_la_LIBADD += @PCIACCESS_LIBS@ @DRM_LIBS@
endif
XMODE_SRCS=\
diff --git a/src/i830_accel.c b/src/i830_accel.c
index 386e653f..a9b30059 100644
--- a/src/i830_accel.c
+++ b/src/i830_accel.c
@@ -331,9 +331,13 @@ I830AccelInit(ScreenPtr pScreen)
pI830->accel_max_y = 2048;
}
switch (pI830->accel) {
-#ifdef I830_USE_UXA
case ACCEL_UXA:
+#ifdef I830_USE_UXA
return i830_uxa_init(pScreen);
+#else
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "UXA not built in, falling back to EXA.\n");
+ return I830EXAInit(pScreen);
#endif
#ifdef I830_USE_EXA
case ACCEL_EXA:
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 3a2a9a40..933c8b87 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2693,8 +2693,10 @@ I830BlockHandler(int i,
pI830->need_mi_flush = FALSE;
}
+#ifdef I830_USE_UXA
if (pI830->accel == ACCEL_UXA)
i830_uxa_block_handler (pScreen);
+#endif
/*
* Check for FIFO underruns at block time (which amounts to just
* periodically). If this happens, it means our DSPARB or some other
diff --git a/src/i830_exa.c b/src/i830_exa.c
index fd29df11..e03f2de1 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -726,14 +726,6 @@ I830EXAInit(ScreenPtr pScreen)
return TRUE;
}
-static int uxa_pixmap_index;
-
-static void
-i830_uxa_set_pixmap_bo (PixmapPtr pixmap, dri_bo *bo)
-{
- dixSetPrivate(&pixmap->devPrivates, &uxa_pixmap_index, bo);
-}
-
dri_bo *
i830_get_pixmap_bo(PixmapPtr pixmap)
{
@@ -741,17 +733,31 @@ i830_get_pixmap_bo(PixmapPtr pixmap)
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
I830Ptr i830 = I830PTR(scrn);
+#ifdef I830_USE_UXA
if (i830->accel == ACCEL_UXA) {
return dixLookupPrivate(&pixmap->devPrivates, &uxa_pixmap_index);
- } else if (i830->accel == ACCEL_EXA) {
+ }
+#endif
+#ifdef XF86DRM_MODE
+ if (i830->accel == ACCEL_EXA) {
struct i830_exa_pixmap_priv *driver_priv =
exaGetPixmapDriverPrivate(pixmap);
return driver_priv ? driver_priv->bo : NULL;
}
+#endif
return NULL;
}
+#if defined(I830_USE_UXA)
+static int uxa_pixmap_index;
+
+static void
+i830_uxa_set_pixmap_bo (PixmapPtr pixmap, dri_bo *bo)
+{
+ dixSetPrivate(&pixmap->devPrivates, &uxa_pixmap_index, bo);
+}
+
static Bool
i830_uxa_prepare_access (PixmapPtr pixmap, uxa_access_t access)
{
@@ -937,6 +943,7 @@ i830_uxa_init (ScreenPtr pScreen)
return TRUE;
}
+#endif /* I830_USE_UXA */
#ifdef XF86DRI