From e8e3ac9b1e0e4342fc3a6d7b435ddaf93f274304 Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Wed, 21 Jul 2010 17:31:45 -0400 Subject: meta-emenlow: Layer for eMenlow-based systems. This layer provides a kernel suitable for booting on eMenlow-based systems, plus support for Poulsbo graphics. The Poulsbo support includes a kernel patch for the graphics driver, a couple of libraries, the 2D and 3D X drivers, and a properly configured X server. The closed portions of this support are in the 3D driver, xpsb-glx. This package contains the binaries for the libraries that communicate with the kernel driver and a mesa library which uses those libraries. There is a README in meta-emenlow/ describing how to enable this layer. Where possible, the recipes use bitbake's new .bbappend facility in order to avoid copying recipes from meta/. There are checksums and license information for all of the new packages. Signed-off-by: Jeff Dike --- .../libva/libva-0.31.0/390_compat.base.patch | 135 +++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 meta-emenlow/packages/libva/libva-0.31.0/390_compat.base.patch (limited to 'meta-emenlow/packages/libva/libva-0.31.0/390_compat.base.patch') diff --git a/meta-emenlow/packages/libva/libva-0.31.0/390_compat.base.patch b/meta-emenlow/packages/libva/libva-0.31.0/390_compat.base.patch new file mode 100644 index 000000000..f2e0d61b0 --- /dev/null +++ b/meta-emenlow/packages/libva/libva-0.31.0/390_compat.base.patch @@ -0,0 +1,135 @@ +commit 483bc9e67afa9bcd8f99f08a74a78e7dfad4651f +Author: Gwenole Beauchesne +Date: Thu Jul 2 09:24:04 2009 +0000 + + Fix make dist (va_compat_template.h). + +commit 0e0da9ea861f14e8129767dbf6f11be5c051d85f +Author: Gwenole Beauchesne +Date: Wed Jun 24 11:40:56 2009 +0000 + + Add compatibility layer with original libva 0.29. + +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -44,7 +44,7 @@ libva_x11_la_DEPENDENCIES = $(libvacorelib) + libva_x11_la_DEPENDENCIES = $(libvacorelib) + + +-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 +@@ -53,4 +53,8 @@ DISTCLEANFILES = \ + 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 +--- a/src/va.c ++++ b/src/va.c +@@ -25,6 +25,7 @@ + #define _GNU_SOURCE 1 + #include "va.h" + #include "va_backend.h" ++#include "va_compat.h" + + #include + #include +@@ -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 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) + 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 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) + } + 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) + { +@@ -377,6 +422,8 @@ VAStatus vaTerminate ( + old_ctx->handle = NULL; + } + ++ va_compat_fini(dpy); ++ + if (VA_STATUS_SUCCESS == vaStatus) + pDisplayContext->vaDestroy(pDisplayContext); + return vaStatus; +--- a/src/va_backend.h ++++ b/src/va_backend.h +@@ -426,6 +426,7 @@ struct VADriverContext + + void *dri_state; + void *glx; /* opaque for GLX code */ ++ void *compat; /* opaque for compat code */ + }; + + struct VADisplayContext -- cgit v1.2.3