mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
new package:
- add libva package
This commit is contained in:
parent
531caf0980
commit
94be52d05e
26
packages/multimedia/libva/build
Executable file
26
packages/multimedia/libva/build
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
$SCRIPTS/build libX11
|
||||
$SCRIPTS/build libXext
|
||||
$SCRIPTS/build libXfixes
|
||||
$SCRIPTS/build $LIBDRM
|
||||
$SCRIPTS/build $MESA
|
||||
|
||||
cd $PKG_BUILD
|
||||
./configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=/usr \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
--with-gnu-ld \
|
||||
--enable-glx \
|
||||
--enable-dummy-driver \
|
||||
--enable-i965-driver \
|
||||
--with-drivers-path="/usr/lib/va" \
|
||||
|
||||
make
|
||||
|
||||
$MAKEINSTALL
|
20
packages/multimedia/libva/install
Executable file
20
packages/multimedia/libva/install
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/install libX11
|
||||
$SCRIPTS/install libXext
|
||||
$SCRIPTS/install libXfixes
|
||||
$SCRIPTS/install $LIBDRM
|
||||
$SCRIPTS/install $MESA
|
||||
|
||||
mkdir -p $INSTALL/usr/lib
|
||||
cp -PR $PKG_BUILD/src/.libs/*.so*[.0-9] $INSTALL/usr/lib
|
||||
|
||||
mkdir -p $INSTALL/usr/lib/va
|
||||
cp -PR $PKG_BUILD/dummy_drv_video/.libs/*.so $INSTALL/usr/lib/va
|
||||
cp -PR $PKG_BUILD/i965_drv_video/.libs/*.so $INSTALL/usr/lib/va
|
||||
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
cp -PR $PKG_BUILD/test/.libs/vainfo $INSTALL/usr/bin
|
||||
|
@ -0,0 +1,23 @@
|
||||
commit 179bbd6adf94ac21c990bfc09616c3f61406e360
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Thu Sep 24 11:59:36 2009 +0000
|
||||
|
||||
[G45] Implement vaQueryDisplayAttributes() as a no-op.
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index d26942d..375d532 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -1031,8 +1031,10 @@ i965_QueryDisplayAttributes(VADriverContextP ctx,
|
||||
VADisplayAttribute *attr_list, /* out */
|
||||
int *num_attributes) /* out */
|
||||
{
|
||||
- /* TODO */
|
||||
- return VA_STATUS_ERROR_UNKNOWN;
|
||||
+ if (num_attributes)
|
||||
+ *num_attributes = 0;
|
||||
+
|
||||
+ return VA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
@ -0,0 +1,20 @@
|
||||
commit bba300da5347d8ac25544650c6f6e507e5ea8a1b
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Thu Sep 24 12:00:02 2009 +0000
|
||||
|
||||
[G45] Fix vaQueryImageFormats() to return 0 image formats supported at this time.
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index 375d532..8d28547 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -346,6 +346,9 @@ i965_QueryImageFormats(VADriverContextP ctx,
|
||||
VAImageFormat *format_list, /* out */
|
||||
int *num_formats) /* out */
|
||||
{
|
||||
+ if (num_formats)
|
||||
+ *num_formats = 0;
|
||||
+
|
||||
return VA_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
commit 41e88c17745a6e8553ed39e627a0ec22840b8100
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Thu Sep 24 12:54:40 2009 +0000
|
||||
|
||||
[G45] Fix VA driver version.
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index 8d28547..800a642 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -1322,8 +1322,8 @@ __vaDriverInit_0_31( VADriverContextP ctx )
|
||||
struct i965_driver_data *i965;
|
||||
int result;
|
||||
|
||||
- ctx->version_major = 0;
|
||||
- ctx->version_minor = 29;
|
||||
+ ctx->version_major = VA_MAJOR_VERSION;
|
||||
+ ctx->version_minor = VA_MINOR_VERSION;
|
||||
ctx->max_profiles = I965_MAX_PROFILES;
|
||||
ctx->max_entrypoints = I965_MAX_ENTRYPOINTS;
|
||||
ctx->max_attributes = I965_MAX_CONFIG_ATTRIBUTES;
|
@ -0,0 +1,19 @@
|
||||
commit 390fab410fe30e0de0f47a539d1d15d022fb6902
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Thu Sep 24 12:55:11 2009 +0000
|
||||
|
||||
[G45] Fix vaAssociateSubpicture() arguments.
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index 800a642..6582c71 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -489,8 +489,6 @@ i965_AssociateSubpicture(VADriverContextP ctx,
|
||||
short dest_y,
|
||||
unsigned short dest_width,
|
||||
unsigned short dest_height,
|
||||
- unsigned short width,
|
||||
- unsigned short height,
|
||||
/*
|
||||
* whether to enable chroma-keying or global-alpha
|
||||
* see VA_SUBPICTURE_XXX values
|
46611
packages/multimedia/libva/patches/100_updated_autoreconf.diff
Normal file
46611
packages/multimedia/libva/patches/100_updated_autoreconf.diff
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,88 @@
|
||||
diff -Naur libva-0.31.0/config.h.in libva-0.31.0.diff/config.h.in
|
||||
--- libva-0.31.0/config.h.in 2009-10-10 23:13:39.445657680 +0200
|
||||
+++ libva-0.31.0.diff/config.h.in 2009-10-10 23:12:44.000000000 +0200
|
||||
@@ -1,5 +1,8 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
+/* Defined to __attribute__((visibility("hidden"))) when available */
|
||||
+#undef ATTRIBUTE_HIDDEN
|
||||
+
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
diff -Naur libva-0.31.0/configure libva-0.31.0.diff/configure
|
||||
--- libva-0.31.0/configure 2009-10-10 23:13:39.576782883 +0200
|
||||
+++ libva-0.31.0.diff/configure 2009-10-10 23:12:44.390782788 +0200
|
||||
@@ -13164,6 +13164,38 @@
|
||||
fi
|
||||
|
||||
|
||||
+{ $as_echo "$as_me:$LINENO: checking whether __attribute__((visibility())) is supported" >&5
|
||||
+$as_echo_n "checking whether __attribute__((visibility())) is supported... " >&6; }
|
||||
+if test "${libva_cv_visibility_attribute+set}" = set; then
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ cat > conftest.c <<EOF
|
||||
+int foo __attribute__ ((visibility ("hidden"))) = 1;
|
||||
+int bar __attribute__ ((visibility ("protected"))) = 1;
|
||||
+EOF
|
||||
+ libva_cv_visibility_attribute=no
|
||||
+ if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
|
||||
+ if grep '\.hidden.*foo' conftest.s >/dev/null; then
|
||||
+ if grep '\.protected.*bar' conftest.s >/dev/null; then
|
||||
+ libva_cv_visibility_attribute=yes
|
||||
+ fi
|
||||
+ fi
|
||||
+ fi
|
||||
+ rm -f conftest.cs
|
||||
+
|
||||
+fi
|
||||
+{ $as_echo "$as_me:$LINENO: result: $libva_cv_visibility_attribute" >&5
|
||||
+$as_echo "$libva_cv_visibility_attribute" >&6; }
|
||||
+ATTRIBUTE_HIDDEN=""
|
||||
+if test $libva_cv_visibility_attribute = yes; then
|
||||
+ ATTRIBUTE_HIDDEN="__attribute__((visibility(\"hidden\")))"
|
||||
+fi
|
||||
+
|
||||
+cat >>confdefs.h <<_ACEOF
|
||||
+#define ATTRIBUTE_HIDDEN $ATTRIBUTE_HIDDEN
|
||||
+_ACEOF
|
||||
+
|
||||
+
|
||||
# We only need the headers, we don't link against the DRM libraries
|
||||
LIBVA_CFLAGS="$DRM_CFLAGS"
|
||||
|
||||
diff -Naur libva-0.31.0/configure.ac libva-0.31.0.diff/configure.ac
|
||||
--- libva-0.31.0/configure.ac 2009-09-10 17:18:49.000000000 +0200
|
||||
+++ libva-0.31.0.diff/configure.ac 2009-10-10 23:12:32.556667509 +0200
|
||||
@@ -100,6 +100,30 @@
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_I965_DRIVER, test x$enable_i965_driver = xyes)
|
||||
|
||||
+dnl Check for __attribute__((visibility()))
|
||||
+AC_CACHE_CHECK([whether __attribute__((visibility())) is supported],
|
||||
+ libva_cv_visibility_attribute,
|
||||
+ [cat > conftest.c <<EOF
|
||||
+int foo __attribute__ ((visibility ("hidden"))) = 1;
|
||||
+int bar __attribute__ ((visibility ("protected"))) = 1;
|
||||
+EOF
|
||||
+ libva_cv_visibility_attribute=no
|
||||
+ if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
|
||||
+ if grep '\.hidden.*foo' conftest.s >/dev/null; then
|
||||
+ if grep '\.protected.*bar' conftest.s >/dev/null; then
|
||||
+ libva_cv_visibility_attribute=yes
|
||||
+ fi
|
||||
+ fi
|
||||
+ fi
|
||||
+ rm -f conftest.[cs]
|
||||
+])
|
||||
+ATTRIBUTE_HIDDEN=""
|
||||
+if test $libva_cv_visibility_attribute = yes; then
|
||||
+ ATTRIBUTE_HIDDEN="__attribute__((visibility(\"hidden\")))"
|
||||
+fi
|
||||
+AC_DEFINE_UNQUOTED([ATTRIBUTE_HIDDEN], [$ATTRIBUTE_HIDDEN],
|
||||
+ [Defined to __attribute__((visibility("hidden"))) when available])
|
||||
+
|
||||
# We only need the headers, we don't link against the DRM libraries
|
||||
LIBVA_CFLAGS="$DRM_CFLAGS"
|
||||
AC_SUBST(LIBVA_CFLAGS)
|
33
packages/multimedia/libva/patches/103_fix_vainfo_deps.diff
Normal file
33
packages/multimedia/libva/patches/103_fix_vainfo_deps.diff
Normal file
@ -0,0 +1,33 @@
|
||||
diff -Naur libva-0.31.0/test/Makefile.am libva-0.31.0.diff/test/Makefile.am
|
||||
--- libva-0.31.0/test/Makefile.am 2009-09-10 17:18:48.000000000 +0200
|
||||
+++ libva-0.31.0.diff/test/Makefile.am 2009-10-10 23:14:32.350657987 +0200
|
||||
@@ -31,10 +31,10 @@
|
||||
|
||||
TESTS = $(check_PROGRAMS)
|
||||
|
||||
-TEST_LIBS = $(top_srcdir)/src/$(libvabackendlib)
|
||||
+TEST_LIBS = $(top_srcdir)/src/libva.la $(top_srcdir)/src/$(libvabackendlib)
|
||||
|
||||
-vainfo_LDADD = $(top_srcdir)/src/$(libvabackendlib)
|
||||
-vainfo_DEPENDENCIES = $(top_srcdir)/src/$(libvabackendlib)
|
||||
+vainfo_LDADD = $(top_srcdir)/src/libva.la $(top_srcdir)/src/$(libvabackendlib)
|
||||
+vainfo_DEPENDENCIES = $(top_srcdir)/src/libva.la $(top_srcdir)/src/$(libvabackendlib)
|
||||
vainfo_SOURCES = vainfo.c
|
||||
|
||||
test_01_LDADD = $(TEST_LIBS)
|
||||
diff -Naur libva-0.31.0/test/Makefile.in libva-0.31.0.diff/test/Makefile.in
|
||||
--- libva-0.31.0/test/Makefile.in 2009-10-10 23:13:39.621783024 +0200
|
||||
+++ libva-0.31.0.diff/test/Makefile.in 2009-10-10 23:14:48.470783134 +0200
|
||||
@@ -275,9 +275,9 @@
|
||||
testdir = $(bindir)
|
||||
AM_CFLAGS = -I$(top_srcdir)/../../include/external/ -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 -DIN_LIBVA
|
||||
TESTS = $(check_PROGRAMS)
|
||||
-TEST_LIBS = $(top_srcdir)/src/$(libvabackendlib)
|
||||
-vainfo_LDADD = $(top_srcdir)/src/$(libvabackendlib)
|
||||
-vainfo_DEPENDENCIES = $(top_srcdir)/src/$(libvabackendlib)
|
||||
+TEST_LIBS = $(top_srcdir)/src/libva.la $(top_srcdir)/src/$(libvabackendlib)
|
||||
+vainfo_LDADD = $(top_srcdir)/src/libva.la $(top_srcdir)/src/$(libvabackendlib)
|
||||
+vainfo_DEPENDENCIES = $(top_srcdir)/src/libva.la $(top_srcdir)/src/$(libvabackendlib)
|
||||
vainfo_SOURCES = vainfo.c
|
||||
test_01_LDADD = $(TEST_LIBS)
|
||||
test_01_SOURCES = test_01.c
|
@ -0,0 +1,18 @@
|
||||
commit f0b352251894becfcec50de1430bda12c314a464
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Tue Sep 22 13:00:34 2009 +0000
|
||||
|
||||
Fix libva-x11 pkgconfig dependencies.
|
||||
|
||||
diff --git a/libva-x11.pc.in b/libva-x11.pc.in
|
||||
index 75e4f0b..6dde07f 100644
|
||||
--- a/libva-x11.pc.in
|
||||
+++ b/libva-x11.pc.in
|
||||
@@ -6,6 +6,7 @@ display=x11
|
||||
|
||||
Name: libva-${display}
|
||||
Description: Userspace Video Acceleration (VA) ${display} interface
|
||||
+Requires: libva
|
||||
Version: @PACKAGE_VERSION@
|
||||
Libs: -L${libdir} -lva-${display}
|
||||
Cflags: -I${includedir}
|
@ -0,0 +1,21 @@
|
||||
commit 035374378644216fb3a7d3974a8c46b1bd425918
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Tue Sep 22 13:03:23 2009 +0000
|
||||
|
||||
Don't search LIBGL_DRIVERS_PATH, stick to LIBVA_DRIVERS_PATH only or the default path.
|
||||
|
||||
diff --git a/src/va.c b/src/va.c
|
||||
index 12662cd..723235e 100644
|
||||
--- a/src/va.c
|
||||
+++ b/src/va.c
|
||||
@@ -134,10 +134,6 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
|
||||
{
|
||||
/* don't allow setuid apps to use LIBVA_DRIVERS_PATH */
|
||||
search_path = getenv("LIBVA_DRIVERS_PATH");
|
||||
- if (!search_path)
|
||||
- {
|
||||
- search_path = getenv("LIBGL_DRIVERS_PATH");
|
||||
- }
|
||||
}
|
||||
if (!search_path)
|
||||
{
|
24
packages/multimedia/libva/patches/108_drivers_path.diff
Normal file
24
packages/multimedia/libva/patches/108_drivers_path.diff
Normal file
@ -0,0 +1,24 @@
|
||||
diff -Naur libva-0.31.0/configure libva-0.31.0.diff/configure
|
||||
--- libva-0.31.0/configure 2009-10-10 23:14:15.667658343 +0200
|
||||
+++ libva-0.31.0.diff/configure 2009-10-10 23:16:27.484782476 +0200
|
||||
@@ -2652,7 +2652,7 @@
|
||||
if test "${with_drivers_path+set}" = set; then
|
||||
withval=$with_drivers_path;
|
||||
else
|
||||
- with_drivers_path="$libdir/dri"
|
||||
+ with_drivers_path="$libdir/va/drivers"
|
||||
fi
|
||||
|
||||
|
||||
diff -Naur libva-0.31.0/configure.ac libva-0.31.0.diff/configure.ac
|
||||
--- libva-0.31.0/configure.ac 2009-10-10 23:14:15.668657233 +0200
|
||||
+++ libva-0.31.0.diff/configure.ac 2009-10-10 23:16:15.673657877 +0200
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
AC_ARG_WITH(drivers-path,
|
||||
[AC_HELP_STRING([--with-drivers-path=[[path]]], [drivers path])],,
|
||||
- [with_drivers_path="$libdir/dri"])
|
||||
+ [with_drivers_path="$libdir/va/drivers"])
|
||||
|
||||
LIBVA_DRIVERS_PATH="$with_drivers_path"
|
||||
AC_SUBST(LIBVA_DRIVERS_PATH)
|
564
packages/multimedia/libva/patches/203_fix_fglrx_detection.diff
Normal file
564
packages/multimedia/libva/patches/203_fix_fglrx_detection.diff
Normal file
@ -0,0 +1,564 @@
|
||||
diff -Naur libva-0.31.0/src/Makefile.am libva-0.31.0.diff/src/Makefile.am
|
||||
--- libva-0.31.0/src/Makefile.am 2009-09-10 17:18:49.000000000 +0200
|
||||
+++ libva-0.31.0.diff/src/Makefile.am 2009-10-10 23:17:36.585684098 +0200
|
||||
@@ -37,7 +37,7 @@
|
||||
libva_la_LIBADD = $(LIBVA_LIBS) -ldl
|
||||
|
||||
libva_x11_la_SOURCES =
|
||||
-libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(DRM_LIBS) $(XFIXES_LIBS)
|
||||
+libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(XFIXES_LIBS) -ldl
|
||||
libva_x11_la_LDFLAGS = $(LDADD)
|
||||
libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la
|
||||
|
||||
diff -Naur libva-0.31.0/src/Makefile.in libva-0.31.0.diff/src/Makefile.in
|
||||
--- libva-0.31.0/src/Makefile.in 2009-10-10 23:13:39.617782434 +0200
|
||||
+++ libva-0.31.0.diff/src/Makefile.in 2009-10-10 23:17:57.773782182 +0200
|
||||
@@ -309,7 +309,7 @@
|
||||
libva_la_LDFLAGS = $(LDADD) -no-undefined
|
||||
libva_la_LIBADD = $(LIBVA_LIBS) -ldl
|
||||
libva_x11_la_SOURCES =
|
||||
-libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(DRM_LIBS) $(XFIXES_LIBS)
|
||||
+libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(XFIXES_LIBS) -ldl
|
||||
libva_x11_la_LDFLAGS = $(LDADD)
|
||||
libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la
|
||||
SUBDIRS = x11
|
||||
diff -Naur libva-0.31.0/src/x11/dri1_util.c libva-0.31.0.diff/src/x11/dri1_util.c
|
||||
--- libva-0.31.0/src/x11/dri1_util.c 2009-09-22 15:17:03.000000000 +0200
|
||||
+++ libva-0.31.0.diff/src/x11/dri1_util.c 2009-10-10 23:17:36.554665627 +0200
|
||||
@@ -1,10 +1,12 @@
|
||||
+#include "config.h"
|
||||
+#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <assert.h>
|
||||
|
||||
-#include <xf86drm.h>
|
||||
+#include "libdrm_glue.h"
|
||||
|
||||
#include "X11/Xlib.h"
|
||||
#include "va.h"
|
||||
@@ -21,6 +23,75 @@
|
||||
int height;
|
||||
};
|
||||
|
||||
+static int
|
||||
+firegl_drmOpenMinor(int minor)
|
||||
+{
|
||||
+ char buf[64];
|
||||
+ int fd;
|
||||
+
|
||||
+ sprintf(buf, "/dev/ati/card%d", minor);
|
||||
+ if ((fd = open(buf, O_RDWR, 0)) >= 0)
|
||||
+ return fd;
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+firegl_drmOpenByBusID(const char *busid)
|
||||
+{
|
||||
+ int i, fd;
|
||||
+ drmSetVersion sv;
|
||||
+ const char *buf;
|
||||
+
|
||||
+ for (i = 0; i < DRM_MAX_MINOR; i++) {
|
||||
+ if ((fd = firegl_drmOpenMinor(i)) < 0)
|
||||
+ continue;
|
||||
+ sv.drm_di_major = 1;
|
||||
+ sv.drm_di_minor = 1;
|
||||
+ sv.drm_dd_major = -1;
|
||||
+ sv.drm_dd_minor = -1;
|
||||
+ libdrm_drmSetInterfaceVersion(fd, &sv);
|
||||
+ buf = libdrm_drmGetBusid(fd);
|
||||
+ if (buf && strcasecmp(buf, busid) == 0) { /* XXX: drmMatchBusID() */
|
||||
+ libdrm_drmFreeBusid(buf);
|
||||
+ return fd;
|
||||
+ }
|
||||
+ if (buf)
|
||||
+ libdrm_drmFreeBusid(buf);
|
||||
+ close(fd);
|
||||
+ }
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+drm_open_once(struct dri_state *dri_state, const char *BusID, int *newlyopened)
|
||||
+{
|
||||
+ dri_state->driConnectedFlag = VA_NONE;
|
||||
+ dri_state->fd = libdrm_drmOpenOnce(NULL, BusID, newlyopened);
|
||||
+ if (dri_state->fd < 0) {
|
||||
+ dri_state->fd = firegl_drmOpenByBusID(BusID);
|
||||
+ if (dri_state->fd >= 0) {
|
||||
+ *newlyopened = 1;
|
||||
+ dri_state->driConnectedFlag |= VA_DRI_AMD;
|
||||
+ }
|
||||
+ }
|
||||
+ return dri_state->fd;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+drm_close_once(struct dri_state *dri_state)
|
||||
+{
|
||||
+ /* XXX: dri_state->close() doesn't seem to be called, thus this
|
||||
+ function is never called either */
|
||||
+ if (dri_state->fd < 0)
|
||||
+ return;
|
||||
+ if (dri_state->driConnectedFlag & VA_DRI_AMD)
|
||||
+ close(dri_state->fd);
|
||||
+ else
|
||||
+ libdrm_drmCloseOnce(dri_state->fd);
|
||||
+ dri_state->fd = -1;
|
||||
+ dri_state->driConnectedFlag = VA_NONE;
|
||||
+}
|
||||
+
|
||||
static struct dri_drawable *
|
||||
dri1CreateDrawable(VADriverContextP ctx, XID x_drawable)
|
||||
{
|
||||
@@ -64,9 +135,9 @@
|
||||
free_drawable_hashtable(ctx);
|
||||
VA_DRIDestroyContext(ctx->x11_dpy, ctx->x11_screen, dri_state->hwContextID);
|
||||
assert(dri_state->pSAREA != MAP_FAILED);
|
||||
- drmUnmap(dri_state->pSAREA, SAREA_MAX);
|
||||
+ libdrm_drmUnmap(dri_state->pSAREA, SAREA_MAX);
|
||||
assert(dri_state->fd >= 0);
|
||||
- drmCloseOnce(dri_state->fd);
|
||||
+ drm_close_once(dri_state);
|
||||
VA_DRICloseConnection(ctx->x11_dpy, ctx->x11_screen);
|
||||
}
|
||||
|
||||
@@ -104,21 +175,20 @@
|
||||
&dri_state->hSAREA, &BusID))
|
||||
goto err_out0;
|
||||
|
||||
-
|
||||
- dri_state->fd = drmOpenOnce(NULL, BusID, &newlyopened);
|
||||
+ drm_open_once(dri_state, BusID, &newlyopened);
|
||||
XFree(BusID);
|
||||
|
||||
if (dri_state->fd < 0)
|
||||
goto err_out1;
|
||||
|
||||
|
||||
- if (drmGetMagic(dri_state->fd, &magic))
|
||||
+ if (libdrm_drmGetMagic(dri_state->fd, &magic))
|
||||
goto err_out1;
|
||||
|
||||
if (newlyopened && !VA_DRIAuthConnection(ctx->x11_dpy, ctx->x11_screen, magic))
|
||||
goto err_out1;
|
||||
|
||||
- if (drmMap(dri_state->fd, dri_state->hSAREA, SAREA_MAX, &dri_state->pSAREA))
|
||||
+ if (libdrm_drmMap(dri_state->fd, dri_state->hSAREA, SAREA_MAX, &dri_state->pSAREA))
|
||||
goto err_out1;
|
||||
|
||||
if (!VA_DRICreateContext(ctx->x11_dpy, ctx->x11_screen,
|
||||
@@ -126,7 +196,8 @@
|
||||
&dri_state->hwContextID, &dri_state->hwContext))
|
||||
goto err_out1;
|
||||
|
||||
- dri_state->driConnectedFlag = VA_DRI1;
|
||||
+ dri_state->driConnectedFlag &= VA_DRI_AMD; /* clear flags but AMD bit */
|
||||
+ dri_state->driConnectedFlag |= VA_DRI1;
|
||||
dri_state->createDrawable = dri1CreateDrawable;
|
||||
dri_state->destroyDrawable = dri1DestroyDrawable;
|
||||
dri_state->swapBuffer = dri1SwapBuffer;
|
||||
@@ -137,10 +208,10 @@
|
||||
|
||||
err_out1:
|
||||
if (dri_state->pSAREA != MAP_FAILED)
|
||||
- drmUnmap(dri_state->pSAREA, SAREA_MAX);
|
||||
+ libdrm_drmUnmap(dri_state->pSAREA, SAREA_MAX);
|
||||
|
||||
if (dri_state->fd >= 0)
|
||||
- drmCloseOnce(dri_state->fd);
|
||||
+ drm_close_once(dri_state);
|
||||
|
||||
VA_DRICloseConnection(ctx->x11_dpy, ctx->x11_screen);
|
||||
|
||||
diff -Naur libva-0.31.0/src/x11/dri2_util.c libva-0.31.0.diff/src/x11/dri2_util.c
|
||||
--- libva-0.31.0/src/x11/dri2_util.c 2009-09-10 17:18:49.000000000 +0200
|
||||
+++ libva-0.31.0.diff/src/x11/dri2_util.c 2009-10-10 23:17:36.555686378 +0200
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
||||
-#include <xf86drm.h>
|
||||
+#include "libdrm_glue.h"
|
||||
|
||||
#include <X11/Xlibint.h>
|
||||
#include <X11/Xlib.h>
|
||||
@@ -166,7 +166,7 @@
|
||||
if (dri_state->fd < 0)
|
||||
goto err_out;
|
||||
|
||||
- if (drmGetMagic(dri_state->fd, &magic))
|
||||
+ if (libdrm_drmGetMagic(dri_state->fd, &magic))
|
||||
goto err_out;
|
||||
|
||||
if (!VA_DRI2Authenticate(ctx->x11_dpy, RootWindow(ctx->x11_dpy, ctx->x11_screen),
|
||||
diff -Naur libva-0.31.0/src/x11/libdrm_glue.c libva-0.31.0.diff/src/x11/libdrm_glue.c
|
||||
--- libva-0.31.0/src/x11/libdrm_glue.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libva-0.31.0.diff/src/x11/libdrm_glue.c 2009-10-10 23:17:36.559790824 +0200
|
||||
@@ -0,0 +1,208 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
||||
+ * copy of this software and associated documentation files (the
|
||||
+ * "Software"), to deal in the Software without restriction, including
|
||||
+ * without limitation the rights to use, copy, modify, merge, publish,
|
||||
+ * distribute, sub license, and/or sell copies of the Software, and to
|
||||
+ * permit persons to whom the Software is furnished to do so, subject to
|
||||
+ * the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice (including the
|
||||
+ * next paragraph) shall be included in all copies or substantial portions
|
||||
+ * of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#define _GNU_SOURCE 1
|
||||
+#include "libdrm_glue.h"
|
||||
+#include <stdio.h>
|
||||
+#include <string.h>
|
||||
+#include <dlfcn.h>
|
||||
+#include <assert.h>
|
||||
+
|
||||
+#define LOAD_FUNC_(NAME, RET, ARGS, FALLBACK) \
|
||||
+ static RET (*lib_##NAME) ARGS; \
|
||||
+ if (lib_##NAME == NULL) { \
|
||||
+ lib_##NAME = libdrm_symbol(#NAME); \
|
||||
+ if (!lib_##NAME) \
|
||||
+ lib_##NAME = FALLBACK; \
|
||||
+ } \
|
||||
+ assert(lib_##NAME != NULL)
|
||||
+
|
||||
+#define LOAD_FUNC(NAME, RET, ARGS) \
|
||||
+ LOAD_FUNC_(NAME, RET, ARGS, NULL)
|
||||
+
|
||||
+static void *libdrm_handle;
|
||||
+static int libdrm_handle_ok = -1;
|
||||
+
|
||||
+static inline void *libdrm_symbol(const char *name)
|
||||
+{
|
||||
+ if (!libdrm_open())
|
||||
+ return NULL;
|
||||
+ return dlsym(libdrm_handle, name);
|
||||
+}
|
||||
+
|
||||
+int libdrm_open(void)
|
||||
+{
|
||||
+ if (libdrm_handle_ok < 0) {
|
||||
+ libdrm_handle = dlopen("libdrm.so.2", RTLD_LOCAL|RTLD_LAZY);
|
||||
+ libdrm_handle_ok = libdrm_handle != NULL;
|
||||
+ }
|
||||
+ assert(libdrm_handle);
|
||||
+ return libdrm_handle_ok;
|
||||
+}
|
||||
+
|
||||
+void libdrm_close(void)
|
||||
+{
|
||||
+ if (libdrm_handle)
|
||||
+ dlclose(libdrm_handle);
|
||||
+}
|
||||
+
|
||||
+// Default drmOpenOnce() and drmCloseOnce() implementations based on current GIT
|
||||
+#define DRM_MAX_FDS 16
|
||||
+static struct {
|
||||
+ char *BusID;
|
||||
+ int fd;
|
||||
+ int refcount;
|
||||
+} connection[DRM_MAX_FDS];
|
||||
+
|
||||
+static int nr_fds = 0;
|
||||
+
|
||||
+// Default implementation for drmOpenOnce() if none exists in the library
|
||||
+static int
|
||||
+libdrm_default_drmOpenOnce(void *unused, const char *BusID, int *newlyopened)
|
||||
+{
|
||||
+ int i;
|
||||
+ int fd;
|
||||
+
|
||||
+ for (i = 0; i < nr_fds; i++)
|
||||
+ if (strcmp(BusID, connection[i].BusID) == 0) {
|
||||
+ connection[i].refcount++;
|
||||
+ *newlyopened = 0;
|
||||
+ return connection[i].fd;
|
||||
+ }
|
||||
+
|
||||
+ fd = libdrm_drmOpen(unused, BusID);
|
||||
+ if (fd <= 0 || nr_fds == DRM_MAX_FDS)
|
||||
+ return fd;
|
||||
+
|
||||
+ connection[nr_fds].BusID = strdup(BusID);
|
||||
+ connection[nr_fds].fd = fd;
|
||||
+ connection[nr_fds].refcount = 1;
|
||||
+ *newlyopened = 1;
|
||||
+
|
||||
+ if (0)
|
||||
+ fprintf(stderr, "saved connection %d for %s %d\n",
|
||||
+ nr_fds, connection[nr_fds].BusID,
|
||||
+ strcmp(BusID, connection[nr_fds].BusID));
|
||||
+ nr_fds++;
|
||||
+ return fd;
|
||||
+}
|
||||
+
|
||||
+// Default implementation for drmCloseOnce() if none exists in the library
|
||||
+static void libdrm_default_drmCloseOnce(int fd)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < nr_fds; i++) {
|
||||
+ if (fd == connection[i].fd) {
|
||||
+ if (--connection[i].refcount == 0) {
|
||||
+ libdrm_drmClose(connection[i].fd);
|
||||
+ free(connection[i].BusID);
|
||||
+ if (i < --nr_fds)
|
||||
+ connection[i] = connection[nr_fds];
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+// Determine whether the DRM kernel driver has been loaded
|
||||
+int libdrm_drmAvailable(void)
|
||||
+{
|
||||
+ LOAD_FUNC(drmAvailable, int, (void));
|
||||
+ return lib_drmAvailable();
|
||||
+}
|
||||
+
|
||||
+// Open the DRM device
|
||||
+int libdrm_drmOpen(const char *name, const char *busid)
|
||||
+{
|
||||
+ LOAD_FUNC(drmOpen, int, (const char *, const char *));
|
||||
+ return lib_drmOpen(name, busid);
|
||||
+}
|
||||
+
|
||||
+// Close the device
|
||||
+int libdrm_drmClose(int fd)
|
||||
+{
|
||||
+ LOAD_FUNC(drmClose, int, (int));
|
||||
+ return lib_drmClose(fd);
|
||||
+}
|
||||
+
|
||||
+// Open the DRM device (re-use an existing connection)
|
||||
+int libdrm_drmOpenOnce(void *unused, const char *BusID, int *newlyopened)
|
||||
+{
|
||||
+ LOAD_FUNC_(drmOpenOnce, int, (void *, const char *, int *),
|
||||
+ libdrm_default_drmOpenOnce);
|
||||
+ return lib_drmOpenOnce(unused, BusID, newlyopened);
|
||||
+}
|
||||
+
|
||||
+// Close the device (unref an existing connection prior to actually closing it)
|
||||
+void libdrm_drmCloseOnce(int fd)
|
||||
+{
|
||||
+ LOAD_FUNC_(drmCloseOnce, void, (int), libdrm_default_drmCloseOnce);
|
||||
+ lib_drmCloseOnce(fd);
|
||||
+}
|
||||
+
|
||||
+// DRM connection cookie
|
||||
+int libdrm_drmGetMagic(int fd, drm_magic_t * magic)
|
||||
+{
|
||||
+ LOAD_FUNC(drmGetMagic, int, (int, drm_magic_t *));
|
||||
+ return lib_drmGetMagic(fd, magic);
|
||||
+}
|
||||
+
|
||||
+// Issue a set-version ioctl
|
||||
+int libdrm_drmSetInterfaceVersion(int fd, drmSetVersion *version)
|
||||
+{
|
||||
+ LOAD_FUNC(drmSetInterfaceVersion, int, (int, drmSetVersion *));
|
||||
+ return lib_drmSetInterfaceVersion(fd, version);
|
||||
+}
|
||||
+
|
||||
+// Get the bus ID of the device
|
||||
+char *libdrm_drmGetBusid(int fd)
|
||||
+{
|
||||
+ LOAD_FUNC(drmGetBusid, char *, (int));
|
||||
+ return lib_drmGetBusid(fd);
|
||||
+}
|
||||
+
|
||||
+// Free the bus ID information
|
||||
+void libdrm_drmFreeBusid(const char *busid)
|
||||
+{
|
||||
+ LOAD_FUNC(drmFreeBusid, void, (const char *));
|
||||
+ lib_drmFreeBusid(busid);
|
||||
+}
|
||||
+
|
||||
+// Map a region of memory
|
||||
+int libdrm_drmMap(int fd,
|
||||
+ drm_handle_t handle,
|
||||
+ drmSize size,
|
||||
+ drmAddressPtr address)
|
||||
+{
|
||||
+ LOAD_FUNC(drmMap, int, (int, drm_handle_t, drmSize, drmAddressPtr));
|
||||
+ return lib_drmMap(fd, handle, size, address);
|
||||
+}
|
||||
+
|
||||
+// Unmap mappings obtained with drmMap()
|
||||
+int libdrm_drmUnmap(drmAddress address, drmSize size)
|
||||
+{
|
||||
+ LOAD_FUNC(drmUnmap, int, (drmAddress, drmSize));
|
||||
+ return lib_drmUnmap(address, size);
|
||||
+}
|
||||
diff -Naur libva-0.31.0/src/x11/libdrm_glue.h libva-0.31.0.diff/src/x11/libdrm_glue.h
|
||||
--- libva-0.31.0/src/x11/libdrm_glue.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libva-0.31.0.diff/src/x11/libdrm_glue.h 2009-10-10 23:17:36.578783359 +0200
|
||||
@@ -0,0 +1,73 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
||||
+ * copy of this software and associated documentation files (the
|
||||
+ * "Software"), to deal in the Software without restriction, including
|
||||
+ * without limitation the rights to use, copy, modify, merge, publish,
|
||||
+ * distribute, sub license, and/or sell copies of the Software, and to
|
||||
+ * permit persons to whom the Software is furnished to do so, subject to
|
||||
+ * the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice (including the
|
||||
+ * next paragraph) shall be included in all copies or substantial portions
|
||||
+ * of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#ifndef LIBDRM_GLUE_H
|
||||
+#define LIBDRM_GLUE_H
|
||||
+
|
||||
+#include "config.h"
|
||||
+#include <xf86drm.h>
|
||||
+
|
||||
+int libdrm_open(void)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+void libdrm_close(void)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+int libdrm_drmAvailable(void)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+int libdrm_drmOpen(const char *name, const char *busid)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+int libdrm_drmClose(int fd)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+int libdrm_drmOpenOnce(void *unused, const char *BusID, int *newlyopened)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+void libdrm_drmCloseOnce(int fd)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+int libdrm_drmGetMagic(int fd, drm_magic_t * magic)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+int libdrm_drmSetInterfaceVersion(int fd, drmSetVersion *version)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+char *libdrm_drmGetBusid(int fd)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+void libdrm_drmFreeBusid(const char *busid)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+int libdrm_drmMap(int fd,
|
||||
+ drm_handle_t handle,
|
||||
+ drmSize size,
|
||||
+ drmAddressPtr address)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+int libdrm_drmUnmap(drmAddress address, drmSize size)
|
||||
+ ATTRIBUTE_HIDDEN;
|
||||
+
|
||||
+#endif /* LIBDRM_GLUE_H */
|
||||
diff -Naur libva-0.31.0/src/x11/Makefile.am libva-0.31.0.diff/src/x11/Makefile.am
|
||||
--- libva-0.31.0/src/x11/Makefile.am 2009-09-10 17:18:49.000000000 +0200
|
||||
+++ libva-0.31.0.diff/src/x11/Makefile.am 2009-10-10 23:17:36.554665627 +0200
|
||||
@@ -25,6 +25,6 @@
|
||||
libva_x11includedir = ${includedir}/va
|
||||
libva_x11include_HEADERS = va_x11.h va_dri.h va_dri2.h va_dricommon.h
|
||||
|
||||
-libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c
|
||||
+libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c libdrm_glue.c
|
||||
|
||||
-EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h
|
||||
+EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h libdrm_glue.h
|
||||
diff -Naur libva-0.31.0/src/x11/Makefile.in libva-0.31.0.diff/src/x11/Makefile.in
|
||||
--- libva-0.31.0/src/x11/Makefile.in 2009-10-10 23:13:39.619782869 +0200
|
||||
+++ libva-0.31.0.diff/src/x11/Makefile.in 2009-10-10 23:17:57.866783115 +0200
|
||||
@@ -69,7 +69,8 @@
|
||||
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||
libva_x11_la_LIBADD =
|
||||
am_libva_x11_la_OBJECTS = va_x11.lo va_dri.lo va_dri2.lo \
|
||||
- va_dricommon.lo dri2_util.lo dri1_util.lo va_nvctrl.lo
|
||||
+ va_dricommon.lo dri2_util.lo dri1_util.lo va_nvctrl.lo \
|
||||
+ libdrm_glue.lo
|
||||
libva_x11_la_OBJECTS = $(am_libva_x11_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
@@ -249,8 +250,8 @@
|
||||
noinst_LTLIBRARIES = libva_x11.la
|
||||
libva_x11includedir = ${includedir}/va
|
||||
libva_x11include_HEADERS = va_x11.h va_dri.h va_dri2.h va_dricommon.h
|
||||
-libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c
|
||||
-EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h
|
||||
+libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c libdrm_glue.c
|
||||
+EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h libdrm_glue.h
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
@@ -305,6 +306,7 @@
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri1_util.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri2_util.Plo@am__quote@
|
||||
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrm_glue.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/va_dri.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/va_dri2.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/va_dricommon.Plo@am__quote@
|
||||
diff -Naur libva-0.31.0/src/x11/va_dricommon.h libva-0.31.0.diff/src/x11/va_dricommon.h
|
||||
--- libva-0.31.0/src/x11/va_dricommon.h 2009-07-06 12:44:10.000000000 +0200
|
||||
+++ libva-0.31.0.diff/src/x11/va_dricommon.h 2009-10-10 23:17:36.581783243 +0200
|
||||
@@ -13,7 +13,8 @@
|
||||
{
|
||||
VA_NONE = 0,
|
||||
VA_DRI1 = 1,
|
||||
- VA_DRI2 = 2
|
||||
+ VA_DRI2 = 2,
|
||||
+ VA_DRI_AMD = 4 /* AMD DRI implementation */
|
||||
};
|
||||
|
||||
union dri_buffer
|
||||
diff -Naur libva-0.31.0/src/x11/va_x11.c libva-0.31.0.diff/src/x11/va_x11.c
|
||||
--- libva-0.31.0/src/x11/va_x11.c 2009-09-22 15:17:03.000000000 +0200
|
||||
+++ libva-0.31.0.diff/src/x11/va_x11.c 2009-10-10 23:17:36.584782498 +0200
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "va_dri2.h"
|
||||
#include "va_dricommon.h"
|
||||
#include "va_nvctrl.h"
|
||||
+#include "libdrm_glue.h"
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
@@ -74,6 +75,8 @@
|
||||
}
|
||||
ctx = &((*ctx)->pNext);
|
||||
}
|
||||
+
|
||||
+ libdrm_close();
|
||||
free(pDisplayContext->pDriverContext->dri_state);
|
||||
free(pDisplayContext->pDriverContext);
|
||||
free(pDisplayContext);
|
315
packages/multimedia/libva/patches/300_sds_version.diff
Normal file
315
packages/multimedia/libva/patches/300_sds_version.diff
Normal file
@ -0,0 +1,315 @@
|
||||
diff -Naur libva-0.31.0/configure libva-0.31.0.diff/configure
|
||||
--- libva-0.31.0/configure 2009-10-10 23:17:18.356783363 +0200
|
||||
+++ libva-0.31.0.diff/configure 2009-10-10 23:19:28.956657592 +0200
|
||||
@@ -859,6 +859,7 @@
|
||||
BUILD_DUMMY_DRIVER_TRUE
|
||||
LIBVA_LT_LDFLAGS
|
||||
LIBVA_LT_VERSION
|
||||
+LIBVA_SDS_VERSION
|
||||
LIBVA_VERSION
|
||||
LIBVA_MICRO_VERSION
|
||||
LIBVA_MINOR_VERSION
|
||||
@@ -2615,11 +2616,14 @@
|
||||
|
||||
|
||||
|
||||
+LIBVA_SDS_VERSION=3
|
||||
+
|
||||
+
|
||||
LIBVA_LT_CURRENT=1
|
||||
LIBVA_LT_REV=0
|
||||
LIBVA_LT_AGE=0
|
||||
LIBVA_LT_VERSION="$LIBVA_LT_CURRENT:$LIBVA_LT_REV:$LIBVA_LT_AGE"
|
||||
-LIBVA_LT_LDFLAGS="-version-info $LIBVA_LT_VERSION"
|
||||
+LIBVA_LT_LDFLAGS="-version-info $LIBVA_LT_VERSION -release $LIBVA_VERSION.$LIBVA_SDS_VERSION"
|
||||
|
||||
|
||||
|
||||
@@ -4514,13 +4518,13 @@
|
||||
else
|
||||
lt_cv_nm_interface="BSD nm"
|
||||
echo "int some_variable = 0;" > conftest.$ac_ext
|
||||
- (eval echo "\"\$as_me:4517: $ac_compile\"" >&5)
|
||||
+ (eval echo "\"\$as_me:4521: $ac_compile\"" >&5)
|
||||
(eval "$ac_compile" 2>conftest.err)
|
||||
cat conftest.err >&5
|
||||
- (eval echo "\"\$as_me:4520: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
|
||||
+ (eval echo "\"\$as_me:4524: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
|
||||
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
|
||||
cat conftest.err >&5
|
||||
- (eval echo "\"\$as_me:4523: output\"" >&5)
|
||||
+ (eval echo "\"\$as_me:4527: output\"" >&5)
|
||||
cat conftest.out >&5
|
||||
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
|
||||
lt_cv_nm_interface="MS dumpbin"
|
||||
@@ -5726,7 +5730,7 @@
|
||||
;;
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
- echo '#line 5729 "configure"' > conftest.$ac_ext
|
||||
+ echo '#line 5733 "configure"' > conftest.$ac_ext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
@@ -7549,11 +7553,11 @@
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
- (eval echo "\"\$as_me:7552: $lt_compile\"" >&5)
|
||||
+ (eval echo "\"\$as_me:7556: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
- echo "$as_me:7556: \$? = $ac_status" >&5
|
||||
+ echo "$as_me:7560: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
@@ -7888,11 +7892,11 @@
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
- (eval echo "\"\$as_me:7891: $lt_compile\"" >&5)
|
||||
+ (eval echo "\"\$as_me:7895: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
- echo "$as_me:7895: \$? = $ac_status" >&5
|
||||
+ echo "$as_me:7899: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
@@ -7993,11 +7997,11 @@
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
- (eval echo "\"\$as_me:7996: $lt_compile\"" >&5)
|
||||
+ (eval echo "\"\$as_me:8000: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
- echo "$as_me:8000: \$? = $ac_status" >&5
|
||||
+ echo "$as_me:8004: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@@ -8048,11 +8052,11 @@
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
- (eval echo "\"\$as_me:8051: $lt_compile\"" >&5)
|
||||
+ (eval echo "\"\$as_me:8055: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
- echo "$as_me:8055: \$? = $ac_status" >&5
|
||||
+ echo "$as_me:8059: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@@ -10851,7 +10855,7 @@
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
-#line 10854 "configure"
|
||||
+#line 10858 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@@ -10947,7 +10951,7 @@
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
-#line 10950 "configure"
|
||||
+#line 10954 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
diff -Naur libva-0.31.0/configure.ac libva-0.31.0.diff/configure.ac
|
||||
--- libva-0.31.0/configure.ac 2009-10-10 23:17:18.356783363 +0200
|
||||
+++ libva-0.31.0.diff/configure.ac 2009-10-10 23:19:15.805657564 +0200
|
||||
@@ -28,6 +28,9 @@
|
||||
m4_define([libva_version],
|
||||
[libva_major_version.libva_minor_version.libva_micro_version])
|
||||
|
||||
+# increase this number for each API change
|
||||
+m4_define([libva_sds_version], [3])
|
||||
+
|
||||
# if the library source code has changed, increment revision
|
||||
m4_define([libva_lt_revision], [0])
|
||||
# if any interface was added/removed/changed, then inc current, reset revision
|
||||
@@ -52,11 +55,14 @@
|
||||
AC_SUBST(LIBVA_MICRO_VERSION)
|
||||
AC_SUBST(LIBVA_VERSION)
|
||||
|
||||
+LIBVA_SDS_VERSION=libva_sds_version
|
||||
+AC_SUBST(LIBVA_SDS_VERSION)
|
||||
+
|
||||
LIBVA_LT_CURRENT=libva_lt_current
|
||||
LIBVA_LT_REV=libva_lt_revision
|
||||
LIBVA_LT_AGE=libva_lt_age
|
||||
LIBVA_LT_VERSION="$LIBVA_LT_CURRENT:$LIBVA_LT_REV:$LIBVA_LT_AGE"
|
||||
-LIBVA_LT_LDFLAGS="-version-info $LIBVA_LT_VERSION"
|
||||
+LIBVA_LT_LDFLAGS="-version-info $LIBVA_LT_VERSION -release $LIBVA_VERSION.$LIBVA_SDS_VERSION"
|
||||
AC_SUBST(LIBVA_LT_VERSION)
|
||||
AC_SUBST(LIBVA_LT_LDFLAGS)
|
||||
|
||||
diff -Naur libva-0.31.0/dummy_drv_video/Makefile.in libva-0.31.0.diff/dummy_drv_video/Makefile.in
|
||||
--- libva-0.31.0/dummy_drv_video/Makefile.in 2009-10-10 23:13:39.578782409 +0200
|
||||
+++ libva-0.31.0.diff/dummy_drv_video/Makefile.in 2009-10-10 23:19:30.911783933 +0200
|
||||
@@ -161,6 +161,7 @@
|
||||
LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@
|
||||
LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@
|
||||
LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@
|
||||
+LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@
|
||||
LIBVA_VERSION = @LIBVA_VERSION@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
diff -Naur libva-0.31.0/i965_drv_video/Makefile.in libva-0.31.0.diff/i965_drv_video/Makefile.in
|
||||
--- libva-0.31.0/i965_drv_video/Makefile.in 2009-10-10 23:13:39.580782565 +0200
|
||||
+++ libva-0.31.0.diff/i965_drv_video/Makefile.in 2009-10-10 23:19:31.021782765 +0200
|
||||
@@ -202,6 +202,7 @@
|
||||
LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@
|
||||
LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@
|
||||
LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@
|
||||
+LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@
|
||||
LIBVA_VERSION = @LIBVA_VERSION@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
diff -Naur libva-0.31.0/i965_drv_video/shaders/Makefile.in libva-0.31.0.diff/i965_drv_video/shaders/Makefile.in
|
||||
--- libva-0.31.0/i965_drv_video/shaders/Makefile.in 2009-10-10 23:13:39.582782720 +0200
|
||||
+++ libva-0.31.0.diff/i965_drv_video/shaders/Makefile.in 2009-10-10 23:19:31.088782868 +0200
|
||||
@@ -132,6 +132,7 @@
|
||||
LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@
|
||||
LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@
|
||||
LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@
|
||||
+LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@
|
||||
LIBVA_VERSION = @LIBVA_VERSION@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
diff -Naur libva-0.31.0/i965_drv_video/shaders/mpeg2/Makefile.in libva-0.31.0.diff/i965_drv_video/shaders/mpeg2/Makefile.in
|
||||
--- libva-0.31.0/i965_drv_video/shaders/mpeg2/Makefile.in 2009-10-10 23:13:39.583782588 +0200
|
||||
+++ libva-0.31.0.diff/i965_drv_video/shaders/mpeg2/Makefile.in 2009-10-10 23:19:31.153783373 +0200
|
||||
@@ -132,6 +132,7 @@
|
||||
LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@
|
||||
LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@
|
||||
LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@
|
||||
+LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@
|
||||
LIBVA_VERSION = @LIBVA_VERSION@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
diff -Naur libva-0.31.0/i965_drv_video/shaders/mpeg2/vld/Makefile.in libva-0.31.0.diff/i965_drv_video/shaders/mpeg2/vld/Makefile.in
|
||||
--- libva-0.31.0/i965_drv_video/shaders/mpeg2/vld/Makefile.in 2009-10-10 23:13:39.585782953 +0200
|
||||
+++ libva-0.31.0.diff/i965_drv_video/shaders/mpeg2/vld/Makefile.in 2009-10-10 23:19:31.220782567 +0200
|
||||
@@ -92,6 +92,7 @@
|
||||
LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@
|
||||
LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@
|
||||
LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@
|
||||
+LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@
|
||||
LIBVA_VERSION = @LIBVA_VERSION@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
diff -Naur libva-0.31.0/i965_drv_video/shaders/render/Makefile.in libva-0.31.0.diff/i965_drv_video/shaders/render/Makefile.in
|
||||
--- libva-0.31.0/i965_drv_video/shaders/render/Makefile.in 2009-10-10 23:13:39.586782472 +0200
|
||||
+++ libva-0.31.0.diff/i965_drv_video/shaders/render/Makefile.in 2009-10-10 23:19:31.290782972 +0200
|
||||
@@ -92,6 +92,7 @@
|
||||
LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@
|
||||
LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@
|
||||
LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@
|
||||
+LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@
|
||||
LIBVA_VERSION = @LIBVA_VERSION@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
diff -Naur libva-0.31.0/Makefile.in libva-0.31.0.diff/Makefile.in
|
||||
--- libva-0.31.0/Makefile.in 2009-10-10 23:13:39.598782635 +0200
|
||||
+++ libva-0.31.0.diff/Makefile.in 2009-10-10 23:19:31.708782943 +0200
|
||||
@@ -196,6 +196,7 @@
|
||||
LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@
|
||||
LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@
|
||||
LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@
|
||||
+LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@
|
||||
LIBVA_VERSION = @LIBVA_VERSION@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
diff -Naur libva-0.31.0/src/Makefile.in libva-0.31.0.diff/src/Makefile.in
|
||||
--- libva-0.31.0/src/Makefile.in 2009-10-10 23:19:00.350783347 +0200
|
||||
+++ libva-0.31.0.diff/src/Makefile.in 2009-10-10 23:19:31.388782687 +0200
|
||||
@@ -206,6 +206,7 @@
|
||||
LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@
|
||||
LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@
|
||||
LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@
|
||||
+LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@
|
||||
LIBVA_VERSION = @LIBVA_VERSION@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
diff -Naur libva-0.31.0/src/va.c libva-0.31.0.diff/src/va.c
|
||||
--- libva-0.31.0/src/va.c 2009-09-10 17:18:49.000000000 +0200
|
||||
+++ libva-0.31.0.diff/src/va.c 2009-10-10 23:19:15.806658410 +0200
|
||||
@@ -40,6 +40,7 @@
|
||||
|
||||
|
||||
#define DRIVER_INIT_FUNC "__vaDriverInit_0_31"
|
||||
+#define DRIVER_INIT_FUNC_SDS "__vaDriverInit_0_31_sds"
|
||||
|
||||
#define DRIVER_EXTENSION "_drv_video.so"
|
||||
|
||||
@@ -170,6 +171,11 @@
|
||||
init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC);
|
||||
if (!init_func)
|
||||
{
|
||||
+ /* Then try SDS extensions (VDPAU and XvBA backends) */
|
||||
+ init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_SDS);
|
||||
+ }
|
||||
+ if (!init_func)
|
||||
+ {
|
||||
va_errorMessage("%s has no function %s\n", driver_path, DRIVER_INIT_FUNC);
|
||||
dlclose(handle);
|
||||
}
|
||||
diff -Naur libva-0.31.0/src/va_version.h.in libva-0.31.0.diff/src/va_version.h.in
|
||||
--- libva-0.31.0/src/va_version.h.in 2009-09-10 17:18:49.000000000 +0200
|
||||
+++ libva-0.31.0.diff/src/va_version.h.in 2009-10-10 23:19:15.807658068 +0200
|
||||
@@ -47,6 +47,13 @@
|
||||
#define VA_MICRO_VERSION (@LIBVA_MICRO_VERSION@)
|
||||
|
||||
/**
|
||||
+ * VA_SDS_VERSION:
|
||||
+ *
|
||||
+ * The version of the SDS API extensions to the VA library
|
||||
+ */
|
||||
+#define VA_SDS_VERSION (@LIBVA_SDS_VERSION@)
|
||||
+
|
||||
+/**
|
||||
* VA_VERSION:
|
||||
*
|
||||
* The full version of the VA library, like 1.2.3
|
||||
@@ -59,7 +66,7 @@
|
||||
* The full version of the VA library, in string form (suited for
|
||||
* string concatenation)
|
||||
*/
|
||||
-#define VA_VERSION_S "@LIBVA_VERSION@"
|
||||
+#define VA_VERSION_S "@LIBVA_VERSION@-sds@LIBVA_SDS_VERSION@"
|
||||
|
||||
/**
|
||||
* VA_VERSION_HEX:
|
||||
diff -Naur libva-0.31.0/src/x11/Makefile.in libva-0.31.0.diff/src/x11/Makefile.in
|
||||
--- libva-0.31.0/src/x11/Makefile.in 2009-10-10 23:19:00.355783107 +0200
|
||||
+++ libva-0.31.0.diff/src/x11/Makefile.in 2009-10-10 23:19:31.476782185 +0200
|
||||
@@ -159,6 +159,7 @@
|
||||
LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@
|
||||
LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@
|
||||
LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@
|
||||
+LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@
|
||||
LIBVA_VERSION = @LIBVA_VERSION@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
diff -Naur libva-0.31.0/test/Makefile.in libva-0.31.0.diff/test/Makefile.in
|
||||
--- libva-0.31.0/test/Makefile.in 2009-10-10 23:16:01.445782945 +0200
|
||||
+++ libva-0.31.0.diff/test/Makefile.in 2009-10-10 23:19:31.623782491 +0200
|
||||
@@ -185,6 +185,7 @@
|
||||
LIBVA_MAJOR_VERSION = @LIBVA_MAJOR_VERSION@
|
||||
LIBVA_MICRO_VERSION = @LIBVA_MICRO_VERSION@
|
||||
LIBVA_MINOR_VERSION = @LIBVA_MINOR_VERSION@
|
||||
+LIBVA_SDS_VERSION = @LIBVA_SDS_VERSION@
|
||||
LIBVA_VERSION = @LIBVA_VERSION@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
@ -0,0 +1,60 @@
|
||||
commit c682fb5ebd1964638f90590f66edf49629e7481d
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Fri Aug 21 11:34:50 2009 +0000
|
||||
|
||||
Move vaPutSurface() flags to <va/va.h> header.
|
||||
|
||||
diff --git a/src/va.h b/src/va.h
|
||||
index 0519f6f..6b4bbd4 100755
|
||||
--- a/src/va.h
|
||||
+++ b/src/va.h
|
||||
@@ -127,6 +127,22 @@ typedef int VAStatus; /* Return status type from functions */
|
||||
#define VA_STATUS_ERROR_RESOLUTION_NOT_SUPPORTED 0x00000013
|
||||
#define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF
|
||||
|
||||
+/* De-interlacing flags for vaPutSurface() */
|
||||
+#define VA_FRAME_PICTURE 0x00000000
|
||||
+#define VA_TOP_FIELD 0x00000001
|
||||
+#define VA_BOTTOM_FIELD 0x00000002
|
||||
+
|
||||
+/*
|
||||
+ * Clears the drawable with background color.
|
||||
+ * for hardware overlay based implementation this flag
|
||||
+ * can be used to turn off the overlay
|
||||
+ */
|
||||
+#define VA_CLEAR_DRAWABLE 0x00000008
|
||||
+
|
||||
+/* Color space conversion flags for vaPutSurface() */
|
||||
+#define VA_SRC_BT601 0x00000010
|
||||
+#define VA_SRC_BT709 0x00000020
|
||||
+
|
||||
/*
|
||||
* Returns a short english description of error_status
|
||||
*/
|
||||
diff --git a/src/x11/va_x11.h b/src/x11/va_x11.h
|
||||
index 2171ac6..5ab5200 100644
|
||||
--- a/src/x11/va_x11.h
|
||||
+++ b/src/x11/va_x11.h
|
||||
@@ -27,22 +27,6 @@ VADisplay vaGetDisplay (
|
||||
* color space conversion and scaling to the destination
|
||||
* rectangle
|
||||
*/
|
||||
-/* de-interlacing flags for vaPutSurface */
|
||||
-#define VA_FRAME_PICTURE 0x00000000
|
||||
-#define VA_TOP_FIELD 0x00000001
|
||||
-#define VA_BOTTOM_FIELD 0x00000002
|
||||
-
|
||||
-/*
|
||||
- * clears the drawable with background color.
|
||||
- * for hardware overlay based implementation this flag
|
||||
- * can be used to turn off the overlay
|
||||
- */
|
||||
-#define VA_CLEAR_DRAWABLE 0x00000008
|
||||
-
|
||||
-/* color space conversion flags for vaPutSurface */
|
||||
-#define VA_SRC_BT601 0x00000010
|
||||
-#define VA_SRC_BT709 0x00000020
|
||||
-
|
||||
VAStatus vaPutSurface (
|
||||
VADisplay dpy,
|
||||
VASurfaceID surface,
|
1980
packages/multimedia/libva/patches/321_libva_glx.diff
Normal file
1980
packages/multimedia/libva/patches/321_libva_glx.diff
Normal file
File diff suppressed because it is too large
Load Diff
1603
packages/multimedia/libva/patches/322_libva_glx.base.diff
Normal file
1603
packages/multimedia/libva/patches/322_libva_glx.base.diff
Normal file
File diff suppressed because it is too large
Load Diff
174
packages/multimedia/libva/patches/390_compat.base.diff
Normal file
174
packages/multimedia/libva/patches/390_compat.base.diff
Normal file
@ -0,0 +1,174 @@
|
||||
diff -Naur libva-0.31.0/src/Makefile.am libva-0.31.0.diff/src/Makefile.am
|
||||
--- libva-0.31.0/src/Makefile.am 2009-10-10 23:26:31.663789932 +0200
|
||||
+++ libva-0.31.0.diff/src/Makefile.am 2009-10-10 23:26:55.590658410 +0200
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
DIST_SUBDIRS = x11 glx
|
||||
|
||||
-libva_la_SOURCES = va.c
|
||||
+libva_la_SOURCES = va.c va_compat.c
|
||||
|
||||
libvaincludedir = ${includedir}/va
|
||||
libvainclude_HEADERS = va.h va_backend.h va_version.h
|
||||
@@ -67,4 +67,8 @@
|
||||
va_version.h
|
||||
|
||||
EXTRA_DIST = \
|
||||
- va_version.h.in
|
||||
+ va_version.h.in \
|
||||
+ va_compat.h \
|
||||
+ va_compat_template.h
|
||||
+
|
||||
+va_compat.c: va_compat_template.h
|
||||
diff -Naur libva-0.31.0/src/Makefile.in libva-0.31.0.diff/src/Makefile.in
|
||||
--- libva-0.31.0/src/Makefile.in 2009-10-10 23:26:31.664783096 +0200
|
||||
+++ libva-0.31.0.diff/src/Makefile.in 2009-10-10 23:27:11.668782308 +0200
|
||||
@@ -104,7 +104,7 @@
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(libva_x11_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
libva_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
-am_libva_la_OBJECTS = va.lo
|
||||
+am_libva_la_OBJECTS = va.lo va_compat.lo
|
||||
libva_la_OBJECTS = $(am_libva_la_OBJECTS)
|
||||
libva_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(libva_la_LDFLAGS) \
|
||||
@@ -331,14 +331,16 @@
|
||||
libva_glx_la_DEPENDENCIES = $(libvacorelib) glx/libva_glx.la libva-x11.la
|
||||
SUBDIRS = $(libva_x11_backenddir) $(libva_glx_backenddir)
|
||||
DIST_SUBDIRS = x11 glx
|
||||
-libva_la_SOURCES = va.c
|
||||
+libva_la_SOURCES = va.c va_compat.c
|
||||
libvaincludedir = ${includedir}/va
|
||||
libvainclude_HEADERS = va.h va_backend.h va_version.h
|
||||
DISTCLEANFILES = \
|
||||
va_version.h
|
||||
|
||||
EXTRA_DIST = \
|
||||
- va_version.h.in
|
||||
+ va_version.h.in \
|
||||
+ va_compat.h \
|
||||
+ va_compat_template.h
|
||||
|
||||
all: all-recursive
|
||||
|
||||
@@ -421,6 +423,7 @@
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/va.Plo@am__quote@
|
||||
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/va_compat.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@@ -788,6 +791,8 @@
|
||||
uninstall-libLTLIBRARIES uninstall-libvaincludeHEADERS
|
||||
|
||||
|
||||
+va_compat.c: va_compat_template.h
|
||||
+
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
diff -Naur libva-0.31.0/src/va_backend.h libva-0.31.0.diff/src/va_backend.h
|
||||
--- libva-0.31.0/src/va_backend.h 2009-10-10 23:26:31.665782195 +0200
|
||||
+++ libva-0.31.0.diff/src/va_backend.h 2009-10-10 23:26:55.596657968 +0200
|
||||
@@ -400,6 +400,7 @@
|
||||
|
||||
void *dri_state;
|
||||
void *glx; /* opaque for GLX code */
|
||||
+ void *compat; /* opaque for compat code */
|
||||
};
|
||||
|
||||
struct VADisplayContext
|
||||
diff -Naur libva-0.31.0/src/va.c libva-0.31.0.diff/src/va.c
|
||||
--- libva-0.31.0/src/va.c 2009-10-10 23:20:23.923657687 +0200
|
||||
+++ libva-0.31.0.diff/src/va.c 2009-10-10 23:26:55.592659404 +0200
|
||||
@@ -25,6 +25,7 @@
|
||||
#define _GNU_SOURCE 1
|
||||
#include "va.h"
|
||||
#include "va_backend.h"
|
||||
+#include "va_compat.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
@@ -41,6 +42,8 @@
|
||||
|
||||
#define DRIVER_INIT_FUNC "__vaDriverInit_0_31"
|
||||
#define DRIVER_INIT_FUNC_SDS "__vaDriverInit_0_31_sds"
|
||||
+#define DRIVER_INIT_FUNC_0_29 "__vaDriverInit_0_29"
|
||||
+#define DRIVER_INIT_FUNC_0_30 "__vaDriverInit_0_30"
|
||||
|
||||
#define DRIVER_EXTENSION "_drv_video.so"
|
||||
|
||||
@@ -168,11 +171,22 @@
|
||||
else
|
||||
{
|
||||
VADriverInit init_func;
|
||||
- init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC);
|
||||
+ int compat_version = 0;
|
||||
+ /* First, try SDS extensions (VDPAU and XvBA backends) */
|
||||
+ init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_SDS);
|
||||
if (!init_func)
|
||||
{
|
||||
- /* Then try SDS extensions (VDPAU and XvBA backends) */
|
||||
- init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_SDS);
|
||||
+ /* Otherwise, we need the compatibility layer for some buffers */
|
||||
+ init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC);
|
||||
+ compat_version = VA_MINOR_VERSION;
|
||||
+ if (!init_func) {
|
||||
+ init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_0_29);
|
||||
+ compat_version = 29;
|
||||
+ }
|
||||
+ if (!init_func) {
|
||||
+ init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_0_30);
|
||||
+ compat_version = 30;
|
||||
+ }
|
||||
}
|
||||
if (!init_func)
|
||||
{
|
||||
@@ -181,7 +195,36 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- vaStatus = (*init_func)(ctx);
|
||||
+ struct VADriverContext_0_29 ctx_0_29;
|
||||
+ struct VADriverContext_0_30 ctx_0_30;
|
||||
+ void *compat_ctx = NULL;
|
||||
+
|
||||
+ switch (compat_version) {
|
||||
+ case 29:
|
||||
+ compat_ctx = &ctx_0_29;
|
||||
+ ctx_0_29.pDriverData = NULL;
|
||||
+ ctx_0_29.x11_dpy = ctx->x11_dpy;
|
||||
+ ctx_0_29.x11_screen = ctx->x11_screen;
|
||||
+ break;
|
||||
+ case 30:
|
||||
+ compat_ctx = &ctx_0_30;
|
||||
+ ctx_0_30.pDriverData = NULL;
|
||||
+ ctx_0_30.x11_dpy = ctx->x11_dpy;
|
||||
+ ctx_0_30.x11_screen = ctx->x11_screen;
|
||||
+ break;
|
||||
+ case VA_MINOR_VERSION:
|
||||
+ compat_ctx = ctx;
|
||||
+ break;
|
||||
+ default:
|
||||
+ ASSERT(compat_version == 0);
|
||||
+ vaStatus = VA_STATUS_ERROR_UNKNOWN;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ vaStatus = (*init_func)(compat_ctx ? compat_ctx : ctx);
|
||||
+
|
||||
+ if (VA_STATUS_SUCCESS == vaStatus)
|
||||
+ vaStatus = va_compat_init(dpy, compat_version, compat_ctx);
|
||||
|
||||
if (VA_STATUS_SUCCESS == vaStatus)
|
||||
{
|
||||
@@ -379,6 +422,8 @@
|
||||
old_ctx->handle = NULL;
|
||||
}
|
||||
|
||||
+ va_compat_fini(dpy);
|
||||
+
|
||||
if (VA_STATUS_SUCCESS == vaStatus)
|
||||
pDisplayContext->vaDestroy(pDisplayContext);
|
||||
return vaStatus;
|
3219
packages/multimedia/libva/patches/391_compat.diff
Normal file
3219
packages/multimedia/libva/patches/391_compat.diff
Normal file
File diff suppressed because it is too large
Load Diff
14207
packages/multimedia/libva/patches/999_libtoolize.diff
Normal file
14207
packages/multimedia/libva/patches/999_libtoolize.diff
Normal file
File diff suppressed because it is too large
Load Diff
1
packages/multimedia/libva/url
Normal file
1
packages/multimedia/libva/url
Normal file
@ -0,0 +1 @@
|
||||
http://www.splitted-desktop.com/~gbeauchesne/libva/libva_0.31.0-1+sds5.tar.gz
|
Loading…
x
Reference in New Issue
Block a user