Fix driver build against server 1.4.2.
This disables UXA and DRM modesetting pre-1.5, due to privates handling issues.
This commit is contained in:
parent
3621183cf4
commit
3a4151b69d
|
|
@ -19,7 +19,12 @@
|
|||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
SUBDIRS = uxa src man
|
||||
|
||||
if BUILD_UXA
|
||||
UXA_DIR = uxa
|
||||
endif
|
||||
|
||||
SUBDIRS = $(UXA_DIR) src man
|
||||
|
||||
EXTRA_DIST = README
|
||||
DISTCLEANFILES = doltcompile
|
||||
|
|
|
|||
|
|
@ -84,6 +84,8 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
|
|||
|
||||
# Checks for pkg-config packages
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto $REQUIRED_MODULES])
|
||||
PKG_CHECK_MODULES(UXA, [xorg-server >= 1.5], [BUILD_UXA=yes], [BUILD_UXA=no])
|
||||
|
||||
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
|
||||
drm_cflags=$(pkg-config --cflags libdrm)
|
||||
|
||||
|
|
@ -108,6 +110,8 @@ if test x$DRI != xno; then
|
|||
AC_CHECK_HEADER(xf86drmMode.h,
|
||||
[DRM_MODE=yes],[DRM_MODE=no]
|
||||
[#include "stdint.h"])
|
||||
dnl exaGetPixmapDriverPrivate required for DRM_MODE.
|
||||
PKG_CHECK_MODULES(DRM_MODE, [xorg-server >= 1.5], [], [DRM_MODE=no])
|
||||
if test "x$DRM_MODE" = xyes; then
|
||||
AC_DEFINE(XF86DRM_MODE,1,[DRM kernel modesetting])
|
||||
fi
|
||||
|
|
@ -124,6 +128,11 @@ if test x$DRI = xauto; then
|
|||
fi
|
||||
AC_MSG_RESULT([$DRI])
|
||||
|
||||
AM_CONDITIONAL(BUILD_UXA, test $BUILD_UXA = yes)
|
||||
if test "$BUILD_UXA" = yes; then
|
||||
AC_DEFINE(I830_USE_UXA, 1, [UMA Acceleration Architecture support])
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(xf86Modes.h,[XMODES=yes],[XMODES=no],[#include "xorg-server.h"])
|
||||
AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
|
||||
[XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],
|
||||
|
|
|
|||
|
|
@ -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=\
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue