summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvor Hewitt <ivor@ivor.org>2006-05-11 11:02:22 +0000
committerIvor Hewitt <ivor@ivor.org>2006-05-11 11:02:22 +0000
commit03bbabab0b5689481559ed4b8d531818b6564834 (patch)
tree19f1694750b0963ca24c72eb313ea64a9517e7f2
parentcd4bd6b41d743a9e5b941098bfa614303dbb505f (diff)
Apply xv abi compatibility patch from morgoth
-rw-r--r--ChangeLog20
-rw-r--r--configure.ac35
-rw-r--r--unichrome/via.h6
-rw-r--r--unichrome/via_accel.c1
-rw-r--r--unichrome/via_cursor.c1
-rw-r--r--unichrome/via_dri.c2
-rw-r--r--unichrome/via_driver.h7
-rw-r--r--unichrome/via_memcpy.c1
-rw-r--r--unichrome/via_memory.c1
-rw-r--r--unichrome/via_mode.c1
-rw-r--r--unichrome/via_shadow.c1
-rw-r--r--unichrome/via_swov.c1
-rw-r--r--unichrome/via_vbe.c1
-rw-r--r--unichrome/via_vgahw.c1
-rw-r--r--unichrome/via_video.c17
-rw-r--r--unichrome/via_xvmc.c17
16 files changed, 99 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index a9642ed3531d..e47bd56a3b06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2006-05-11 Ivor Hewitt <ivor-at-ivor-dot-org>
+
+ * configure.ac:
+ * unichrome/via.h:
+ * unichrome/via_accel.c:
+ * unichrome/via_cursor.c:
+ * unichrome/via_dri.c:
+ * unichrome/via_driver.h:
+ * unichrome/via_memcpy.c:
+ * unichrome/via_memory.c:
+ * unichrome/via_mode.c:
+ * unichrome/via_shadow.c:
+ * unichrome/via_swov.c:
+ * unichrome/via_vbe.c:
+ * unichrome/via_vgahw.c:
+ * unichrome/via_video.c:
+ * unichrome/via_xvmc.c:
+
+ - xorg xv ABI compatibility patch (Marcin Kurek)
+
2006-04-14 Ivor Hewitt <ivor-at-ivor-dot-org>
* libxvmc/Imakefile:
diff --git a/configure.ac b/configure.ac
index 5a9e516b52fa..5f822ec7824e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-video-openchrome],
- 0.1.33.1,
+ 0.2.1,
[https://www.openchrome.org/trac/report],
xf86-video-openchrome)
@@ -60,7 +60,7 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
XORG_DRIVER_CHECK_EXT(XV, videoproto)
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server xproto xvmc fontsproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XORG, [xorg-server xproto xvmc fontsproto libdrm $REQUIRED_MODULES])
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
# Checks for libraries.
@@ -113,6 +113,37 @@ AC_MSG_RESULT([$XVMC])
AM_CONDITIONAL(XVMC, test x$XVMC = xyes)
+AC_CHECK_FILE([${sdkdir}/xf86Module.h],
+ [have_xf86Module_h="yes"], [have_xf86Module_h="no"])
+
+# Check the ABI_VIDEODRV_VERSION
+SAVE_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+
+if test "x$have_xf86Module_h" = xyes; then
+AC_MSG_CHECKING([whether to use old Xv ABI])
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#include "xf86Module.h"
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 1
+#error Old Xv ABI
+#endif
+ ]])],
+ [OLD_XVABI=no],
+ [OLD_XVABI=yes])
+else
+ OLD_XVABI=yes
+ echo -n "xf86Module.h not found, "
+fi;
+
+CPPFLAGS="$SAVE_CPPFLAGS"
+
+if test "x$OLD_XVABI" = xyes; then
+ echo "yes."
+ AC_DEFINE(USE_OLD_XVABI, 1, [Use old Xv ABI (Pre 7.1RC1)])
+else
+ echo "no."
+fi
+
AC_SUBST([DRI_CFLAGS])
AC_SUBST([XORG_CFLAGS])
AC_SUBST([moduledir])
diff --git a/unichrome/via.h b/unichrome/via.h
index 4268842304c2..a00b54693540 100644
--- a/unichrome/via.h
+++ b/unichrome/via.h
@@ -25,6 +25,12 @@
#ifndef _VIA_H_
#define _VIA_H_ 1
+#include <errno.h>
+#include <string.h>
+#include <stdio.h>
+#include <math.h>
+#include <assert.h>
+
/* Video status flag */
#define VIDEO_MPEG_INUSE 0x08000000 /*Video is used with MPEG */
diff --git a/unichrome/via_accel.c b/unichrome/via_accel.c
index 733af4386cb5..a714933713a5 100644
--- a/unichrome/via_accel.c
+++ b/unichrome/via_accel.c
@@ -41,6 +41,7 @@
#include "xaarop.h"
#include "miline.h"
+#include "via.h"
#include "via_driver.h"
#include "via_regs.h"
#include "via_id.h"
diff --git a/unichrome/via_cursor.c b/unichrome/via_cursor.c
index 7308b0f0d625..35acb6661299 100644
--- a/unichrome/via_cursor.c
+++ b/unichrome/via_cursor.c
@@ -33,6 +33,7 @@
#include "config.h"
#endif
+#include "via.h"
#include "via_driver.h"
static void VIALoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src);
diff --git a/unichrome/via_dri.c b/unichrome/via_dri.c
index 76a22a01de7d..cb33b9c0271f 100644
--- a/unichrome/via_dri.c
+++ b/unichrome/via_dri.c
@@ -28,7 +28,6 @@
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86_ansic.h"
#include "xf86Priv.h"
#include "xf86PciInfo.h"
@@ -38,6 +37,7 @@
#include "GL/glxtokens.h"
#include "sarea.h"
+#include "via.h"
#include "via_driver.h"
#include "via_drm.h"
#include "via_dri.h"
diff --git a/unichrome/via_driver.h b/unichrome/via_driver.h
index fe89b12ceb72..4897f9850cd4 100644
--- a/unichrome/via_driver.h
+++ b/unichrome/via_driver.h
@@ -37,7 +37,6 @@
#include "vgaHW.h"
#include "xf86.h"
#include "xf86Resources.h"
-#include "xf86_ansic.h"
#include "xf86Pci.h"
#include "xf86PciInfo.h"
#include "xf86_OSproc.h"
@@ -94,8 +93,12 @@
#define DRIVER_NAME "via"
#define VERSION_MAJOR 0
-#define VERSION_MINOR 0
+#define VERSION_MINOR 2
+#ifdef USE_OLD_XVABI
#define PATCHLEVEL 0
+#else
+#define PATCHLEVEL 1
+#endif
#define VIA_VERSION ((VERSION_MAJOR<<24) | (VERSION_MINOR<<16) | PATCHLEVEL)
#define VIA_CURSOR_SIZE (4 * 1024)
diff --git a/unichrome/via_memcpy.c b/unichrome/via_memcpy.c
index aa490af08668..1a6d1b701e2b 100644
--- a/unichrome/via_memcpy.c
+++ b/unichrome/via_memcpy.c
@@ -25,6 +25,7 @@
#include "config.h"
#endif
+#include "via.h"
#include "via_driver.h"
#include "via_memcpy.h"
#include "compiler.h"
diff --git a/unichrome/via_memory.c b/unichrome/via_memory.c
index f90716492b91..a1961ae84640 100644
--- a/unichrome/via_memory.c
+++ b/unichrome/via_memory.c
@@ -27,7 +27,6 @@
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86_ansic.h"
#include "xf86fbman.h"
#include "via.h"
diff --git a/unichrome/via_mode.c b/unichrome/via_mode.c
index 7e57d37aba06..1c49b6319c81 100644
--- a/unichrome/via_mode.c
+++ b/unichrome/via_mode.c
@@ -34,6 +34,7 @@
#include "config.h"
#endif
+#include "via.h"
#include "via_driver.h"
#include "via_vgahw.h"
#include "via_id.h"
diff --git a/unichrome/via_shadow.c b/unichrome/via_shadow.c
index d70c261bb701..4b2d5873f49e 100644
--- a/unichrome/via_shadow.c
+++ b/unichrome/via_shadow.c
@@ -26,6 +26,7 @@
#include "config.h"
#endif
+#include "via.h"
#include "via_driver.h"
#include "shadowfb.h"
#include "servermd.h"
diff --git a/unichrome/via_swov.c b/unichrome/via_swov.c
index 8a1f099db0ff..37705186d3c0 100644
--- a/unichrome/via_swov.c
+++ b/unichrome/via_swov.c
@@ -29,7 +29,6 @@
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86_ansic.h"
#include "xf86fbman.h"
#include "via.h"
diff --git a/unichrome/via_vbe.c b/unichrome/via_vbe.c
index 248e52c096a0..ea928472d35a 100644
--- a/unichrome/via_vbe.c
+++ b/unichrome/via_vbe.c
@@ -31,6 +31,7 @@
#include "config.h"
#endif
+#include "via.h"
#include "via_driver.h"
#include "vbe.h"
#include "vbeModes.h"
diff --git a/unichrome/via_vgahw.c b/unichrome/via_vgahw.c
index 853b7f04d0a1..4dfdb5b43b04 100644
--- a/unichrome/via_vgahw.c
+++ b/unichrome/via_vgahw.c
@@ -32,7 +32,6 @@
#include "config.h"
#endif
-#include "xf86_ansic.h"
#include "compiler.h"
#include "xf86.h"
#include "via_driver.h" /* for HAVE_DEBUG */
diff --git a/unichrome/via_video.c b/unichrome/via_video.c
index c388dc37c177..a99ced386e7a 100644
--- a/unichrome/via_video.c
+++ b/unichrome/via_video.c
@@ -33,7 +33,6 @@
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86Resources.h"
-#include "xf86_ansic.h"
#include "compiler.h"
#include "xf86PciInfo.h"
#include "xf86Pci.h"
@@ -114,7 +113,11 @@ static int viaGetPortAttribute(ScrnInfoPtr, Atom, INT32 *, pointer);
static int viaSetPortAttribute(ScrnInfoPtr, Atom, INT32, pointer);
static int viaPutImage(ScrnInfoPtr, short, short, short, short, short, short,
short, short, int, unsigned char *, short, short, Bool,
+#ifdef USE_OLD_XVABI
RegionPtr, pointer);
+#else
+ RegionPtr, pointer, DrawablePtr);
+#endif
static void nv12Blit(unsigned char *nv12Chroma,
const unsigned char *uBuffer,
const unsigned char *vBuffer,
@@ -636,7 +639,11 @@ RegionsEqual(RegionPtr A, RegionPtr B)
static int
viaReputImage(ScrnInfoPtr pScrn,
- short drw_x, short drw_y, RegionPtr clipBoxes, pointer data)
+ short drw_x, short drw_y, RegionPtr clipBoxes, pointer data
+#ifndef USE_OLD_XVABI
+ , DrawablePtr pDraw
+#endif
+ )
{
DDUPDATEOVERLAY UpdateOverlay_Video;
@@ -1133,7 +1140,11 @@ viaPutImage(ScrnInfoPtr pScrn,
short src_w, short src_h,
short drw_w, short drw_h,
int id, unsigned char *buf,
- short width, short height, Bool sync, RegionPtr clipBoxes, pointer data)
+ short width, short height, Bool sync, RegionPtr clipBoxes, pointer data
+#ifndef USE_OLD_XVABI
+ , DrawablePtr pDraw
+#endif
+ )
{
VIAPtr pVia = VIAPTR(pScrn);
viaPortPrivPtr pPriv = (viaPortPrivPtr) data;
diff --git a/unichrome/via_xvmc.c b/unichrome/via_xvmc.c
index 008b7e03105a..ec4b41aa580e 100644
--- a/unichrome/via_xvmc.c
+++ b/unichrome/via_xvmc.c
@@ -30,7 +30,6 @@
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86Resources.h"
-#include "xf86_ansic.h"
#include "compiler.h"
#include "xf86PciInfo.h"
#include "xf86Pci.h"
@@ -122,7 +121,11 @@ static int viaXvMCInterceptXvAttribute(ScrnInfoPtr pScrn, Atom attribute,
INT32 value, pointer data);
static int viaXvMCInterceptPutImage(ScrnInfoPtr, short, short, short, short,
short, short, short, short, int, unsigned char *, short, short, Bool,
+#ifdef USE_OLD_XVABI
RegionPtr, pointer);
+#else
+ RegionPtr, pointer, DrawablePtr);
+#endif
static int viaXvMCInterceptXvGetAttribute(ScrnInfoPtr pScrn, Atom attribute,
INT32 * value, pointer data);
/*
@@ -940,7 +943,11 @@ viaXvMCInterceptPutImage(ScrnInfoPtr pScrn, short src_x, short src_y,
short drw_x, short drw_y, short src_w,
short src_h, short drw_w, short drw_h,
int id, unsigned char *buf, short width,
- short height, Bool sync, RegionPtr clipBoxes, pointer data)
+ short height, Bool sync, RegionPtr clipBoxes, pointer data
+#ifndef USE_OLD_XVABI
+ , DrawablePtr pDraw
+#endif
+ )
{
viaPortPrivPtr pPriv = (viaPortPrivPtr) data;
ViaXvMCXVPriv *vx = (ViaXvMCXVPriv *) pPriv->xvmc_priv;
@@ -997,7 +1004,11 @@ viaXvMCInterceptPutImage(ScrnInfoPtr pScrn, short src_x, short src_y,
}
}
return vx->PutImage(pScrn, src_x, src_y, drw_x, drw_y, src_w, src_h,
- drw_w, drw_h, id, buf, width, height, sync, clipBoxes, data);
+ drw_w, drw_h, id, buf, width, height, sync, clipBoxes, data
+#ifndef USE_OLD_XVABI
+ , pDraw
+#endif
+ );
}
unsigned long