mirror of
git://git.yoctoproject.org/meta-intel
synced 2026-01-01 13:58:05 +00:00
emenlow: use emgd instead of psb for graphics driver
Remove all the Poulsbo graphics driver specific meta data files. And configure the BSP to use EMGD instead of psb for graphics stack. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
This commit is contained in:
parent
b4141a6404
commit
6eed009059
|
|
@ -10,27 +10,22 @@ PREFERRED_VERSION_linux-yocto ?= "3.4%"
|
|||
|
||||
require conf/machine/include/tune-atom.inc
|
||||
require conf/machine/include/ia32-base.inc
|
||||
require conf/machine/include/meta-intel.inc
|
||||
|
||||
PREFERRED_PROVIDER_libdrm = "libdrm-poulsbo"
|
||||
PREFERRED_PROVIDER_drm = "libdrm-poulsbo"
|
||||
PREFERRED_PROVIDER_virtual/libgl = "xpsb-glx"
|
||||
PREFERRED_PROVIDER_virtual/libgles1 = ""
|
||||
PREFERRED_PROVIDER_virtual/libgles2 = ""
|
||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-psb"
|
||||
PREFERRED_PROVIDER_virtual/xserver-xf86 = "xserver-psb"
|
||||
PREFERRED_PROVIDER_mesa-dri = "xpsb-glx"
|
||||
PREFERRED_VERSION_libva ?= "0.31.0"
|
||||
MACHINE_FEATURES += "va-impl-mixvideo"
|
||||
|
||||
XSERVER ?= "${XSERVER_IA32_BASE} \
|
||||
${XSERVER_IA32_EXT} \
|
||||
${XSERVER_IA32_EMGD} \
|
||||
"
|
||||
|
||||
PREFERRED_VERSION_xserver-xorg ?= "1.9.3"
|
||||
PREFERRED_VERSION_mesa-dri ?= "7.11"
|
||||
PREFERRED_VERSION_xf86-input-evdev ?= "2.6.0"
|
||||
PREFERRED_VERSION_cairo ?= "1.10.2"
|
||||
XSERVER ?= "xserver-psb \
|
||||
xserver-psb-extension-dri \
|
||||
xserver-psb-extension-dri2 \
|
||||
xserver-psb-extension-glx \
|
||||
xserver-psb-extension-extmod \
|
||||
xserver-psb-extension-dbe \
|
||||
xserver-psb-module-libint10 \
|
||||
xf86-input-mouse \
|
||||
xf86-input-keyboard \
|
||||
xf86-input-evdev"
|
||||
|
||||
APPEND += "video=vesafb vga=0x318"
|
||||
|
||||
VA_FEATURES = "${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", \
|
||||
"commercial", "gst-va-intel va-intel", "va-intel", d)}"
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS += "${VA_FEATURES}"
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
SDK-EXTRAS_emenlow ?= " lttng-ust-dev"
|
||||
|
|
@ -1 +0,0 @@
|
|||
SDK-EXTRAS_emenlow ?= " lttng-ust-dev"
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
require recipes-graphics/cairo/cairo.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77"
|
||||
|
||||
PR = "r0"
|
||||
|
||||
SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.gz"
|
||||
|
||||
SRC_URI[md5sum] = "f101a9e88b783337b20b2e26dfd26d5f"
|
||||
SRC_URI[sha256sum] = "32018c7998358eebc2ad578ff8d8559d34fc80252095f110a572ed23d989fc41"
|
||||
|
||||
PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
|
||||
|
||||
SUMMARY_${PN} = "The Cairo 2D vector graphics library"
|
||||
DESCRIPTION_${PN} = "Cairo is a multi-platform library providing anti-aliased \
|
||||
vector-based rendering for multiple target backends. Paths consist \
|
||||
of line segments and cubic splines and can be rendered at any width \
|
||||
with various join and cap styles. All colors may be specified with \
|
||||
optional translucence (opacity/alpha) and combined using the \
|
||||
extended Porter/Duff compositing algebra as found in the X Render \
|
||||
Extension."
|
||||
|
||||
SUMMARY_cairo-gobject = "The Cairo library GObject wrapper library"
|
||||
DESCRIPTION_cairo-gobject = "A GObject wrapper library for the Cairo API."
|
||||
|
||||
SUMMARY_cairo-script-interpreter = "The Cairo library script interpreter"
|
||||
DESCRIPTION_cairo-script-interpreter = "The Cairo script interpreter implements \
|
||||
CairoScript. CairoScript is used by tracing utilities to enable the ability \
|
||||
to replay rendering."
|
||||
|
||||
DESCRIPTION_cairo-perf-utils = "The Cairo library performance utilities"
|
||||
|
||||
FILES_${PN} = "${libdir}/libcairo.so.*"
|
||||
FILES_${PN}-dev += "${libdir}/cairo/*.la ${libdir}/cairo/*.so"
|
||||
FILES_${PN}-dbg += "${libdir}/cairo/.debug"
|
||||
FILES_${PN}-staticdev += "${libdir}/cairo/*.a"
|
||||
FILES_cairo-gobject = "${libdir}/libcairo-gobject.so.*"
|
||||
FILES_cairo-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*"
|
||||
FILES_cairo-perf-utils = "${bindir}/cairo-trace ${libdir}/cairo/libcairo-trace.so.*"
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
# Make this package produce libdrm-poulsbo instead of libdrm so that the
|
||||
# emenlow libdrm can coexist with the normal libdrm.
|
||||
# jdike@linux.intel.com
|
||||
|
||||
Index: libdrm-poulsbo-2.3.0/configure.ac
|
||||
===================================================================
|
||||
--- libdrm-poulsbo-2.3.0.orig/configure.ac
|
||||
+++ libdrm-poulsbo-2.3.0/configure.ac
|
||||
@@ -19,7 +19,7 @@
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
-AC_INIT([libdrm], 2.3.1, [dri-devel@lists.sourceforge.net], libdrm)
|
||||
+AC_INIT([libdrm_poulsbo], 2.3.1, [dri-devel@lists.sourceforge.net], libdrm_poulsbo)
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||
|
||||
@@ -35,4 +35,4 @@ AC_SYS_LARGEFILE
|
||||
pkgconfigdir=${libdir}/pkgconfig
|
||||
AC_SUBST(pkgconfigdir)
|
||||
|
||||
-AC_OUTPUT([Makefile libdrm/Makefile shared-core/Makefile libdrm.pc])
|
||||
+AC_OUTPUT([Makefile libdrm/Makefile shared-core/Makefile libdrm_poulsbo.pc])
|
||||
Index: libdrm-poulsbo-2.3.0/Makefile.am
|
||||
===================================================================
|
||||
--- libdrm-poulsbo-2.3.0.orig/Makefile.am
|
||||
+++ libdrm-poulsbo-2.3.0/Makefile.am
|
||||
@@ -25,6 +25,6 @@ AUTOMAKE_OPTIONS = foreign
|
||||
SUBDIRS = libdrm shared-core
|
||||
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
-pkgconfig_DATA = libdrm.pc
|
||||
+pkgconfig_DATA = libdrm_poulsbo.pc
|
||||
|
||||
-EXTRA_DIST = libdrm.pc.in
|
||||
+EXTRA_DIST = libdrm_poulsbo.pc.in
|
||||
Index: libdrm-poulsbo-2.3.0/libdrm/Makefile.am
|
||||
===================================================================
|
||||
--- libdrm-poulsbo-2.3.0.orig/libdrm/Makefile.am
|
||||
+++ libdrm-poulsbo-2.3.0/libdrm/Makefile.am
|
||||
@@ -18,14 +18,14 @@
|
||||
# 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.
|
||||
|
||||
-libdrm_la_LTLIBRARIES = libdrm.la
|
||||
-libdrm_ladir = $(libdir)
|
||||
-libdrm_la_LDFLAGS = -version-number 2:3:0 -no-undefined
|
||||
+libdrm_poulsbo_la_LTLIBRARIES = libdrm_poulsbo.la
|
||||
+libdrm_poulsbo_ladir = $(libdir)
|
||||
+libdrm_poulsbo_la_LDFLAGS = -version-number 2:3:0 -no-undefined
|
||||
|
||||
AM_CFLAGS = -I$(top_srcdir)/shared-core
|
||||
-libdrm_la_SOURCES = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c xf86drmMode.c
|
||||
+libdrm_poulsbo_la_SOURCES = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c xf86drmMode.c
|
||||
|
||||
-libdrmincludedir = ${includedir}/psb
|
||||
-libdrminclude_HEADERS = xf86drm.h xf86mm.h xf86drmMode.h
|
||||
+libdrm_poulsboincludedir = ${includedir}/psb
|
||||
+libdrm_poulsboinclude_HEADERS = xf86drm.h xf86mm.h xf86drmMode.h
|
||||
|
||||
EXTRA_DIST = ChangeLog TODO
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
DESCRIPTION = "Userspace interface to kernel DRM services"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://MIT_License.txt;md5=732825ecdcf420261531d935fcd914a7"
|
||||
PR = "r5"
|
||||
|
||||
PROVIDES = "libdrm-poulsbo"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
SRC_URI = "https://launchpad.net/~gma500/+archive/ppa/+files/libdrm-poulsbo_2.3.0-1ubuntu0sarvatt4~1004um1ubuntu1.tar.gz \
|
||||
file://libdrm-poulsbo.patch"
|
||||
|
||||
SRC_URI[md5sum] = "82c00bb9f1239f1d00b18411b89c2380"
|
||||
SRC_URI[sha256sum] = "335d4ac6694687475efe07b44a2d77a9a9fadcbc16946d01ea8a02339ae7d9ec"
|
||||
|
||||
do_configure_prepend() {
|
||||
sed -e 's/-ldrm/-ldrm_poulsbo/' -e 's/libdrm/libdrm_poulsbo/' \
|
||||
< ${S}/libdrm.pc.in > ${S}/libdrm_poulsbo.pc.in
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
ln -s libdrm_poulsbo.so.2.3.0 ${D}${libdir}/libdrm.so.2
|
||||
}
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
From 6622e8eba85cea476f8ef5b8c3620c4a0f024dcd Mon Sep 17 00:00:00 2001
|
||||
From: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed, 4 Nov 2009 10:56:54 +0000
|
||||
Subject: [PATCH] [G45] Add RGBA subpictures.
|
||||
|
||||
---
|
||||
i965_drv_video/i965_drv_video.c | 18 ++++++++++++++++++
|
||||
i965_drv_video/i965_drv_video.h | 3 ++-
|
||||
i965_drv_video/i965_render.c | 8 ++++----
|
||||
3 files changed, 24 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index 8f4bfc1..92c4785 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -70,6 +70,14 @@ i965_subpic_formats_map[I965_MAX_SUBPIC_FORMATS + 1] = {
|
||||
{ I965_SURFACETYPE_INDEXED, I965_SURFACEFORMAT_A4P4_UNORM,
|
||||
{ VA_FOURCC('A','I','4','4'), VA_MSB_FIRST, 8, },
|
||||
0 },
|
||||
+ { I965_SURFACETYPE_RGBA, I965_SURFACEFORMAT_B8G8R8A8_UNORM,
|
||||
+ { VA_FOURCC('B','G','R','A'), VA_LSB_FIRST, 32,
|
||||
+ 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 },
|
||||
+ 0 },
|
||||
+ { I965_SURFACETYPE_RGBA, I965_SURFACEFORMAT_R8G8B8A8_UNORM,
|
||||
+ { VA_FOURCC('R','G','B','A'), VA_LSB_FIRST, 32,
|
||||
+ 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 },
|
||||
+ 0 },
|
||||
};
|
||||
|
||||
static const i965_subpic_format_map_t *
|
||||
@@ -467,6 +475,7 @@ i965_CreateSubpicture(VADriverContextP ctx,
|
||||
obj_subpic->format = m->format;
|
||||
obj_subpic->width = obj_image->image.width;
|
||||
obj_subpic->height = obj_image->image.height;
|
||||
+ obj_subpic->pitch = obj_image->image.pitches[0];
|
||||
obj_subpic->bo = obj_image->bo;
|
||||
return VA_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -1218,6 +1227,15 @@ i965_CreateImage(VADriverContextP ctx,
|
||||
image->component_order[1] = 'G';
|
||||
image->component_order[2] = 'B';
|
||||
break;
|
||||
+ case VA_FOURCC('A','R','G','B'):
|
||||
+ case VA_FOURCC('A','B','G','R'):
|
||||
+ case VA_FOURCC('B','G','R','A'):
|
||||
+ case VA_FOURCC('R','G','B','A'):
|
||||
+ image->num_planes = 1;
|
||||
+ image->pitches[0] = width * 4;
|
||||
+ image->offsets[0] = 0;
|
||||
+ image->data_size = image->offsets[0] + image->pitches[0] * height;
|
||||
+ break;
|
||||
default:
|
||||
goto error;
|
||||
}
|
||||
diff --git a/i965_drv_video/i965_drv_video.h b/i965_drv_video/i965_drv_video.h
|
||||
index c95c799..4d775da 100644
|
||||
--- a/i965_drv_video/i965_drv_video.h
|
||||
+++ b/i965_drv_video/i965_drv_video.h
|
||||
@@ -42,7 +42,7 @@
|
||||
#define I965_MAX_ENTRYPOINTS 5
|
||||
#define I965_MAX_CONFIG_ATTRIBUTES 10
|
||||
#define I965_MAX_IMAGE_FORMATS 10
|
||||
-#define I965_MAX_SUBPIC_FORMATS 2
|
||||
+#define I965_MAX_SUBPIC_FORMATS 4
|
||||
#define I965_MAX_DISPLAY_ATTRIBUTES 4
|
||||
#define I965_STR_VENDOR "i965 Driver 0.1"
|
||||
|
||||
@@ -124,6 +124,7 @@ struct object_subpic
|
||||
unsigned int format;
|
||||
int width;
|
||||
int height;
|
||||
+ int pitch;
|
||||
dri_bo *bo;
|
||||
};
|
||||
|
||||
diff --git a/i965_drv_video/i965_render.c b/i965_drv_video/i965_render.c
|
||||
index f105e90..0476087 100644
|
||||
--- a/i965_drv_video/i965_render.c
|
||||
+++ b/i965_drv_video/i965_render.c
|
||||
@@ -586,7 +586,7 @@ i965_subpic_render_src_surface_state(VADriverContextP ctx,
|
||||
int index,
|
||||
dri_bo *region,
|
||||
unsigned long offset,
|
||||
- int w, int h, int format)
|
||||
+ int w, int h, int p, int format)
|
||||
{
|
||||
struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
struct i965_render_state *render_state = &i965->render_state;
|
||||
@@ -620,7 +620,7 @@ i965_subpic_render_src_surface_state(VADriverContextP ctx,
|
||||
ss->ss2.mip_count = 0;
|
||||
ss->ss2.render_target_rotation = 0;
|
||||
|
||||
- ss->ss3.pitch = w - 1;
|
||||
+ ss->ss3.pitch = p - 1;
|
||||
|
||||
dri_bo_emit_reloc(ss_bo,
|
||||
I915_GEM_DOMAIN_SAMPLER, 0,
|
||||
@@ -678,8 +678,8 @@ i965_subpic_render_src_surfaces_state(VADriverContextP ctx,
|
||||
region = obj_surface->bo;
|
||||
subpic_region = obj_image->bo;
|
||||
/*subpicture surface*/
|
||||
- i965_subpic_render_src_surface_state(ctx, 1, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->format);
|
||||
- i965_subpic_render_src_surface_state(ctx, 2, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->format);
|
||||
+ i965_subpic_render_src_surface_state(ctx, 1, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->pitch, obj_subpic->format);
|
||||
+ i965_subpic_render_src_surface_state(ctx, 2, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->pitch, obj_subpic->format);
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
1.5.4.3
|
||||
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
From 3935c6a836b8f90947f0af658a76b97a08a03c67 Mon Sep 17 00:00:00 2001
|
||||
From: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed, 4 Nov 2009 13:23:40 +0000
|
||||
Subject: [PATCH] [G45] Don't return VA_STATUS_SUCCESS for unimplemented functions.
|
||||
|
||||
---
|
||||
i965_drv_video/i965_drv_video.c | 18 +++++++++++-------
|
||||
1 files changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index 10baffb..d8a7bd1 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -534,7 +534,8 @@ i965_SetSubpictureImage(VADriverContextP ctx,
|
||||
VASubpictureID subpicture,
|
||||
VAImageID image)
|
||||
{
|
||||
- return VA_STATUS_SUCCESS;
|
||||
+ /* TODO */
|
||||
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VAStatus
|
||||
@@ -544,7 +545,8 @@ i965_SetSubpictureChromakey(VADriverContextP ctx,
|
||||
unsigned int chromakey_max,
|
||||
unsigned int chromakey_mask)
|
||||
{
|
||||
- return VA_STATUS_SUCCESS;
|
||||
+ /* TODO */
|
||||
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VAStatus
|
||||
@@ -552,7 +554,8 @@ i965_SetSubpictureGlobalAlpha(VADriverContextP ctx,
|
||||
VASubpictureID subpicture,
|
||||
float global_alpha)
|
||||
{
|
||||
- return VA_STATUS_SUCCESS;
|
||||
+ /* TODO */
|
||||
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VAStatus
|
||||
@@ -1141,7 +1144,7 @@ i965_GetDisplayAttributes(VADriverContextP ctx,
|
||||
int num_attributes)
|
||||
{
|
||||
/* TODO */
|
||||
- return VA_STATUS_ERROR_UNKNOWN;
|
||||
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1156,7 +1159,7 @@ i965_SetDisplayAttributes(VADriverContextP ctx,
|
||||
int num_attributes)
|
||||
{
|
||||
/* TODO */
|
||||
- return VA_STATUS_ERROR_UNKNOWN;
|
||||
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
VAStatus
|
||||
@@ -1166,7 +1169,7 @@ i965_DbgCopySurfaceToBuffer(VADriverContextP ctx,
|
||||
unsigned int *stride) /* out */
|
||||
{
|
||||
/* TODO */
|
||||
- return VA_STATUS_ERROR_UNKNOWN;
|
||||
+ return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
static VAStatus
|
||||
@@ -1318,7 +1321,8 @@ VAStatus i965_DeriveImage(VADriverContextP ctx,
|
||||
VASurfaceID surface,
|
||||
VAImage *image) /* out */
|
||||
{
|
||||
- return VA_STATUS_SUCCESS;
|
||||
+ /* TODO */
|
||||
+ return VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
1.5.4.3
|
||||
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
From 23b23e8d65551779f10aedddee7882c2e71ac162 Mon Sep 17 00:00:00 2001
|
||||
From: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed, 4 Nov 2009 13:01:44 +0000
|
||||
Subject: [PATCH] [G45] Add YV12 image format.
|
||||
|
||||
---
|
||||
i965_drv_video/i965_drv_video.c | 50 ++++++++++++++++++++++++++++++++++++++-
|
||||
i965_drv_video/i965_drv_video.h | 2 +-
|
||||
2 files changed, 50 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index 1f026bc..8558d0e 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -54,6 +54,36 @@ enum {
|
||||
I965_SURFACETYPE_INDEXED
|
||||
};
|
||||
|
||||
+/* List of supported image formats */
|
||||
+typedef struct {
|
||||
+ unsigned int type;
|
||||
+ VAImageFormat va_format;
|
||||
+} i965_image_format_map_t;
|
||||
+
|
||||
+static const i965_image_format_map_t
|
||||
+i965_image_formats_map[I965_MAX_IMAGE_FORMATS + 1] = {
|
||||
+ { I965_SURFACETYPE_YUV,
|
||||
+ { VA_FOURCC('Y','V','1','2'), VA_LSB_FIRST, 12, } },
|
||||
+};
|
||||
+
|
||||
+static const i965_image_format_map_t *
|
||||
+get_image_format(const VAImageFormat *va_format)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+ for (i = 0; i965_image_formats_map[i].type != 0; i++) {
|
||||
+ const i965_image_format_map_t * const m = &i965_image_formats_map[i];
|
||||
+ if (m->va_format.fourcc == va_format->fourcc &&
|
||||
+ (m->type == I965_SURFACETYPE_RGBA ?
|
||||
+ (m->va_format.byte_order == va_format->byte_order &&
|
||||
+ m->va_format.red_mask == va_format->red_mask &&
|
||||
+ m->va_format.green_mask == va_format->green_mask &&
|
||||
+ m->va_format.blue_mask == va_format->blue_mask &&
|
||||
+ m->va_format.alpha_mask == va_format->alpha_mask) : 1))
|
||||
+ return m;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
/* List of supported subpicture formats */
|
||||
typedef struct {
|
||||
unsigned int type;
|
||||
@@ -398,8 +428,16 @@ i965_QueryImageFormats(VADriverContextP ctx,
|
||||
VAImageFormat *format_list, /* out */
|
||||
int *num_formats) /* out */
|
||||
{
|
||||
+ int n;
|
||||
+
|
||||
+ for (n = 0; i965_image_formats_map[n].va_format.fourcc != 0; n++) {
|
||||
+ const i965_image_format_map_t * const m = &i965_image_formats_map[n];
|
||||
+ if (format_list)
|
||||
+ format_list[n] = m->va_format;
|
||||
+ }
|
||||
+
|
||||
if (num_formats)
|
||||
- *num_formats = 0;
|
||||
+ *num_formats = n;
|
||||
|
||||
return VA_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -1236,6 +1274,16 @@ i965_CreateImage(VADriverContextP ctx,
|
||||
image->offsets[0] = 0;
|
||||
image->data_size = image->offsets[0] + image->pitches[0] * height;
|
||||
break;
|
||||
+ case VA_FOURCC('Y','V','1','2'):
|
||||
+ image->num_planes = 3;
|
||||
+ image->pitches[0] = width;
|
||||
+ image->offsets[0] = 0;
|
||||
+ image->pitches[1] = width2;
|
||||
+ image->offsets[1] = size;
|
||||
+ image->pitches[2] = width2;
|
||||
+ image->offsets[2] = size + size2;
|
||||
+ image->data_size = size + 2 * size2;
|
||||
+ break;
|
||||
default:
|
||||
goto error;
|
||||
}
|
||||
diff --git a/i965_drv_video/i965_drv_video.h b/i965_drv_video/i965_drv_video.h
|
||||
index 4d775da..f512793 100644
|
||||
--- a/i965_drv_video/i965_drv_video.h
|
||||
+++ b/i965_drv_video/i965_drv_video.h
|
||||
@@ -41,7 +41,7 @@
|
||||
#define I965_MAX_PROFILES 11
|
||||
#define I965_MAX_ENTRYPOINTS 5
|
||||
#define I965_MAX_CONFIG_ATTRIBUTES 10
|
||||
-#define I965_MAX_IMAGE_FORMATS 10
|
||||
+#define I965_MAX_IMAGE_FORMATS 1
|
||||
#define I965_MAX_SUBPIC_FORMATS 4
|
||||
#define I965_MAX_DISPLAY_ATTRIBUTES 4
|
||||
#define I965_STR_VENDOR "i965 Driver 0.1"
|
||||
--
|
||||
1.5.4.3
|
||||
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
From 37f40c0cdc9667907dfb784874b42fb16c2c9bde Mon Sep 17 00:00:00 2001
|
||||
From: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed, 4 Nov 2009 13:16:34 +0000
|
||||
Subject: [PATCH] =?utf-8?q?[G45]=C2=A0Implement=20vaGetImage()=20for=20full-sized=20surface=20readback.?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
i965_drv_video/i965_drv_video.c | 45 ++++++++++++++++++++++++++++++++++++++-
|
||||
1 files changed, 44 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index 8558d0e..10baffb 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -1388,7 +1388,50 @@ i965_GetImage(VADriverContextP ctx,
|
||||
unsigned int height,
|
||||
VAImageID image)
|
||||
{
|
||||
- return VA_STATUS_SUCCESS;
|
||||
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
+
|
||||
+ struct object_surface *obj_surface = SURFACE(surface);
|
||||
+ if (!obj_surface)
|
||||
+ return VA_STATUS_ERROR_INVALID_SURFACE;
|
||||
+
|
||||
+ struct object_image *obj_image = IMAGE(image);
|
||||
+ if (!obj_image)
|
||||
+ return VA_STATUS_ERROR_INVALID_IMAGE;
|
||||
+
|
||||
+ /* XXX: we only support full-size surface readback */
|
||||
+ if (x != 0 ||
|
||||
+ y != 0 ||
|
||||
+ width != obj_surface->width ||
|
||||
+ height != obj_surface->height)
|
||||
+ return VA_STATUS_ERROR_INVALID_PARAMETER;
|
||||
+
|
||||
+ /* XXX: we only support 1:1 image copies */
|
||||
+ if (width != obj_image->image.width ||
|
||||
+ height != obj_image->image.height)
|
||||
+ return VA_STATUS_ERROR_INVALID_PARAMETER;
|
||||
+
|
||||
+ VAStatus va_status;
|
||||
+ void *image_data = NULL;
|
||||
+
|
||||
+ va_status = i965_MapBuffer(ctx, obj_image->image.buf, &image_data);
|
||||
+ if (va_status != VA_STATUS_SUCCESS)
|
||||
+ return va_status;
|
||||
+
|
||||
+ dri_bo_map(obj_surface->bo, 0);
|
||||
+
|
||||
+ switch (obj_image->image.format.fourcc) {
|
||||
+ case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */
|
||||
+ memcpy(image_data, obj_surface->bo->virtual, obj_surface->bo->size);
|
||||
+ break;
|
||||
+ default:
|
||||
+ va_status = VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ dri_bo_unmap(obj_surface->bo);
|
||||
+
|
||||
+ i965_UnmapBuffer(ctx, obj_image->image.buf);
|
||||
+ return va_status;
|
||||
}
|
||||
|
||||
VAStatus
|
||||
--
|
||||
1.5.4.3
|
||||
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
From 000807cfbd8bcbc9cd4bf28a066087fee43396b4 Mon Sep 17 00:00:00 2001
|
||||
From: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed, 4 Nov 2009 13:36:39 +0000
|
||||
Subject: [PATCH] =?utf-8?q?[G45]=C2=A0Implement=20vaPutImage()=20for=20full-sized=20surface=20uploads.?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
i965_drv_video/i965_drv_video.c | 78 +++++++++++++++++++++++++++++++--------
|
||||
1 files changed, 62 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index d8a7bd1..e8f638c 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -443,22 +443,6 @@ i965_QueryImageFormats(VADriverContextP ctx,
|
||||
}
|
||||
|
||||
VAStatus
|
||||
-i965_PutImage(VADriverContextP ctx,
|
||||
- VASurfaceID surface,
|
||||
- VAImageID image,
|
||||
- int src_x,
|
||||
- int src_y,
|
||||
- unsigned int src_width,
|
||||
- unsigned int src_height,
|
||||
- int dest_x,
|
||||
- int dest_y,
|
||||
- unsigned int dest_width,
|
||||
- unsigned int dest_height)
|
||||
-{
|
||||
- return VA_STATUS_SUCCESS;
|
||||
-}
|
||||
-
|
||||
-VAStatus
|
||||
i965_QuerySubpictureFormats(VADriverContextP ctx,
|
||||
VAImageFormat *format_list, /* out */
|
||||
unsigned int *flags, /* out */
|
||||
@@ -1439,6 +1423,68 @@ i965_GetImage(VADriverContextP ctx,
|
||||
}
|
||||
|
||||
VAStatus
|
||||
+i965_PutImage(VADriverContextP ctx,
|
||||
+ VASurfaceID surface,
|
||||
+ VAImageID image,
|
||||
+ int src_x,
|
||||
+ int src_y,
|
||||
+ unsigned int src_width,
|
||||
+ unsigned int src_height,
|
||||
+ int dest_x,
|
||||
+ int dest_y,
|
||||
+ unsigned int dest_width,
|
||||
+ unsigned int dest_height)
|
||||
+{
|
||||
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
+
|
||||
+ struct object_surface *obj_surface = SURFACE(surface);
|
||||
+ if (!obj_surface)
|
||||
+ return VA_STATUS_ERROR_INVALID_SURFACE;
|
||||
+
|
||||
+ struct object_image *obj_image = IMAGE(image);
|
||||
+ if (!obj_image)
|
||||
+ return VA_STATUS_ERROR_INVALID_IMAGE;
|
||||
+
|
||||
+ /* XXX: we don't support partial video surface updates */
|
||||
+ if (src_x != 0 ||
|
||||
+ src_y != 0 ||
|
||||
+ src_width != obj_image->image.width ||
|
||||
+ src_height != obj_image->image.height)
|
||||
+ return VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
+ if (dest_x != 0 ||
|
||||
+ dest_y != 0 ||
|
||||
+ dest_width != obj_surface->width ||
|
||||
+ dest_height != obj_surface->height)
|
||||
+ return VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
+ if (src_width != dest_width ||
|
||||
+ src_height != dest_height)
|
||||
+ return VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
+
|
||||
+ VAStatus va_status;
|
||||
+ void *image_data = NULL;
|
||||
+
|
||||
+ va_status = i965_MapBuffer(ctx, obj_image->image.buf, &image_data);
|
||||
+ if (va_status != VA_STATUS_SUCCESS)
|
||||
+ return va_status;
|
||||
+
|
||||
+ dri_bo_map(obj_surface->bo, 1);
|
||||
+
|
||||
+ switch (obj_image->image.format.fourcc) {
|
||||
+ case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */
|
||||
+ memcpy(obj_surface->bo->virtual, image_data, obj_surface->bo->size);
|
||||
+ break;
|
||||
+ default:
|
||||
+ va_status = VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ dri_bo_unmap(obj_surface->bo);
|
||||
+
|
||||
+ i965_UnmapBuffer(ctx, obj_image->image.buf);
|
||||
+ return va_status;
|
||||
+}
|
||||
+
|
||||
+VAStatus
|
||||
i965_PutSurface(VADriverContextP ctx,
|
||||
VASurfaceID surface,
|
||||
Drawable draw, /* X Drawable */
|
||||
--
|
||||
1.5.4.3
|
||||
|
||||
|
|
@ -1,531 +0,0 @@
|
|||
From 90de12a47e26ccc0b4cc8189c76991609481870d Mon Sep 17 00:00:00 2001
|
||||
From: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed, 4 Nov 2009 17:34:53 +0000
|
||||
Subject: [PATCH] [G45] Handle cliprects in vaPutSurface().
|
||||
|
||||
---
|
||||
i965_drv_video/i965_drv_video.c | 39 ++++--
|
||||
i965_drv_video/i965_render.c | 284 +++++++++++++++++++--------------------
|
||||
i965_drv_video/i965_render.h | 30 ++---
|
||||
3 files changed, 176 insertions(+), 177 deletions(-)
|
||||
|
||||
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
|
||||
index e8f638c..20d6bab 100644
|
||||
--- a/i965_drv_video/i965_drv_video.c
|
||||
+++ b/i965_drv_video/i965_drv_video.c
|
||||
@@ -1507,13 +1507,23 @@ i965_PutSurface(VADriverContextP ctx,
|
||||
union dri_buffer *buffer;
|
||||
struct intel_region *dest_region;
|
||||
struct object_surface *obj_surface;
|
||||
- int ret;
|
||||
+ int ret;
|
||||
uint32_t name;
|
||||
+ VARectangle src_rect, dst_rect;
|
||||
Bool new_region = False;
|
||||
+
|
||||
/* Currently don't support DRI1 */
|
||||
if (dri_state->driConnectedFlag != VA_DRI2)
|
||||
return VA_STATUS_ERROR_UNKNOWN;
|
||||
|
||||
+ /* XXX: we currently only support up to 64 cliprects */
|
||||
+ if (number_cliprects > MAX_CLIP_RECTS)
|
||||
+ return VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
+
|
||||
+ obj_surface = SURFACE(surface);
|
||||
+ if (!obj_surface)
|
||||
+ return VA_STATUS_ERROR_INVALID_SURFACE;
|
||||
+
|
||||
dri_drawable = dri_get_drawable(ctx, draw);
|
||||
assert(dri_drawable);
|
||||
|
||||
@@ -1552,17 +1562,24 @@ i965_PutSurface(VADriverContextP ctx,
|
||||
assert(ret == 0);
|
||||
}
|
||||
|
||||
- i965_render_put_surface(ctx, surface,
|
||||
- srcx, srcy, srcw, srch,
|
||||
- destx, desty, destw, desth);
|
||||
- obj_surface = SURFACE(surface);
|
||||
- if(obj_surface->subpic != VA_INVALID_ID) {
|
||||
- i965_render_put_subpic(ctx, surface,
|
||||
- srcx, srcy, srcw, srch,
|
||||
- destx, desty, destw, desth);
|
||||
- }
|
||||
- dri_swap_buffer(ctx, dri_drawable);
|
||||
+ src_rect.x = srcx;
|
||||
+ src_rect.y = srcy;
|
||||
+ src_rect.width = srcw;
|
||||
+ src_rect.height = srch;
|
||||
+
|
||||
+ dst_rect.x = destx;
|
||||
+ dst_rect.y = desty;
|
||||
+ dst_rect.width = destw;
|
||||
+ dst_rect.height = desth;
|
||||
|
||||
+ i965_render_put_surface(ctx, surface, &src_rect, &dst_rect,
|
||||
+ cliprects, number_cliprects);
|
||||
+
|
||||
+ if (obj_surface->subpic != VA_INVALID_ID)
|
||||
+ i965_render_put_subpic(ctx, surface, &src_rect, &dst_rect,
|
||||
+ cliprects, number_cliprects);
|
||||
+
|
||||
+ dri_swap_buffer(ctx, dri_drawable);
|
||||
return VA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
diff --git a/i965_drv_video/i965_render.c b/i965_drv_video/i965_render.c
|
||||
index 0476087..d7cd8fe 100644
|
||||
--- a/i965_drv_video/i965_render.c
|
||||
+++ b/i965_drv_video/i965_render.c
|
||||
@@ -787,13 +787,81 @@ i965_render_binding_table(VADriverContextP ctx)
|
||||
dri_bo_unmap(render_state->wm.binding_table);
|
||||
}
|
||||
|
||||
-static void
|
||||
+static unsigned int
|
||||
+i965_render_do_upload_vertex(VADriverContextP ctx,
|
||||
+ unsigned int width,
|
||||
+ unsigned int height,
|
||||
+ const VARectangle *src_rect,
|
||||
+ const VARectangle *dst_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects)
|
||||
+{
|
||||
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
+ struct i965_render_state *render_state = &i965->render_state;
|
||||
+ struct intel_region *dest_region = render_state->draw_region;
|
||||
+ float *vb, tx1, tx2, ty1, ty2;
|
||||
+ int x1, x2, y1, y2;
|
||||
+ unsigned int i, n;
|
||||
+
|
||||
+ if (!cliprects || num_cliprects == 0) {
|
||||
+ cliprects = dst_rect;
|
||||
+ num_cliprects = 1;
|
||||
+ }
|
||||
+
|
||||
+ dri_bo_map(render_state->vb.vertex_buffer, 1);
|
||||
+ assert(render_state->vb.vertex_buffer->virtual);
|
||||
+ vb = render_state->vb.vertex_buffer->virtual;
|
||||
+
|
||||
+ for (n = 0, i = 0; i < num_cliprects; i++) {
|
||||
+ x1 = dest_region->x + cliprects[i].x;
|
||||
+ y1 = dest_region->y + cliprects[i].y;
|
||||
+ x2 = x1 + cliprects[i].width;
|
||||
+ y2 = y1 + cliprects[i].height;
|
||||
+ x1 = MAX(x1, dst_rect->x);
|
||||
+ y1 = MAX(y1, dst_rect->y);
|
||||
+ x2 = MIN(x2, dst_rect->x + dst_rect->width);
|
||||
+ y2 = MIN(y2, dst_rect->y + dst_rect->height);
|
||||
+
|
||||
+ if (x2 <= x1 || y2 <= y1)
|
||||
+ continue;
|
||||
+
|
||||
+ const float sx1 = (float)(x1 - dst_rect->x) / (float)dst_rect->width;
|
||||
+ const float sy1 = (float)(y1 - dst_rect->y) / (float)dst_rect->height;
|
||||
+ const float sx2 = (float)(x2 - dst_rect->x) / (float)dst_rect->width;
|
||||
+ const float sy2 = (float)(y2 - dst_rect->y) / (float)dst_rect->height;
|
||||
+ tx1 = ((float)src_rect->x + sx1 * (float)src_rect->width) / width;
|
||||
+ ty1 = ((float)src_rect->y + sy1 * (float)src_rect->height) / height;
|
||||
+ tx2 = ((float)src_rect->x + sx2 * (float)src_rect->width) / width;
|
||||
+ ty2 = ((float)src_rect->y + sy2 * (float)src_rect->height) / height;
|
||||
+
|
||||
+ vb[n++] = tx2;
|
||||
+ vb[n++] = ty2;
|
||||
+ vb[n++] = x2;
|
||||
+ vb[n++] = y2;
|
||||
+
|
||||
+ vb[n++] = tx1;
|
||||
+ vb[n++] = ty2;
|
||||
+ vb[n++] = x1;
|
||||
+ vb[n++] = y2;
|
||||
+
|
||||
+ vb[n++] = tx1;
|
||||
+ vb[n++] = ty1;
|
||||
+ vb[n++] = x1;
|
||||
+ vb[n++] = y1;
|
||||
+ }
|
||||
+
|
||||
+ dri_bo_unmap(render_state->vb.vertex_buffer);
|
||||
+ return n / 12;
|
||||
+}
|
||||
+
|
||||
+static unsigned int
|
||||
i965_subpic_render_upload_vertex(VADriverContextP ctx,
|
||||
VASurfaceID surface,
|
||||
- const VARectangle *output_rect)
|
||||
-{
|
||||
+ const VARectangle *output_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects)
|
||||
+{
|
||||
struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
- struct i965_render_state *render_state = &i965->render_state;
|
||||
struct object_surface *obj_surface = SURFACE(surface);
|
||||
struct object_subpic *obj_subpic = SUBPIC(obj_surface->subpic);
|
||||
|
||||
@@ -803,8 +871,6 @@ i965_subpic_render_upload_vertex(VADriverContextP ctx,
|
||||
const float ssy = (float)output_rect->height / (float)obj_surface->height;
|
||||
const float sx = psx * ssx;
|
||||
const float sy = psy * ssy;
|
||||
- float *vb, tx1, tx2, ty1, ty2, x1, x2, y1, y2;
|
||||
- int i = 0;
|
||||
|
||||
VARectangle dst_rect;
|
||||
dst_rect.x = output_rect->x + sx * (float)obj_subpic->dst_rect.x;
|
||||
@@ -812,106 +878,38 @@ i965_subpic_render_upload_vertex(VADriverContextP ctx,
|
||||
dst_rect.width = sx * (float)obj_subpic->dst_rect.width;
|
||||
dst_rect.height = sy * (float)obj_subpic->dst_rect.height;
|
||||
|
||||
- dri_bo_map(render_state->vb.vertex_buffer, 1);
|
||||
- assert(render_state->vb.vertex_buffer->virtual);
|
||||
- vb = render_state->vb.vertex_buffer->virtual;
|
||||
-
|
||||
- tx1 = (float)obj_subpic->src_rect.x / (float)obj_subpic->width;
|
||||
- ty1 = (float)obj_subpic->src_rect.y / (float)obj_subpic->height;
|
||||
- tx2 = (float)(obj_subpic->src_rect.x + obj_subpic->src_rect.width) / (float)obj_subpic->width;
|
||||
- ty2 = (float)(obj_subpic->src_rect.y + obj_subpic->src_rect.height) / (float)obj_subpic->height;
|
||||
-
|
||||
- x1 = (float)dst_rect.x;
|
||||
- y1 = (float)dst_rect.y;
|
||||
- x2 = (float)(dst_rect.x + dst_rect.width);
|
||||
- y2 = (float)(dst_rect.y + dst_rect.height);
|
||||
-
|
||||
- vb[i++] = tx2;
|
||||
- vb[i++] = ty2;
|
||||
- vb[i++] = x2;
|
||||
- vb[i++] = y2;
|
||||
-
|
||||
- vb[i++] = tx1;
|
||||
- vb[i++] = ty2;
|
||||
- vb[i++] = x1;
|
||||
- vb[i++] = y2;
|
||||
-
|
||||
- vb[i++] = tx1;
|
||||
- vb[i++] = ty1;
|
||||
- vb[i++] = x1;
|
||||
- vb[i++] = y1;
|
||||
- dri_bo_unmap(render_state->vb.vertex_buffer);
|
||||
+ return i965_render_do_upload_vertex(ctx,
|
||||
+ obj_subpic->width, obj_subpic->height,
|
||||
+ &obj_subpic->src_rect, &dst_rect,
|
||||
+ cliprects, num_cliprects);
|
||||
}
|
||||
|
||||
-static void
|
||||
+static unsigned int
|
||||
i965_render_upload_vertex(VADriverContextP ctx,
|
||||
VASurfaceID surface,
|
||||
- short srcx,
|
||||
- short srcy,
|
||||
- unsigned short srcw,
|
||||
- unsigned short srch,
|
||||
- short destx,
|
||||
- short desty,
|
||||
- unsigned short destw,
|
||||
- unsigned short desth)
|
||||
+ const VARectangle *src_rect,
|
||||
+ const VARectangle *dst_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects)
|
||||
{
|
||||
struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
- struct i965_render_state *render_state = &i965->render_state;
|
||||
- struct intel_region *dest_region = render_state->draw_region;
|
||||
- struct object_surface *obj_surface;
|
||||
- float *vb;
|
||||
-
|
||||
- float u1, v1, u2, v2;
|
||||
- int i, width, height;
|
||||
- int box_x1 = dest_region->x + destx;
|
||||
- int box_y1 = dest_region->y + desty;
|
||||
- int box_x2 = box_x1 + destw;
|
||||
- int box_y2 = box_y1 + desth;
|
||||
-
|
||||
- obj_surface = SURFACE(surface);
|
||||
- assert(surface);
|
||||
- width = obj_surface->width;
|
||||
- height = obj_surface->height;
|
||||
-
|
||||
- u1 = (float)srcx / width;
|
||||
- v1 = (float)srcy / height;
|
||||
- u2 = (float)(srcx + srcw) / width;
|
||||
- v2 = (float)(srcy + srch) / height;
|
||||
-
|
||||
- dri_bo_map(render_state->vb.vertex_buffer, 1);
|
||||
- assert(render_state->vb.vertex_buffer->virtual);
|
||||
- vb = render_state->vb.vertex_buffer->virtual;
|
||||
-
|
||||
- i = 0;
|
||||
- vb[i++] = u2;
|
||||
- vb[i++] = v2;
|
||||
- vb[i++] = (float)box_x2;
|
||||
- vb[i++] = (float)box_y2;
|
||||
-
|
||||
- vb[i++] = u1;
|
||||
- vb[i++] = v2;
|
||||
- vb[i++] = (float)box_x1;
|
||||
- vb[i++] = (float)box_y2;
|
||||
-
|
||||
- vb[i++] = u1;
|
||||
- vb[i++] = v1;
|
||||
- vb[i++] = (float)box_x1;
|
||||
- vb[i++] = (float)box_y1;
|
||||
+ struct object_surface *obj_surface = SURFACE(surface);
|
||||
+ assert(obj_surface);
|
||||
|
||||
- dri_bo_unmap(render_state->vb.vertex_buffer);
|
||||
+ return i965_render_do_upload_vertex(ctx,
|
||||
+ obj_surface->width, obj_surface->height,
|
||||
+ src_rect,
|
||||
+ dst_rect,
|
||||
+ cliprects, num_cliprects);
|
||||
}
|
||||
|
||||
-static void
|
||||
+static unsigned int
|
||||
i965_surface_render_state_setup(VADriverContextP ctx,
|
||||
- VASurfaceID surface,
|
||||
- short srcx,
|
||||
- short srcy,
|
||||
- unsigned short srcw,
|
||||
- unsigned short srch,
|
||||
- short destx,
|
||||
- short desty,
|
||||
- unsigned short destw,
|
||||
- unsigned short desth)
|
||||
+ VASurfaceID surface,
|
||||
+ const VARectangle *src_rect,
|
||||
+ const VARectangle *dst_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects)
|
||||
{
|
||||
i965_render_vs_unit(ctx);
|
||||
i965_render_sf_unit(ctx);
|
||||
@@ -922,21 +920,17 @@ i965_surface_render_state_setup(VADriverContextP ctx,
|
||||
i965_render_cc_viewport(ctx);
|
||||
i965_render_cc_unit(ctx);
|
||||
i965_render_binding_table(ctx);
|
||||
- i965_render_upload_vertex(ctx, surface,
|
||||
- srcx, srcy, srcw, srch,
|
||||
- destx, desty, destw, desth);
|
||||
+ return i965_render_upload_vertex(ctx, surface, src_rect, dst_rect,
|
||||
+ cliprects, num_cliprects);
|
||||
}
|
||||
-static void
|
||||
+
|
||||
+static unsigned int
|
||||
i965_subpic_render_state_setup(VADriverContextP ctx,
|
||||
- VASurfaceID surface,
|
||||
- short srcx,
|
||||
- short srcy,
|
||||
- unsigned short srcw,
|
||||
- unsigned short srch,
|
||||
- short destx,
|
||||
- short desty,
|
||||
- unsigned short destw,
|
||||
- unsigned short desth)
|
||||
+ VASurfaceID surface,
|
||||
+ const VARectangle *src_rect,
|
||||
+ const VARectangle *dst_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects)
|
||||
{
|
||||
i965_render_vs_unit(ctx);
|
||||
i965_render_sf_unit(ctx);
|
||||
@@ -947,16 +941,10 @@ i965_subpic_render_state_setup(VADriverContextP ctx,
|
||||
i965_render_cc_viewport(ctx);
|
||||
i965_subpic_render_cc_unit(ctx);
|
||||
i965_render_binding_table(ctx);
|
||||
-
|
||||
- VARectangle output_rect;
|
||||
- output_rect.x = destx;
|
||||
- output_rect.y = desty;
|
||||
- output_rect.width = destw;
|
||||
- output_rect.height = desth;
|
||||
- i965_subpic_render_upload_vertex(ctx, surface, &output_rect);
|
||||
+ return i965_subpic_render_upload_vertex(ctx, surface, dst_rect,
|
||||
+ cliprects, num_cliprects);
|
||||
}
|
||||
|
||||
-
|
||||
static void
|
||||
i965_render_pipeline_select(VADriverContextP ctx)
|
||||
{
|
||||
@@ -1192,7 +1180,7 @@ i965_render_upload_image_palette(
|
||||
}
|
||||
|
||||
static void
|
||||
-i965_render_startup(VADriverContextP ctx)
|
||||
+i965_render_startup(VADriverContextP ctx, unsigned int vb_offset)
|
||||
{
|
||||
struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
struct i965_render_state *render_state = &i965->render_state;
|
||||
@@ -1203,7 +1191,7 @@ i965_render_startup(VADriverContextP ctx)
|
||||
(0 << VB0_BUFFER_INDEX_SHIFT) |
|
||||
VB0_VERTEXDATA |
|
||||
((4 * 4) << VB0_BUFFER_PITCH_SHIFT));
|
||||
- OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, 0);
|
||||
+ OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, vb_offset);
|
||||
|
||||
if (IS_IGDNG(i965->intel.device_id))
|
||||
OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, 12 * 4);
|
||||
@@ -1268,8 +1256,10 @@ i965_clear_dest_region(VADriverContextP ctx)
|
||||
}
|
||||
|
||||
static void
|
||||
-i965_surface_render_pipeline_setup(VADriverContextP ctx)
|
||||
+i965_surface_render_pipeline_setup(VADriverContextP ctx, unsigned int n_rects)
|
||||
{
|
||||
+ unsigned int i;
|
||||
+
|
||||
intel_batchbuffer_start_atomic(ctx, 0x1000);
|
||||
intel_batchbuffer_emit_mi_flush(ctx);
|
||||
i965_clear_dest_region(ctx);
|
||||
@@ -1283,13 +1273,16 @@ i965_surface_render_pipeline_setup(VADriverContextP ctx)
|
||||
i965_render_cs_urb_layout(ctx);
|
||||
i965_render_drawing_rectangle(ctx);
|
||||
i965_render_vertex_elements(ctx);
|
||||
- i965_render_startup(ctx);
|
||||
+ for (i = 0; i < n_rects; i++)
|
||||
+ i965_render_startup(ctx, 48 * i);
|
||||
intel_batchbuffer_end_atomic(ctx);
|
||||
}
|
||||
|
||||
static void
|
||||
-i965_subpic_render_pipeline_setup(VADriverContextP ctx)
|
||||
+i965_subpic_render_pipeline_setup(VADriverContextP ctx, unsigned int n_rects)
|
||||
{
|
||||
+ unsigned int i;
|
||||
+
|
||||
intel_batchbuffer_start_atomic(ctx, 0x1000);
|
||||
intel_batchbuffer_emit_mi_flush(ctx);
|
||||
i965_render_pipeline_select(ctx);
|
||||
@@ -1302,7 +1295,8 @@ i965_subpic_render_pipeline_setup(VADriverContextP ctx)
|
||||
i965_render_cs_urb_layout(ctx);
|
||||
i965_render_drawing_rectangle(ctx);
|
||||
i965_render_vertex_elements(ctx);
|
||||
- i965_render_startup(ctx);
|
||||
+ for (i = 0; i < n_rects; i++)
|
||||
+ i965_render_startup(ctx, 48 * i);
|
||||
intel_batchbuffer_end_atomic(ctx);
|
||||
}
|
||||
|
||||
@@ -1396,45 +1390,39 @@ i965_render_initialize(VADriverContextP ctx)
|
||||
void
|
||||
i965_render_put_surface(VADriverContextP ctx,
|
||||
VASurfaceID surface,
|
||||
- short srcx,
|
||||
- short srcy,
|
||||
- unsigned short srcw,
|
||||
- unsigned short srch,
|
||||
- short destx,
|
||||
- short desty,
|
||||
- unsigned short destw,
|
||||
- unsigned short desth)
|
||||
+ const VARectangle *src_rect,
|
||||
+ const VARectangle *dst_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects)
|
||||
{
|
||||
+ unsigned int n_rects;
|
||||
+
|
||||
i965_render_initialize(ctx);
|
||||
- i965_surface_render_state_setup(ctx, surface,
|
||||
- srcx, srcy, srcw, srch,
|
||||
- destx, desty, destw, desth);
|
||||
- i965_surface_render_pipeline_setup(ctx);
|
||||
+ n_rects = i965_surface_render_state_setup(ctx, surface,
|
||||
+ src_rect, dst_rect,
|
||||
+ cliprects, num_cliprects);
|
||||
+ i965_surface_render_pipeline_setup(ctx, n_rects);
|
||||
intel_batchbuffer_flush(ctx);
|
||||
}
|
||||
|
||||
void
|
||||
i965_render_put_subpic(VADriverContextP ctx,
|
||||
- VASurfaceID surface,
|
||||
- short srcx,
|
||||
- short srcy,
|
||||
- unsigned short srcw,
|
||||
- unsigned short srch,
|
||||
- short destx,
|
||||
- short desty,
|
||||
- unsigned short destw,
|
||||
- unsigned short desth)
|
||||
+ VASurfaceID surface,
|
||||
+ const VARectangle *src_rect,
|
||||
+ const VARectangle *dst_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects)
|
||||
{
|
||||
struct i965_driver_data *i965 = i965_driver_data(ctx);
|
||||
struct object_surface *obj_surface = SURFACE(surface);
|
||||
struct object_subpic *obj_subpic = SUBPIC(obj_surface->subpic);
|
||||
+ unsigned int n_rects;
|
||||
assert(obj_subpic);
|
||||
|
||||
i965_render_initialize(ctx);
|
||||
- i965_subpic_render_state_setup(ctx, surface,
|
||||
- srcx, srcy, srcw, srch,
|
||||
- destx, desty, destw, desth);
|
||||
- i965_subpic_render_pipeline_setup(ctx);
|
||||
+ n_rects = i965_subpic_render_state_setup(ctx, surface, src_rect, dst_rect,
|
||||
+ cliprects, num_cliprects);
|
||||
+ i965_subpic_render_pipeline_setup(ctx, n_rects);
|
||||
i965_render_upload_image_palette(ctx, obj_subpic->image, 0xff);
|
||||
intel_batchbuffer_flush(ctx);
|
||||
}
|
||||
diff --git a/i965_drv_video/i965_render.h b/i965_drv_video/i965_render.h
|
||||
index e3dce02..d2e23f1 100644
|
||||
--- a/i965_drv_video/i965_render.h
|
||||
+++ b/i965_drv_video/i965_render.h
|
||||
@@ -28,6 +28,7 @@
|
||||
#ifndef _I965_RENDER_H_
|
||||
#define _I965_RENDER_H_
|
||||
|
||||
+#define MAX_CLIP_RECTS 80 /* vb_bo:4096 / vb:(3*4*4) */
|
||||
#define MAX_RENDER_SURFACES 16
|
||||
#define MAX_SAMPLERS 16
|
||||
|
||||
@@ -65,27 +66,20 @@ struct i965_render_state
|
||||
|
||||
Bool i965_render_init(VADriverContextP ctx);
|
||||
Bool i965_render_terminate(VADriverContextP ctx);
|
||||
+
|
||||
void i965_render_put_surface(VADriverContextP ctx,
|
||||
VASurfaceID surface,
|
||||
- short srcx,
|
||||
- short srcy,
|
||||
- unsigned short srcw,
|
||||
- unsigned short srch,
|
||||
- short destx,
|
||||
- short desty,
|
||||
- unsigned short destw,
|
||||
- unsigned short desth);
|
||||
-
|
||||
+ const VARectangle *src_rect,
|
||||
+ const VARectangle *dst_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects);
|
||||
|
||||
void
|
||||
i965_render_put_subpic(VADriverContextP ctx,
|
||||
- VASurfaceID surface,
|
||||
- short srcx,
|
||||
- short srcy,
|
||||
- unsigned short srcw,
|
||||
- unsigned short srch,
|
||||
- short destx,
|
||||
- short desty,
|
||||
- unsigned short destw,
|
||||
- unsigned short desth);
|
||||
+ VASurfaceID surface,
|
||||
+ const VARectangle *src_rect,
|
||||
+ const VARectangle *dst_rect,
|
||||
+ const VARectangle *cliprects,
|
||||
+ unsigned int num_cliprects);
|
||||
+
|
||||
#endif /* _I965_RENDER_H_ */
|
||||
--
|
||||
1.5.4.3
|
||||
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
commit 8d0004cbd40305114bbe8019122319b43d25a772
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Tue Sep 8 12:34:39 2009 +0000
|
||||
|
||||
Fix ATTRIBUTE_HIDDEN definition if __attribute__((visibility("hidden"))) is not supported.
|
||||
|
||||
commit 7a8bf489ffd436d853364dd0d3c9a6734b8cc7eb
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Thu Sep 3 15:46:37 2009 +0000
|
||||
|
||||
Check for __attribute__((visibility("hidden"))).
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index da96872..abef435 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -132,6 +132,30 @@ if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdr
|
||||
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)
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
commit 11e626a3610daf0fce253ef48ab8736bce6178f9
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Tue Sep 22 12:29:56 2009 +0000
|
||||
|
||||
Fix vainfo dependencies (Konstantin Pavlov).
|
||||
|
||||
diff --git a/test/Makefile.am b/test/Makefile.am
|
||||
index 58e1677..ee78d34 100644
|
||||
--- a/test/Makefile.am
|
||||
+++ b/test/Makefile.am
|
||||
@@ -31,10 +31,10 @@ AM_CFLAGS = -I$(top_srcdir)/../../include/external/ -I$(top_srcdir)/src -I$(top_
|
||||
|
||||
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)
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
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}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
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)
|
||||
{
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From 332bfec6020b5cfcef5d655f4bf525dab67c0b92 Mon Sep 17 00:00:00 2001
|
||||
From: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed, 24 Jun 2009 08:12:13 +0000
|
||||
Subject: [PATCH] Install drivers into pkglibdir/va/.
|
||||
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 4be2b56..d595ac9 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -73,7 +73,7 @@ AC_ARG_ENABLE(i965-driver,
|
||||
|
||||
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)
|
||||
--
|
||||
1.5.4.3
|
||||
|
||||
|
|
@ -1,542 +0,0 @@
|
|||
commit fb6ccda5984eda96bcb394b23255143dcbc21f18
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Thu Sep 10 12:22:17 2009 +0000
|
||||
|
||||
Don't link against libdrm to workaround XvBA / fglrx >= 8.66-RC1 bugs.
|
||||
|
||||
commit ab3c0f65182462b54729d2d82d4d645c8be5b2d1
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed Sep 9 13:24:46 2009 +0000
|
||||
|
||||
Fix DRM device opening with fglrx >= 8.66-RC1.
|
||||
|
||||
diff --git a/src/x11/Makefile.am b/src/x11/Makefile.am
|
||||
index c70380d..b6916f2 100644
|
||||
--- a/src/x11/Makefile.am
|
||||
+++ b/src/x11/Makefile.am
|
||||
@@ -25,6 +25,6 @@ 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
|
||||
+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 --git a/src/x11/dri1_util.c b/src/x11/dri1_util.c
|
||||
index b3db5b4..3bd490f 100644
|
||||
--- a/src/x11/dri1_util.c
|
||||
+++ b/src/x11/dri1_util.c
|
||||
@@ -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 @@ struct dri1_drawable
|
||||
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 @@ dri1Close(VADriverContextP ctx)
|
||||
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 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name)
|
||||
&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,
|
||||
@@ -127,7 +196,8 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name)
|
||||
&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;
|
||||
@@ -138,10 +208,10 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name)
|
||||
|
||||
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 --git a/src/x11/dri2_util.c b/src/x11/dri2_util.c
|
||||
index ebe7a2c..b727e97 100644
|
||||
--- a/src/x11/dri2_util.c
|
||||
+++ b/src/x11/dri2_util.c
|
||||
@@ -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 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name)
|
||||
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 --git a/src/x11/libdrm_glue.c b/src/x11/libdrm_glue.c
|
||||
new file mode 100644
|
||||
index 0000000..b72a2d1
|
||||
--- /dev/null
|
||||
+++ b/src/x11/libdrm_glue.c
|
||||
@@ -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 --git a/src/x11/libdrm_glue.h b/src/x11/libdrm_glue.h
|
||||
new file mode 100644
|
||||
index 0000000..878470b
|
||||
--- /dev/null
|
||||
+++ b/src/x11/libdrm_glue.h
|
||||
@@ -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 --git a/src/x11/va_dricommon.h b/src/x11/va_dricommon.h
|
||||
index a2a51a6..0da35fe 100644
|
||||
--- a/src/x11/va_dricommon.h
|
||||
+++ b/src/x11/va_dricommon.h
|
||||
@@ -13,7 +13,8 @@ enum
|
||||
{
|
||||
VA_NONE = 0,
|
||||
VA_DRI1 = 1,
|
||||
- VA_DRI2 = 2
|
||||
+ VA_DRI2 = 2,
|
||||
+ VA_DRI_AMD = 4 /* AMD DRI implementation */
|
||||
};
|
||||
|
||||
union dri_buffer
|
||||
diff --git a/src/x11/va_x11.c b/src/x11/va_x11.c
|
||||
index b8c60fa..414c261 100644
|
||||
--- a/src/x11/va_x11.c
|
||||
+++ b/src/x11/va_x11.c
|
||||
@@ -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>
|
||||
@@ -94,6 +75,8 @@ static void va_DisplayContextDestroy (
|
||||
}
|
||||
ctx = &((*ctx)->pNext);
|
||||
}
|
||||
+
|
||||
+ libdrm_close();
|
||||
free(pDisplayContext->pDriverContext->dri_state);
|
||||
free(pDisplayContext->pDriverContext);
|
||||
free(pDisplayContext);
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index e50a15f..d1f8f70 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -45,7 +45,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
|
||||
|
||||
|
|
@ -1,312 +0,0 @@
|
|||
commit d91645f8b37aa43bafa76da3146dcdc9c17963ff
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Fri Nov 20 15:51:22 2009 +0000
|
||||
|
||||
Fix detection of fglrx.
|
||||
|
||||
diff --git a/src/x11/Makefile.am b/src/x11/Makefile.am
|
||||
index b6916f2..0b61c33 100644
|
||||
--- a/src/x11/Makefile.am
|
||||
+++ b/src/x11/Makefile.am
|
||||
@@ -25,6 +25,23 @@ 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 libdrm_glue.c
|
||||
+libva_x11_la_SOURCES = \
|
||||
+ dri1_util.c \
|
||||
+ dri2_util.c \
|
||||
+ libdrm_glue.c \
|
||||
+ va_dri.c \
|
||||
+ va_dri2.c \
|
||||
+ va_dricommon.c \
|
||||
+ va_fglext.c \
|
||||
+ va_nvctrl.c \
|
||||
+ va_x11.c \
|
||||
+ $(NULL)
|
||||
|
||||
-EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h libdrm_glue.h
|
||||
+EXTRA_DIST = \
|
||||
+ libdrm_glue.h \
|
||||
+ va_dri2str.h \
|
||||
+ va_dri2tokens.h \
|
||||
+ va_dristr.h \
|
||||
+ va_fglext.h \
|
||||
+ va_nvctrl.h \
|
||||
+ $(NULL)
|
||||
diff --git a/src/x11/va_fglext.c b/src/x11/va_fglext.c
|
||||
new file mode 100644
|
||||
index 0000000..bc58e8b
|
||||
--- /dev/null
|
||||
+++ b/src/x11/va_fglext.c
|
||||
@@ -0,0 +1,175 @@
|
||||
+/*
|
||||
+ * 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 <string.h>
|
||||
+
|
||||
+#define NEED_REPLIES
|
||||
+#include <stdlib.h>
|
||||
+#include <X11/Xlibint.h>
|
||||
+#include <X11/Xutil.h>
|
||||
+#include <X11/extensions/Xext.h>
|
||||
+#include <X11/extensions/extutil.h>
|
||||
+#include "va_fglext.h"
|
||||
+
|
||||
+#define ATIFGL_EXTENSION_NAME "ATIFGLEXTENSION"
|
||||
+#define ATIFGL_EXTENSION_EVENTS 0
|
||||
+
|
||||
+typedef struct _FGLGetDriverData {
|
||||
+ CARD8 reqType;
|
||||
+ CARD8 fireglReqType;
|
||||
+ CARD16 length B16;
|
||||
+ CARD32 screen B32;
|
||||
+ CARD16 size B16;
|
||||
+ CARD16 pad1;
|
||||
+} xFGLGetDriverDataReq;
|
||||
+#define sz_xFGLGetDriverDataReq sizeof(xFGLGetDriverDataReq)
|
||||
+
|
||||
+typedef struct {
|
||||
+ BYTE type;
|
||||
+ BYTE pad1;
|
||||
+ CARD16 sequenceNumber B16;
|
||||
+ CARD32 length B32;
|
||||
+ CARD8 majorVersion;
|
||||
+ CARD8 minorVersion;
|
||||
+ CARD8 patchlevel B16;
|
||||
+ CARD8 BIOSVersionMajor;
|
||||
+ CARD8 BIOSVersionMinor;
|
||||
+ CARD8 HasSecondary;
|
||||
+ CARD16 pad3 B16;
|
||||
+ CARD32 pad4 B32;
|
||||
+ CARD32 pad5 B32;
|
||||
+ CARD32 pad6 B32;
|
||||
+ CARD32 pad7 B32;
|
||||
+ // ... there are more fields
|
||||
+} xFGLGetDriverDataReply;
|
||||
+#define sz_xFGLGetDriverDataReply sizeof(xFGLGetDriverDataReply)
|
||||
+
|
||||
+#define X_FGLGetDriverData 0
|
||||
+
|
||||
+static XExtensionInfo _fglext_ext_info_data;
|
||||
+static XExtensionInfo *fglext_ext_info = &_fglext_ext_info_data;
|
||||
+static /* const */ char *fglext_extension_name = ATIFGL_EXTENSION_NAME;
|
||||
+
|
||||
+#define xFGLCheckExtension(dpy,i,val) \
|
||||
+ XextCheckExtension (dpy, i, fglext_extension_name, val)
|
||||
+
|
||||
+static int close_display();
|
||||
+static /* const */ XExtensionHooks fglext_extension_hooks = {
|
||||
+ NULL, /* create_gc */
|
||||
+ NULL, /* copy_gc */
|
||||
+ NULL, /* flush_gc */
|
||||
+ NULL, /* free_gc */
|
||||
+ NULL, /* create_font */
|
||||
+ NULL, /* free_font */
|
||||
+ close_display, /* close_display */
|
||||
+ NULL, /* wire_to_event */
|
||||
+ NULL, /* event_to_wire */
|
||||
+ NULL, /* error */
|
||||
+ NULL, /* error_string */
|
||||
+};
|
||||
+
|
||||
+static XEXT_GENERATE_FIND_DISPLAY (find_display, fglext_ext_info,
|
||||
+ fglext_extension_name,
|
||||
+ &fglext_extension_hooks,
|
||||
+ ATIFGL_EXTENSION_EVENTS, NULL)
|
||||
+
|
||||
+static XEXT_GENERATE_CLOSE_DISPLAY (close_display, fglext_ext_info)
|
||||
+
|
||||
+Bool VA_FGLEXTQueryDirectRenderingCapable( Display *dpy, int screen,
|
||||
+ Bool *isCapable )
|
||||
+{
|
||||
+ char **extensions;
|
||||
+ int i, n_extensions, has_fglext = 0, has_fglrxdri = 0;
|
||||
+
|
||||
+ if (isCapable)
|
||||
+ *isCapable = False;
|
||||
+
|
||||
+ extensions = XListExtensions(dpy, &n_extensions);
|
||||
+ if (!extensions)
|
||||
+ return False;
|
||||
+
|
||||
+ for (i = 0; i < n_extensions; i++) {
|
||||
+ if (strcmp(extensions[i], ATIFGL_EXTENSION_NAME) == 0)
|
||||
+ has_fglext = 1;
|
||||
+ if (strcmp(extensions[i], "ATIFGLRXDRI") == 0)
|
||||
+ has_fglrxdri = 1;
|
||||
+ }
|
||||
+ XFreeExtensionList(extensions);
|
||||
+
|
||||
+ if (!has_fglext)
|
||||
+ return False;
|
||||
+
|
||||
+ if (isCapable)
|
||||
+ *isCapable = has_fglrxdri;
|
||||
+
|
||||
+ return True;
|
||||
+}
|
||||
+
|
||||
+Bool VA_FGLEXTGetClientDriverName( Display *dpy, int screen,
|
||||
+ int *ddxDriverMajorVersion, int *ddxDriverMinorVersion,
|
||||
+ int *ddxDriverPatchVersion, char **clientDriverName )
|
||||
+{
|
||||
+ XExtDisplayInfo *info = find_display (dpy);
|
||||
+ xFGLGetDriverDataReply rep;
|
||||
+ xFGLGetDriverDataReq *req;
|
||||
+
|
||||
+ if (ddxDriverMajorVersion)
|
||||
+ *ddxDriverMajorVersion = 0;
|
||||
+ if (ddxDriverMinorVersion)
|
||||
+ *ddxDriverMinorVersion = 0;
|
||||
+ if (ddxDriverPatchVersion)
|
||||
+ *ddxDriverPatchVersion = 0;
|
||||
+ if (clientDriverName)
|
||||
+ *clientDriverName = NULL;
|
||||
+
|
||||
+ if(!XextHasExtension(info))
|
||||
+ return False;
|
||||
+
|
||||
+ xFGLCheckExtension (dpy, info, False);
|
||||
+
|
||||
+ LockDisplay (dpy);
|
||||
+ GetReq (FGLGetDriverData, req);
|
||||
+ req->reqType = info->codes->major_opcode;
|
||||
+ req->fireglReqType = X_FGLGetDriverData;
|
||||
+ req->screen = screen;
|
||||
+ if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
|
||||
+ UnlockDisplay (dpy);
|
||||
+ SyncHandle ();
|
||||
+ return False;
|
||||
+ }
|
||||
+ UnlockDisplay (dpy);
|
||||
+ SyncHandle ();
|
||||
+
|
||||
+ if (ddxDriverMajorVersion)
|
||||
+ *ddxDriverMajorVersion = rep.majorVersion;
|
||||
+ if (ddxDriverMinorVersion)
|
||||
+ *ddxDriverMinorVersion = rep.minorVersion;
|
||||
+ if (ddxDriverPatchVersion)
|
||||
+ *ddxDriverPatchVersion = rep.patchlevel;
|
||||
+ if (clientDriverName)
|
||||
+ *clientDriverName = strdup("fglrx");
|
||||
+
|
||||
+ return True;
|
||||
+}
|
||||
diff --git a/src/x11/va_fglext.h b/src/x11/va_fglext.h
|
||||
new file mode 100644
|
||||
index 0000000..f2d87c3
|
||||
--- /dev/null
|
||||
+++ b/src/x11/va_fglext.h
|
||||
@@ -0,0 +1,37 @@
|
||||
+/*
|
||||
+ * 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 VA_FGLEXTLIB_H
|
||||
+#define VA_FGLEXTLIB_H
|
||||
+
|
||||
+#include <X11/Xlib.h>
|
||||
+
|
||||
+Bool VA_FGLEXTQueryDirectRenderingCapable( Display *dpy, int screen,
|
||||
+ Bool *isCapable );
|
||||
+
|
||||
+Bool VA_FGLEXTGetClientDriverName( Display *dpy, int screen,
|
||||
+ int *ddxDriverMajorVersion, int *ddxDriverMinorVersion,
|
||||
+ int *ddxDriverPatchVersion, char **clientDriverName );
|
||||
+
|
||||
+#endif /* VA_FGLEXTLIB_H */
|
||||
diff --git a/src/x11/va_x11.c b/src/x11/va_x11.c
|
||||
index 414c261..0510e00 100644
|
||||
--- a/src/x11/va_x11.c
|
||||
+++ b/src/x11/va_x11.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "va_dri2.h"
|
||||
#include "va_dricommon.h"
|
||||
#include "va_nvctrl.h"
|
||||
+#include "va_fglext.h"
|
||||
#include "libdrm_glue.h"
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
@@ -132,6 +133,29 @@ static VAStatus va_NVCTRL_GetDriverName (
|
||||
return VA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
+static VAStatus va_FGLEXT_GetDriverName(
|
||||
+ VADisplayContextP pDisplayContext,
|
||||
+ char **driver_name
|
||||
+)
|
||||
+{
|
||||
+ VADriverContextP ctx = pDisplayContext->pDriverContext;
|
||||
+ int direct_capable, driver_major, driver_minor, driver_patch;
|
||||
+ Bool result;
|
||||
+
|
||||
+ result = VA_FGLEXTQueryDirectRenderingCapable(ctx->x11_dpy, ctx->x11_screen,
|
||||
+ &direct_capable);
|
||||
+ if (!result || !direct_capable)
|
||||
+ return VA_STATUS_ERROR_UNKNOWN;
|
||||
+
|
||||
+ result = VA_FGLEXTGetClientDriverName(ctx->x11_dpy, ctx->x11_screen,
|
||||
+ &driver_major, &driver_minor,
|
||||
+ &driver_patch, driver_name);
|
||||
+ if (!result)
|
||||
+ return VA_STATUS_ERROR_UNKNOWN;
|
||||
+
|
||||
+ return VA_STATUS_SUCCESS;
|
||||
+}
|
||||
+
|
||||
static VAStatus va_DisplayContextGetDriverName (
|
||||
VADisplayContextP pDisplayContext,
|
||||
char **driver_name
|
||||
@@ -156,7 +180,8 @@ static VAStatus va_DisplayContextGetDriverName (
|
||||
vaStatus = va_DRIGetDriverName(pDisplayContext, driver_name);
|
||||
if (vaStatus != VA_STATUS_SUCCESS)
|
||||
vaStatus = va_NVCTRL_GetDriverName(pDisplayContext, driver_name);
|
||||
-
|
||||
+ if (vaStatus != VA_STATUS_SUCCESS)
|
||||
+ vaStatus = va_FGLEXT_GetDriverName(pDisplayContext, driver_name);
|
||||
return vaStatus;
|
||||
}
|
||||
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
commit 890acc1975ed9f6b7173ff6fbf9d689943590913
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Wed Jun 24 11:32:40 2009 +0000
|
||||
|
||||
Explicit API extensions from SDS.
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 3999dc4..17b0403 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -28,6 +28,9 @@ m4_define([libva_micro_version], [0])
|
||||
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], [4])
|
||||
+
|
||||
# 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_MINOR_VERSION)
|
||||
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 --git a/src/va.c b/src/va.c
|
||||
index f9791f8..b60ac12 100644
|
||||
--- a/src/va.c
|
||||
+++ b/src/va.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <linux/videodev2.h>
|
||||
|
||||
#define DRIVER_INIT_FUNC "__vaDriverInit_0_31"
|
||||
+#define DRIVER_INIT_FUNC_SDS "__vaDriverInit_0_31_sds"
|
||||
|
||||
#define DRIVER_EXTENSION "_drv_video.so"
|
||||
|
||||
@@ -160,6 +161,11 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
|
||||
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 --git a/src/va_version.h.in b/src/va_version.h.in
|
||||
index c9ea97a..197c482 100644
|
||||
--- a/src/va_version.h.in
|
||||
+++ b/src/va_version.h.in
|
||||
@@ -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:
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
commit 3c2d45290e1369083a27d53a5f94276c82512974
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Mon Nov 23 12:21:24 2009 +0000
|
||||
|
||||
Add extra picture info fields for VDPAU/MPEG-4.
|
||||
|
||||
diff --git a/src/va.h b/src/va.h
|
||||
index fa34850..f89a5cb 100755
|
||||
--- a/src/va.h
|
||||
+++ b/src/va.h
|
||||
@@ -672,6 +672,7 @@ typedef struct _VAPictureParameterBufferMPEG4
|
||||
unsigned int quarter_sample : 1;
|
||||
unsigned int data_partitioned : 1;
|
||||
unsigned int reversible_vlc : 1;
|
||||
+ unsigned int resync_marker_disable : 1;
|
||||
} bits;
|
||||
unsigned int value;
|
||||
} vol_fields;
|
||||
@@ -692,6 +693,7 @@ typedef struct _VAPictureParameterBufferMPEG4
|
||||
} vop_fields;
|
||||
unsigned char vop_fcode_forward;
|
||||
unsigned char vop_fcode_backward;
|
||||
+ unsigned short vop_time_increment_resolution;
|
||||
/* short header related */
|
||||
unsigned char num_gobs_in_vop;
|
||||
unsigned char num_macroblocks_in_gob;
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
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,
|
||||
|
|
@ -1,212 +0,0 @@
|
|||
commit f0b352251894becfcec50de1430bda12c314a464
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Tue Sep 22 13:00:34 2009 +0000
|
||||
|
||||
Fix libva-glx pkgconfig dependencies.
|
||||
|
||||
commit df0953a951d8a2e5e4b0a28a95ae0f1ac735726e
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Tue Sep 8 12:25:14 2009 +0000
|
||||
|
||||
Add generic VA/GLX implementation with TFP and FBO.
|
||||
|
||||
commit f640b1cf9eab4e5d478239b608ed0d8b68f6c5f6
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Tue Sep 8 12:15:35 2009 +0000
|
||||
|
||||
Move GLX VTable to a new file.
|
||||
|
||||
commit 70d9cb6d1aa2fc2dde6646f3b692433e0d93d431
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Fri Aug 28 11:15:51 2009 +0000
|
||||
|
||||
Add OpenGL extensions (v3).
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 07385e6..6fb4cae 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -32,10 +32,13 @@ endif
|
||||
|
||||
pcfiles = libva.pc
|
||||
pcfiles += libva-x11.pc
|
||||
+if USE_GLX
|
||||
+pcfiles += libva-glx.pc
|
||||
+endif
|
||||
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
pkgconfig_DATA = $(pcfiles)
|
||||
|
||||
-EXTRA_DIST = libva.pc.in libva-x11.pc.in
|
||||
+EXTRA_DIST = libva.pc.in libva-x11.pc.in libva-glx.pc.in
|
||||
|
||||
CLEANFILES = $(pcfiles)
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index c3aba90..abef435 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -52,6 +55,11 @@ AC_SUBST(LIBVA_MINOR_VERSION)
|
||||
AC_SUBST(LIBVA_LT_VERSION)
|
||||
AC_SUBST(LIBVA_LT_LDFLAGS)
|
||||
|
||||
+AC_ARG_ENABLE(glx,
|
||||
+ [AC_HELP_STRING([--enable-glx],
|
||||
+ [build with OpenGL for X11 support])],
|
||||
+ [], [enable_glx=yes])
|
||||
+
|
||||
AC_ARG_ENABLE(dummy-driver,
|
||||
[AC_HELP_STRING([--enable-dummy-driver],
|
||||
[build dummy video driver])],
|
||||
@@ -100,6 +132,23 @@ if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdr
|
||||
AC_DEFINE_UNQUOTED([ATTRIBUTE_HIDDEN], [$ATTRIBUTE_HIDDEN],
|
||||
[Defined to __attribute__((visibility("hidden"))) when available])
|
||||
|
||||
+# Check for OpenGL (X11)
|
||||
+USE_GLX="no"
|
||||
+GL_DEPS_CFLAGS=""
|
||||
+GL_DEPS_LIBS=""
|
||||
+
|
||||
+if test x$enable_glx = xyes; then
|
||||
+ AC_CHECK_HEADERS([GL/gl.h])
|
||||
+ AC_CHECK_HEADERS([GL/glx.h])
|
||||
+ AC_CHECK_LIB(GL, glXCreateContext, [
|
||||
+ USE_GLX="yes"
|
||||
+ GL_DEPS_LIBS="-lX11 -lGL"
|
||||
+ ])
|
||||
+fi
|
||||
+AC_SUBST(GL_DEPS_CFLAGS)
|
||||
+AC_SUBST(GL_DEPS_LIBS)
|
||||
+AM_CONDITIONAL(USE_GLX, test "$USE_GLX" = "yes")
|
||||
+
|
||||
# We only need the headers, we don't link against the DRM libraries
|
||||
LIBVA_CFLAGS="$DRM_CFLAGS"
|
||||
AC_SUBST(LIBVA_CFLAGS)
|
||||
@@ -119,6 +192,7 @@ AC_OUTPUT([
|
||||
src/Makefile
|
||||
src/va_version.h
|
||||
src/x11/Makefile
|
||||
+ src/glx/Makefile
|
||||
dummy_drv_video/Makefile
|
||||
i965_drv_video/Makefile
|
||||
i965_drv_video/shaders/Makefile
|
||||
@@ -128,5 +202,6 @@ AC_OUTPUT([
|
||||
test/Makefile
|
||||
libva.pc
|
||||
libva-x11.pc
|
||||
+ libva-glx.pc
|
||||
])
|
||||
|
||||
diff --git a/libva-glx.pc.in b/libva-glx.pc.in
|
||||
new file mode 100644
|
||||
index 0000000..20ba20a
|
||||
--- /dev/null
|
||||
+++ b/libva-glx.pc.in
|
||||
@@ -0,0 +1,12 @@
|
||||
+prefix=@prefix@
|
||||
+exec_prefix=@exec_prefix@
|
||||
+libdir=@libdir@
|
||||
+includedir=@includedir@
|
||||
+display=glx
|
||||
+
|
||||
+Name: libva-${display}
|
||||
+Description: Userspace Video Acceleration (VA) ${display} interface
|
||||
+Requires: libva
|
||||
+Version: @PACKAGE_VERSION@
|
||||
+Libs: -L${libdir} -lva-${display}
|
||||
+Cflags: -I${includedir}
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 2f4210a..e50a15f 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -28,9 +28,17 @@ INCLUDES = \
|
||||
LDADD = \
|
||||
$(LIBVA_LT_LDFLAGS)
|
||||
|
||||
-lib_LTLIBRARIES = \
|
||||
- libva.la \
|
||||
- libva-x11.la
|
||||
+libva_x11_backend = libva-x11.la
|
||||
+libva_x11_backenddir = x11
|
||||
+if USE_GLX
|
||||
+libva_glx_backend = libva-glx.la
|
||||
+libva_glx_backenddir = glx
|
||||
+else
|
||||
+libva_glx_backend =
|
||||
+libva_glx_backenddir =
|
||||
+endif
|
||||
+
|
||||
+lib_LTLIBRARIES = libva.la $(libva_x11_backend) $(libva_glx_backend)
|
||||
|
||||
libva_ladir = $(libdir)
|
||||
libva_la_LDFLAGS = $(LDADD) -no-undefined
|
||||
@@ -41,7 +49,14 @@ libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS
|
||||
libva_x11_la_LDFLAGS = $(LDADD)
|
||||
libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la
|
||||
|
||||
-SUBDIRS = x11
|
||||
+libva_glx_la_SOURCES =
|
||||
+libva_glx_la_LIBADD = $(libvacorelib) glx/libva_glx.la libva-x11.la $(GL_DEPS_LIBS) -ldl
|
||||
+libva_glx_la_LDFLAGS = $(LDADD)
|
||||
+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
|
||||
|
||||
diff --git a/src/va_backend.h b/src/va_backend.h
|
||||
index 6f858f5..8f722a3 100644
|
||||
--- a/src/va_backend.h
|
||||
+++ b/src/va_backend.h
|
||||
@@ -32,9 +32,11 @@
|
||||
#ifdef IN_LIBVA
|
||||
#include "va.h"
|
||||
#include "x11/va_x11.h"
|
||||
+#include "glx/va_backend_glx.h"
|
||||
#else
|
||||
#include <va/va.h>
|
||||
#include <va/va_x11.h>
|
||||
+#include <va/va_backend_glx.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -372,6 +374,9 @@ struct VADriverVTable
|
||||
unsigned int *chroma_v_offset,
|
||||
void **buffer
|
||||
);
|
||||
+
|
||||
+ /* Optional: GLX support hooks */
|
||||
+ struct VADriverVTableGLX glx;
|
||||
};
|
||||
|
||||
struct VADriverContext
|
||||
@@ -394,6 +399,7 @@ struct VADriverContext
|
||||
void *handle; /* dlopen handle */
|
||||
|
||||
void *dri_state;
|
||||
+ void *glx; /* opaque for GLX code */
|
||||
};
|
||||
|
||||
struct VADisplayContext
|
||||
@@ -413,6 +420,8 @@ struct VADisplayContext
|
||||
VADisplayContextP ctx,
|
||||
char **driver_name
|
||||
);
|
||||
+
|
||||
+ void *opaque; /* opaque for display extensions (e.g. GLX) */
|
||||
};
|
||||
|
||||
typedef VAStatus (*VADriverInit) (
|
||||
diff --git a/src/x11/va_x11.c b/src/x11/va_x11.c
|
||||
index 9de904e..b8c60fa 100644
|
||||
--- a/src/x11/va_x11.c
|
||||
+++ b/src/x11/va_x11.c
|
||||
@@ -243,6 +243,7 @@ VADisplay vaGetDisplay (
|
||||
pDisplayContext->vaIsValid = va_DisplayContextIsValid;
|
||||
pDisplayContext->vaDestroy = va_DisplayContextDestroy;
|
||||
pDisplayContext->vaGetDriverName = va_DisplayContextGetDriverName;
|
||||
+ pDisplayContext->opaque = NULL;
|
||||
pDisplayContexts = pDisplayContext;
|
||||
pDriverContext->dri_state = dri_state;
|
||||
dpy = (VADisplay)pDisplayContext;
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,135 +0,0 @@
|
|||
commit 483bc9e67afa9bcd8f99f08a74a78e7dfad4651f
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Thu Jul 2 09:24:04 2009 +0000
|
||||
|
||||
Fix make dist (va_compat_template.h).
|
||||
|
||||
commit 0e0da9ea861f14e8129767dbf6f11be5c051d85f
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
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 <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 @@ 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
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,183 +0,0 @@
|
|||
commit 389323f728fb2d6392d266d967eddde40465fd93
|
||||
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
|
||||
Date: Fri Oct 16 12:35:27 2009 +0000
|
||||
|
||||
Fix compatibility with older programs linked against libva.so.0.
|
||||
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 232d8e8..2d696f1 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -72,3 +72,8 @@ EXTRA_DIST = \
|
||||
va_compat_template.h
|
||||
|
||||
va_compat.c: va_compat_template.h
|
||||
+
|
||||
+lib_LTLIBRARIES += libva-compat.la
|
||||
+libva_compat_la_SOURCES = va_compat_lib.c
|
||||
+libva_compat_la_LIBADD = libva-x11.la -ldl
|
||||
+libva_compat_la_DEPENDENCIES = libva-x11.la
|
||||
diff --git a/src/va_compat_lib.c b/src/va_compat_lib.c
|
||||
new file mode 100644
|
||||
index 0000000..b7e9ea5
|
||||
--- /dev/null
|
||||
+++ b/src/va_compat_lib.c
|
||||
@@ -0,0 +1,158 @@
|
||||
+/*
|
||||
+ * 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 <dlfcn.h>
|
||||
+#include <assert.h>
|
||||
+#include <stddef.h>
|
||||
+
|
||||
+typedef void *VADisplay;
|
||||
+typedef int VAStatus;
|
||||
+typedef unsigned int VAGenericID;
|
||||
+typedef VAGenericID VAContextID;
|
||||
+typedef VAGenericID VASurfaceID;
|
||||
+typedef VAGenericID VAImageID;
|
||||
+typedef VAGenericID VASubpictureID;
|
||||
+
|
||||
+#define PREPARE_FUNC(NAME, RET, ARGS) \
|
||||
+ static RET (*lib_##NAME) ARGS; \
|
||||
+ if (lib_##NAME == NULL) \
|
||||
+ lib_##NAME = dlsym(RTLD_NEXT, #NAME); \
|
||||
+ assert(lib_##NAME != NULL)
|
||||
+
|
||||
+VAStatus
|
||||
+vaSyncSurface(
|
||||
+ VADisplay dpy,
|
||||
+ VAContextID context,
|
||||
+ VASurfaceID render_target
|
||||
+)
|
||||
+{
|
||||
+ PREPARE_FUNC(vaSyncSurface, VAStatus, (VADisplay, VASurfaceID));
|
||||
+
|
||||
+ return lib_vaSyncSurface(dpy, render_target);
|
||||
+}
|
||||
+
|
||||
+VAStatus
|
||||
+vaPutImage(
|
||||
+ VADisplay dpy,
|
||||
+ VASurfaceID surface,
|
||||
+ VAImageID image,
|
||||
+ int src_x,
|
||||
+ int src_y,
|
||||
+ unsigned int width,
|
||||
+ unsigned int height,
|
||||
+ int dest_x,
|
||||
+ int dest_y
|
||||
+)
|
||||
+{
|
||||
+ PREPARE_FUNC(vaPutImage, VAStatus, (VADisplay, VASurfaceID, VAImageID,
|
||||
+ int, int, unsigned int, unsigned int,
|
||||
+ int, int, unsigned int, unsigned int));
|
||||
+
|
||||
+ return lib_vaPutImage(dpy, surface, image,
|
||||
+ src_x, src_y, width, height,
|
||||
+ dest_x, dest_y, width, height);
|
||||
+}
|
||||
+
|
||||
+VAStatus
|
||||
+vaPutImage2(
|
||||
+ VADisplay dpy,
|
||||
+ VASurfaceID surface,
|
||||
+ VAImageID image,
|
||||
+ int src_x,
|
||||
+ int src_y,
|
||||
+ unsigned int src_width,
|
||||
+ unsigned int src_height,
|
||||
+ int dest_x,
|
||||
+ int dest_y,
|
||||
+ unsigned int dest_width,
|
||||
+ unsigned int dest_height
|
||||
+)
|
||||
+{
|
||||
+ PREPARE_FUNC(vaPutImage, VAStatus, (VADisplay, VASurfaceID, VAImageID,
|
||||
+ int, int, unsigned int, unsigned int,
|
||||
+ int, int, unsigned int, unsigned int));
|
||||
+
|
||||
+ return lib_vaPutImage(dpy, surface, image,
|
||||
+ src_x, src_y, src_width, src_height,
|
||||
+ dest_x, dest_y, dest_width, dest_height);
|
||||
+}
|
||||
+
|
||||
+VAStatus
|
||||
+vaAssociateSubpicture(
|
||||
+ VADisplay dpy,
|
||||
+ VASubpictureID subpicture,
|
||||
+ VASurfaceID *target_surfaces,
|
||||
+ int num_surfaces,
|
||||
+ short src_x,
|
||||
+ short src_y,
|
||||
+ short dest_x,
|
||||
+ short dest_y,
|
||||
+ unsigned short width,
|
||||
+ unsigned short height,
|
||||
+ unsigned int flags
|
||||
+)
|
||||
+{
|
||||
+ PREPARE_FUNC(vaAssociateSubpicture,
|
||||
+ VAStatus, (VADisplay, VASubpictureID, VASurfaceID *, int,
|
||||
+ short, short, unsigned short, unsigned short,
|
||||
+ short, short, unsigned short, unsigned short,
|
||||
+ unsigned int));
|
||||
+
|
||||
+ return lib_vaAssociateSubpicture(dpy, subpicture,
|
||||
+ target_surfaces, num_surfaces,
|
||||
+ src_x, src_y, width, height,
|
||||
+ dest_x, dest_y, width, height,
|
||||
+ flags);
|
||||
+}
|
||||
+
|
||||
+VAStatus
|
||||
+vaAssociateSubpicture2(
|
||||
+ VADisplay dpy,
|
||||
+ VASubpictureID subpicture,
|
||||
+ VASurfaceID *target_surfaces,
|
||||
+ int num_surfaces,
|
||||
+ short src_x,
|
||||
+ short src_y,
|
||||
+ unsigned short src_width,
|
||||
+ unsigned short src_height,
|
||||
+ short dest_x,
|
||||
+ short dest_y,
|
||||
+ unsigned short dest_width,
|
||||
+ unsigned short dest_height,
|
||||
+ unsigned int flags
|
||||
+)
|
||||
+{
|
||||
+ PREPARE_FUNC(vaAssociateSubpicture,
|
||||
+ VAStatus, (VADisplay, VASubpictureID, VASurfaceID *, int,
|
||||
+ short, short, unsigned short, unsigned short,
|
||||
+ short, short, unsigned short, unsigned short,
|
||||
+ unsigned int));
|
||||
+
|
||||
+ return lib_vaAssociateSubpicture(dpy, subpicture,
|
||||
+ target_surfaces, num_surfaces,
|
||||
+ src_x, src_y, src_width, src_height,
|
||||
+ dest_x, dest_y, dest_width, dest_height,
|
||||
+ flags);
|
||||
+}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
# Make the libva depend on libdrm-poulsbo instead of libdrm so that the
|
||||
# emenlow libdrm can coexist with the normal libdrm.
|
||||
# jdike@linux.intel.com
|
||||
|
||||
Index: libva-0.31.0/configure.ac
|
||||
===================================================================
|
||||
--- libva-0.31.0.orig/configure.ac
|
||||
+++ libva-0.31.0/configure.ac
|
||||
@@ -99,14 +99,14 @@ AC_SYS_LARGEFILE
|
||||
PKG_CHECK_MODULES([X11], [x11])
|
||||
PKG_CHECK_MODULES([XEXT],[xext])
|
||||
PKG_CHECK_MODULES([XFIXES], [xfixes])
|
||||
-PKG_CHECK_MODULES([DRM], [libdrm])
|
||||
+PKG_CHECK_MODULES([DRM], [libdrm_poulsbo])
|
||||
|
||||
PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.0], [gen4asm=yes], [gen4asm=no])
|
||||
AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes)
|
||||
|
||||
# Check for libdrm >= 2.4 (needed for i965_drv_video.so)
|
||||
-if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdrm; then
|
||||
- AC_MSG_WARN([libdrm < 2.4 found, disabling build of i965 video driver])
|
||||
+if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdrm_poulsbo; then
|
||||
+ AC_MSG_WARN([libdrm_poulsbo < 2.4 found, disabling build of i965 video driver])
|
||||
enable_i965_driver=no
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_I965_DRIVER, test x$enable_i965_driver = xyes)
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
DESCRIPTION = "Video Acceleration (VA) API for Linux"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=efc13a0998e678466e556756613c582e"
|
||||
PR = "r1"
|
||||
DEPENDS = "libxfixes libxext"
|
||||
|
||||
inherit autotools
|
||||
|
||||
SRC_URI = "https://launchpad.net/~gma500/+archive/ppa/+files/libva_0.31.0-1+sds9.1ubuntu1.tar.gz \
|
||||
file://033_g45_add_rgba_subpic.patch \
|
||||
file://034_g45_fix_return_for_unimpl.patch \
|
||||
file://035_g45_add_yv12_image_format.patch \
|
||||
file://036_g45_add_vaGetImage.patch \
|
||||
file://037_g45_add_vaPutImage.patch \
|
||||
file://038_g45_vaPutSurface_cliprects.patch \
|
||||
file://102_attribute_visibility.patch \
|
||||
file://103_fix_vainfo_deps.patch \
|
||||
file://104_fix_libva_pkgconfig_deps.patch \
|
||||
file://105_dont_search_LIBGL_DRIVERS_PATH.patch \
|
||||
file://108_drivers_path.patch \
|
||||
file://203_fix_fglrx_detection.patch \
|
||||
file://204_check_ATIFGLEXTENSION.patch \
|
||||
file://300_sds_version.patch \
|
||||
file://301_vdpau_mpeg4.patch \
|
||||
file://320_move_vaPutSurface_flags_def.patch \
|
||||
file://321_libva_glx.base.patch \
|
||||
file://322_libva_glx.patch \
|
||||
file://390_compat.base.patch \
|
||||
file://391_compat.patch \
|
||||
file://392_compat.dso.patch \
|
||||
file://libdrm-poulsbo.patch"
|
||||
|
||||
SRC_URI[md5sum] = "860f13e5a9d09511d7c6807b880e758b"
|
||||
SRC_URI[sha256sum] = "306468f87b9e13fdb3b6f0c6e2159b20198b33eed9eda4c31d7381a88911554f"
|
||||
|
||||
export LDFLAGS="-Wl,-z,defs"
|
||||
|
||||
EXTRA_OECONF = "--disable-i965-driver"
|
||||
|
||||
FILES_${PN} += "${libdir}/va/drivers/*"
|
||||
|
||||
COMPATIBLE_MACHINE = "emenlow"
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
DESCRIPTION = "Binary firmware for the Poulsbo (psb) 3D X11 driver"
|
||||
LICENSE = "Intel-binary-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=02c597a2f082b4581596065bb5a521a8"
|
||||
PR = "r0"
|
||||
|
||||
SRC_URI = "https://launchpad.net/~gma500/+archive/ppa/+files/psb-firmware_0.30-0ubuntu1netbook1ubuntu1.tar.gz"
|
||||
|
||||
SRC_URI[md5sum] = "760005739edc64387240e56f6916e825"
|
||||
SRC_URI[sha256sum] = "714bc9162409b172caaabdaff5a942bc9d104a9b3a47a165754f7090803ba4b3"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${base_libdir}/firmware/
|
||||
install -m 0644 ${WORKDIR}/psb-firmware-0.30/msvdx_fw.bin ${D}${base_libdir}/firmware/
|
||||
}
|
||||
|
||||
FILES_${PN} += "${base_libdir}/firmware/msvdx_fw.bin"
|
||||
|
||||
COMPATIBLE_MACHINE = "emenlow"
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
Index: xorg-server-1.7.99.2/configure.ac
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/configure.ac 2010-01-29 16:38:49.000000000 +0000
|
||||
+++ xorg-server-1.7.99.2/configure.ac 2010-01-29 16:42:39.000000000 +0000
|
||||
@@ -503,14 +503,10 @@
|
||||
|
||||
dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
|
||||
dnl otherwise uses standard subdirectories of FONTROOTDIR
|
||||
-AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
|
||||
- [DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
|
||||
- [
|
||||
DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
|
||||
case $host_os in
|
||||
darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
|
||||
esac
|
||||
- ])
|
||||
AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
|
||||
[ FONTPATH="$withval" ],
|
||||
[ FONTPATH="${DEFAULT_FONT_PATH}" ])
|
||||
|
|
@ -1,211 +0,0 @@
|
|||
Upstream is here:
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=18451
|
||||
|
||||
Upstream-status: Backport
|
||||
|
||||
Signed-off-by: Christopher Hallinan <challinan (a] gmail.com>
|
||||
|
||||
diff --git a/Xext/xace.c b/Xext/xace.c
|
||||
index e10d837..c757cad 100644
|
||||
--- a/Xext/xace.c
|
||||
+++ b/Xext/xace.c
|
||||
@@ -87,7 +87,18 @@ void XaceHookAuditEnd(ClientPtr ptr, int result)
|
||||
*/
|
||||
int XaceHook(int hook, ...)
|
||||
{
|
||||
- pointer calldata; /* data passed to callback */
|
||||
+ union {
|
||||
+ XaceResourceAccessRec res;
|
||||
+ XaceDeviceAccessRec dev;
|
||||
+ XaceSendAccessRec send;
|
||||
+ XaceReceiveAccessRec recv;
|
||||
+ XaceClientAccessRec client;
|
||||
+ XaceExtAccessRec ext;
|
||||
+ XaceServerAccessRec server;
|
||||
+ XaceScreenAccessRec screen;
|
||||
+ XaceAuthAvailRec auth;
|
||||
+ XaceKeyAvailRec key;
|
||||
+ } u;
|
||||
int *prv = NULL; /* points to return value from callback */
|
||||
va_list ap; /* argument list */
|
||||
va_start(ap, hook);
|
||||
@@ -99,117 +110,86 @@ int XaceHook(int hook, ...)
|
||||
*/
|
||||
switch (hook)
|
||||
{
|
||||
- case XACE_RESOURCE_ACCESS: {
|
||||
- XaceResourceAccessRec rec;
|
||||
- rec.client = va_arg(ap, ClientPtr);
|
||||
- rec.id = va_arg(ap, XID);
|
||||
- rec.rtype = va_arg(ap, RESTYPE);
|
||||
- rec.res = va_arg(ap, pointer);
|
||||
- rec.ptype = va_arg(ap, RESTYPE);
|
||||
- rec.parent = va_arg(ap, pointer);
|
||||
- rec.access_mode = va_arg(ap, Mask);
|
||||
- rec.status = Success; /* default allow */
|
||||
- calldata = &rec;
|
||||
- prv = &rec.status;
|
||||
+ case XACE_RESOURCE_ACCESS:
|
||||
+ u.res.client = va_arg(ap, ClientPtr);
|
||||
+ u.res.id = va_arg(ap, XID);
|
||||
+ u.res.rtype = va_arg(ap, RESTYPE);
|
||||
+ u.res.res = va_arg(ap, pointer);
|
||||
+ u.res.ptype = va_arg(ap, RESTYPE);
|
||||
+ u.res.parent = va_arg(ap, pointer);
|
||||
+ u.res.access_mode = va_arg(ap, Mask);
|
||||
+ u.res.status = Success; /* default allow */
|
||||
+ prv = &u.res.status;
|
||||
break;
|
||||
- }
|
||||
- case XACE_DEVICE_ACCESS: {
|
||||
- XaceDeviceAccessRec rec;
|
||||
- rec.client = va_arg(ap, ClientPtr);
|
||||
- rec.dev = va_arg(ap, DeviceIntPtr);
|
||||
- rec.access_mode = va_arg(ap, Mask);
|
||||
- rec.status = Success; /* default allow */
|
||||
- calldata = &rec;
|
||||
- prv = &rec.status;
|
||||
+ case XACE_DEVICE_ACCESS:
|
||||
+ u.dev.client = va_arg(ap, ClientPtr);
|
||||
+ u.dev.dev = va_arg(ap, DeviceIntPtr);
|
||||
+ u.dev.access_mode = va_arg(ap, Mask);
|
||||
+ u.dev.status = Success; /* default allow */
|
||||
+ prv = &u.dev.status;
|
||||
break;
|
||||
- }
|
||||
- case XACE_SEND_ACCESS: {
|
||||
- XaceSendAccessRec rec;
|
||||
- rec.client = va_arg(ap, ClientPtr);
|
||||
- rec.dev = va_arg(ap, DeviceIntPtr);
|
||||
- rec.pWin = va_arg(ap, WindowPtr);
|
||||
- rec.events = va_arg(ap, xEventPtr);
|
||||
- rec.count = va_arg(ap, int);
|
||||
- rec.status = Success; /* default allow */
|
||||
- calldata = &rec;
|
||||
- prv = &rec.status;
|
||||
+ case XACE_SEND_ACCESS:
|
||||
+ u.send.client = va_arg(ap, ClientPtr);
|
||||
+ u.send.dev = va_arg(ap, DeviceIntPtr);
|
||||
+ u.send.pWin = va_arg(ap, WindowPtr);
|
||||
+ u.send.events = va_arg(ap, xEventPtr);
|
||||
+ u.send.count = va_arg(ap, int);
|
||||
+ u.send.status = Success; /* default allow */
|
||||
+ prv = &u.send.status;
|
||||
break;
|
||||
- }
|
||||
- case XACE_RECEIVE_ACCESS: {
|
||||
- XaceReceiveAccessRec rec;
|
||||
- rec.client = va_arg(ap, ClientPtr);
|
||||
- rec.pWin = va_arg(ap, WindowPtr);
|
||||
- rec.events = va_arg(ap, xEventPtr);
|
||||
- rec.count = va_arg(ap, int);
|
||||
- rec.status = Success; /* default allow */
|
||||
- calldata = &rec;
|
||||
- prv = &rec.status;
|
||||
+ case XACE_RECEIVE_ACCESS:
|
||||
+ u.recv.client = va_arg(ap, ClientPtr);
|
||||
+ u.recv.pWin = va_arg(ap, WindowPtr);
|
||||
+ u.recv.events = va_arg(ap, xEventPtr);
|
||||
+ u.recv.count = va_arg(ap, int);
|
||||
+ u.recv.status = Success; /* default allow */
|
||||
+ prv = &u.recv.status;
|
||||
break;
|
||||
- }
|
||||
- case XACE_CLIENT_ACCESS: {
|
||||
- XaceClientAccessRec rec;
|
||||
- rec.client = va_arg(ap, ClientPtr);
|
||||
- rec.target = va_arg(ap, ClientPtr);
|
||||
- rec.access_mode = va_arg(ap, Mask);
|
||||
- rec.status = Success; /* default allow */
|
||||
- calldata = &rec;
|
||||
- prv = &rec.status;
|
||||
+ case XACE_CLIENT_ACCESS:
|
||||
+ u.client.client = va_arg(ap, ClientPtr);
|
||||
+ u.client.target = va_arg(ap, ClientPtr);
|
||||
+ u.client.access_mode = va_arg(ap, Mask);
|
||||
+ u.client.status = Success; /* default allow */
|
||||
+ prv = &u.client.status;
|
||||
break;
|
||||
- }
|
||||
- case XACE_EXT_ACCESS: {
|
||||
- XaceExtAccessRec rec;
|
||||
- rec.client = va_arg(ap, ClientPtr);
|
||||
- rec.ext = va_arg(ap, ExtensionEntry*);
|
||||
- rec.access_mode = DixGetAttrAccess;
|
||||
- rec.status = Success; /* default allow */
|
||||
- calldata = &rec;
|
||||
- prv = &rec.status;
|
||||
+ case XACE_EXT_ACCESS:
|
||||
+ u.ext.client = va_arg(ap, ClientPtr);
|
||||
+ u.ext.ext = va_arg(ap, ExtensionEntry*);
|
||||
+ u.ext.access_mode = DixGetAttrAccess;
|
||||
+ u.ext.status = Success; /* default allow */
|
||||
+ prv = &u.ext.status;
|
||||
break;
|
||||
- }
|
||||
- case XACE_SERVER_ACCESS: {
|
||||
- XaceServerAccessRec rec;
|
||||
- rec.client = va_arg(ap, ClientPtr);
|
||||
- rec.access_mode = va_arg(ap, Mask);
|
||||
- rec.status = Success; /* default allow */
|
||||
- calldata = &rec;
|
||||
- prv = &rec.status;
|
||||
+ case XACE_SERVER_ACCESS:
|
||||
+ u.server.client = va_arg(ap, ClientPtr);
|
||||
+ u.server.access_mode = va_arg(ap, Mask);
|
||||
+ u.server.status = Success; /* default allow */
|
||||
+ prv = &u.server.status;
|
||||
break;
|
||||
- }
|
||||
case XACE_SCREEN_ACCESS:
|
||||
- case XACE_SCREENSAVER_ACCESS: {
|
||||
- XaceScreenAccessRec rec;
|
||||
- rec.client = va_arg(ap, ClientPtr);
|
||||
- rec.screen = va_arg(ap, ScreenPtr);
|
||||
- rec.access_mode = va_arg(ap, Mask);
|
||||
- rec.status = Success; /* default allow */
|
||||
- calldata = &rec;
|
||||
- prv = &rec.status;
|
||||
+ case XACE_SCREENSAVER_ACCESS:
|
||||
+ u.screen.client = va_arg(ap, ClientPtr);
|
||||
+ u.screen.screen = va_arg(ap, ScreenPtr);
|
||||
+ u.screen.access_mode = va_arg(ap, Mask);
|
||||
+ u.screen.status = Success; /* default allow */
|
||||
+ prv = &u.screen.status;
|
||||
break;
|
||||
- }
|
||||
- case XACE_AUTH_AVAIL: {
|
||||
- XaceAuthAvailRec rec;
|
||||
- rec.client = va_arg(ap, ClientPtr);
|
||||
- rec.authId = va_arg(ap, XID);
|
||||
- calldata = &rec;
|
||||
+ case XACE_AUTH_AVAIL:
|
||||
+ u.auth.client = va_arg(ap, ClientPtr);
|
||||
+ u.auth.authId = va_arg(ap, XID);
|
||||
break;
|
||||
- }
|
||||
- case XACE_KEY_AVAIL: {
|
||||
- XaceKeyAvailRec rec;
|
||||
- rec.event = va_arg(ap, xEventPtr);
|
||||
- rec.keybd = va_arg(ap, DeviceIntPtr);
|
||||
- rec.count = va_arg(ap, int);
|
||||
- calldata = &rec;
|
||||
+ case XACE_KEY_AVAIL:
|
||||
+ u.key.event = va_arg(ap, xEventPtr);
|
||||
+ u.key.keybd = va_arg(ap, DeviceIntPtr);
|
||||
+ u.key.count = va_arg(ap, int);
|
||||
break;
|
||||
- }
|
||||
- default: {
|
||||
+ default:
|
||||
va_end(ap);
|
||||
return 0; /* unimplemented hook number */
|
||||
- }
|
||||
}
|
||||
va_end(ap);
|
||||
|
||||
/* call callbacks and return result, if any. */
|
||||
- CallCallbacks(&XaceHooks[hook], calldata);
|
||||
+ CallCallbacks(&XaceHooks[hook], &u);
|
||||
return prv ? *prv : Success;
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
Index: git/os/osdep.h
|
||||
===================================================================
|
||||
--- git.orig/os/osdep.h 2008-10-07 18:38:21.000000000 +0100
|
||||
+++ git/os/osdep.h 2008-10-07 18:39:36.000000000 +0100
|
||||
@@ -92,7 +92,7 @@
|
||||
* like sysconf(_SC_OPEN_MAX) is not supported.
|
||||
*/
|
||||
|
||||
-#if OPEN_MAX <= 256
|
||||
+#if 0
|
||||
#define MAXSOCKS (OPEN_MAX - 1)
|
||||
#else
|
||||
#define MAXSOCKS 256
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
# Make the server depend on libdrm-poulsbo instead of libdrm so that the
|
||||
# emenlow libdrm can coexist with the normal libdrm.
|
||||
# jdike@linux.intel.com
|
||||
|
||||
Index: xorg-server-1.7.99.2/configure.ac
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/configure.ac
|
||||
+++ xorg-server-1.7.99.2/configure.ac
|
||||
@@ -763,7 +763,7 @@ dnl List of libraries that require a spe
|
||||
LIBAPPLEWM="applewm >= 1.4"
|
||||
LIBDMX="dmx >= 1.0.99.1"
|
||||
LIBDRI="dri >= 7.1.0"
|
||||
-LIBDRM="libdrm >= 2.3.0"
|
||||
+LIBDRM="libdrm_poulsbo >= 2.3.0"
|
||||
LIBGL="gl >= 7.1.0"
|
||||
LIBXEXT="xext >= 1.0.99.4"
|
||||
LIBXI="xi >= 1.2.99.1"
|
||||
@@ -2002,7 +2002,7 @@ if test "$KDRIVE" = yes; then
|
||||
XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xv"
|
||||
fi
|
||||
if test "x$DRI" = xyes && test "x$GLX" = xyes; then
|
||||
- XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS $LIBGL libdrm"
|
||||
+ XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS $LIBGL libdrm_poulsbo"
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [xephyr="yes"], [xephyr="no"])
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
Index: xorg-server-1.5.0/xorg-server.m4
|
||||
===================================================================
|
||||
--- xorg-server-1.5.0.orig/xorg-server.m4 2007-05-29 20:36:51.000000000 +0100
|
||||
+++ xorg-server-1.5.0/xorg-server.m4 2008-11-04 23:56:55.000000000 +0000
|
||||
@@ -28,9 +28,12 @@
|
||||
# Checks for the $1 define in xorg-server.h (from the sdk). If it
|
||||
# is defined, then add $1 to $REQUIRED_MODULES.
|
||||
|
||||
+m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR)
|
||||
+
|
||||
AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
|
||||
+ PKG_PROG_PKG_CONFIG
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
- CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
|
||||
+ CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`pkg-config --variable=sdkdir xorg-server`"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include "xorg-server.h"
|
||||
#if !defined $1
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
Index: git/configure.ac
|
||||
===================================================================
|
||||
--- git.orig/configure.ac 2009-01-15 20:35:31.000000000 +0000
|
||||
+++ git/configure.ac 2009-01-15 20:35:38.000000000 +0000
|
||||
@@ -62,7 +62,6 @@
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AC_DISABLE_STATIC
|
||||
AC_PROG_LIBTOOL
|
||||
-DOLT
|
||||
AC_PROG_MAKE_SET
|
||||
PKG_PROG_PKG_CONFIG
|
||||
AC_PROG_LEX
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
Upstream-Status: Inappropriate [already upstream]
|
||||
|
||||
It's broken for devices with BARs above 4G, and the sysfs method should
|
||||
work everywhere anyway. As a pleasant side effect, this fixes some
|
||||
warnings:
|
||||
|
||||
fbdevhw.c: In function 'fbdev_open_pci':
|
||||
fbdevhw.c:333:4: warning: cast from pointer to integer of different size
|
||||
fbdevhw.c:334:4: warning: cast from pointer to integer of different size
|
||||
fbdevhw.c:336:4: warning: cast from pointer to integer of different size
|
||||
fbdevhw.c:337:4: warning: cast from pointer to integer of different size
|
||||
|
||||
Signed-off-by: Adam Jackson <ajax (a] redhat.com>
|
||||
Integrated-by: Tom Zanussi <tom.zanussi (a] intel.com>
|
||||
|
||||
Index: xorg-server-1.7.99.2/hw/xfree86/fbdevhw/fbdevhw.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/hw/xfree86/fbdevhw/fbdevhw.c 2012-01-10 22:08:26.466693355 -0600
|
||||
+++ xorg-server-1.7.99.2/hw/xfree86/fbdevhw/fbdevhw.c 2012-01-10 22:11:36.386936978 -0600
|
||||
@@ -291,14 +291,7 @@
|
||||
{
|
||||
struct fb_fix_screeninfo fix;
|
||||
char filename[256];
|
||||
- int fd,i,j;
|
||||
-
|
||||
-
|
||||
- /* There are two ways to that we can determine which fb device is
|
||||
- * associated with this PCI device. The more modern way is to look in
|
||||
- * the sysfs directory for the PCI device for a file named
|
||||
- * "graphics/fb*"
|
||||
- */
|
||||
+ int fd, i;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
sprintf(filename,
|
||||
@@ -331,55 +324,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
-
|
||||
- /* The other way is to examine the resources associated with each fb
|
||||
- * device and see if there is a match with the PCI device. This technique
|
||||
- * has some problems on certain mixed 64-bit / 32-bit architectures.
|
||||
- * There is a flaw in the fb_fix_screeninfo structure in that it only
|
||||
- * returns the low 32-bits of the address of the resources associated with
|
||||
- * a device. However, on a mixed architecture the base addresses of PCI
|
||||
- * devices, even for 32-bit applications, may be higher than 0x0f0000000.
|
||||
- */
|
||||
-
|
||||
- for (i = 0; i < 8; i++) {
|
||||
- sprintf(filename,"/dev/fb%d",i);
|
||||
- if (-1 == (fd = open(filename,O_RDWR,0))) {
|
||||
- xf86DrvMsg(-1, X_WARNING,
|
||||
- "open %s: %s\n", filename, strerror(errno));
|
||||
- continue;
|
||||
- }
|
||||
- if (-1 == ioctl(fd,FBIOGET_FSCREENINFO,(void*)&fix)) {
|
||||
- close(fd);
|
||||
- continue;
|
||||
- }
|
||||
- for (j = 0; j < 6; j++) {
|
||||
- const pciaddr_t res_start = pPci->regions[j].base_addr;
|
||||
- const pciaddr_t res_end = res_start + pPci->regions[j].size;
|
||||
-
|
||||
- if ((0 != fix.smem_len &&
|
||||
- (pciaddr_t) fix.smem_start >= res_start &&
|
||||
- (pciaddr_t) fix.smem_start < res_end) ||
|
||||
- (0 != fix.mmio_len &&
|
||||
- (pciaddr_t) fix.mmio_start >= res_start &&
|
||||
- (pciaddr_t) fix.mmio_start < res_end))
|
||||
- break;
|
||||
- }
|
||||
- if (j == 6) {
|
||||
- close(fd);
|
||||
- continue;
|
||||
- }
|
||||
- if (namep) {
|
||||
- *namep = xnfalloc(16);
|
||||
- strncpy(*namep,fix.id,16);
|
||||
- }
|
||||
- return fd;
|
||||
- }
|
||||
-
|
||||
if (namep)
|
||||
*namep = NULL;
|
||||
|
||||
- xf86DrvMsg(-1, X_ERROR,
|
||||
- "Unable to find a valid framebuffer device\n");
|
||||
+ xf86DrvMsg(-1, X_ERROR, "Unable to find a valid framebuffer device\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -1,515 +0,0 @@
|
|||
Upstream-Status: Inappropriate [yocto-specific]
|
||||
|
||||
Signed-off-by: Tom Zanussi <tom.zanussi (a] intel.com>
|
||||
|
||||
Index: xorg-server-1.7.99.2/Xext/xace.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/Xext/xace.c 2012-01-10 19:18:03.696703936 -0600
|
||||
+++ xorg-server-1.7.99.2/Xext/xace.c 2012-01-10 19:18:17.196730688 -0600
|
||||
@@ -255,7 +255,7 @@
|
||||
imageBox.y1 = y;
|
||||
imageBox.x2 = x + w;
|
||||
imageBox.y2 = y + h;
|
||||
- REGION_INIT(pScreen, &imageRegion, &imageBox, 1);
|
||||
+ REGION_INIT2(pScreen, &imageRegion, &imageBox, 1);
|
||||
REGION_NULL(pScreen, &censorRegion);
|
||||
|
||||
/* censorRegion = imageRegion - visibleRegion */
|
||||
Index: xorg-server-1.7.99.2/dix/window.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/dix/window.c 2012-01-10 17:55:40.997816709 -0600
|
||||
+++ xorg-server-1.7.99.2/dix/window.c 2012-01-10 19:03:09.166733166 -0600
|
||||
@@ -418,10 +418,10 @@
|
||||
box.y1 = 0;
|
||||
box.x2 = pScreen->width;
|
||||
box.y2 = pScreen->height;
|
||||
- REGION_INIT(pScreen, &pWin->clipList, &box, 1);
|
||||
- REGION_INIT(pScreen, &pWin->winSize, &box, 1);
|
||||
- REGION_INIT(pScreen, &pWin->borderSize, &box, 1);
|
||||
- REGION_INIT(pScreen, &pWin->borderClip, &box, 1);
|
||||
+ REGION_INIT2(pScreen, &pWin->clipList, &box, 1);
|
||||
+ REGION_INIT2(pScreen, &pWin->winSize, &box, 1);
|
||||
+ REGION_INIT2(pScreen, &pWin->borderSize, &box, 1);
|
||||
+ REGION_INIT2(pScreen, &pWin->borderClip, &box, 1);
|
||||
|
||||
pWin->drawable.class = InputOutput;
|
||||
pWin->optional->visual = pScreen->rootVisual;
|
||||
Index: xorg-server-1.7.99.2/exa/exa.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/exa/exa.c 2012-01-10 19:25:33.417588200 -0600
|
||||
+++ xorg-server-1.7.99.2/exa/exa.c 2012-01-10 19:25:40.426941145 -0600
|
||||
@@ -161,7 +161,7 @@
|
||||
if (box.x1 >= box.x2 || box.y1 >= box.y2)
|
||||
return;
|
||||
|
||||
- REGION_INIT(pScreen, ®ion, &box, 1);
|
||||
+ REGION_INIT2(pScreen, ®ion, &box, 1);
|
||||
DamageRegionAppend(&pPix->drawable, ®ion);
|
||||
DamageRegionProcessPending(&pPix->drawable);
|
||||
REGION_UNINIT(pScreen, ®ion);
|
||||
Index: xorg-server-1.7.99.2/exa/exa_accel.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/exa/exa_accel.c 2012-01-10 19:24:57.457521222 -0600
|
||||
+++ xorg-server-1.7.99.2/exa/exa_accel.c 2012-01-10 19:26:21.976736053 -0600
|
||||
@@ -1275,7 +1275,7 @@
|
||||
Box.x2 = Box.x1 + w;
|
||||
Box.y2 = Box.y1 + h;
|
||||
|
||||
- REGION_INIT(pScreen, &Reg, &Box, 1);
|
||||
+ REGION_INIT2(pScreen, &Reg, &Box, 1);
|
||||
|
||||
pixmaps[0].as_dst = FALSE;
|
||||
pixmaps[0].as_src = TRUE;
|
||||
Index: xorg-server-1.7.99.2/exa/exa_classic.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/exa/exa_classic.c 2012-01-10 19:24:48.047527363 -0600
|
||||
+++ xorg-server-1.7.99.2/exa/exa_classic.c 2012-01-10 19:25:29.056935821 -0600
|
||||
@@ -131,8 +131,8 @@
|
||||
box.y1 = 0;
|
||||
box.x2 = w;
|
||||
box.y2 = h;
|
||||
- REGION_INIT(pScreen, &pExaPixmap->validSys, &box, 0);
|
||||
- REGION_INIT(pScreen, &pExaPixmap->validFB, &box, 0);
|
||||
+ REGION_INIT2(pScreen, &pExaPixmap->validSys, &box, 0);
|
||||
+ REGION_INIT2(pScreen, &pExaPixmap->validFB, &box, 0);
|
||||
|
||||
exaSetAccelBlock(pExaScr, pExaPixmap,
|
||||
w, h, bpp);
|
||||
Index: xorg-server-1.7.99.2/exa/exa_migration_classic.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/exa/exa_migration_classic.c 2012-01-10 19:26:48.177818546 -0600
|
||||
+++ xorg-server-1.7.99.2/exa/exa_migration_classic.c 2012-01-10 19:26:58.277521329 -0600
|
||||
@@ -177,7 +177,7 @@
|
||||
box.x2 = max(pValidExt->x2, pDamageExt->x2);
|
||||
box.y2 = max(pValidExt->y2, pDamageExt->y2);
|
||||
|
||||
- REGION_INIT(pScreen, &closure, &box, 0);
|
||||
+ REGION_INIT2(pScreen, &closure, &box, 0);
|
||||
REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, &closure);
|
||||
} else
|
||||
REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, pending_damage);
|
||||
Index: xorg-server-1.7.99.2/exa/exa_render.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/exa/exa_render.c 2012-01-10 19:27:48.157788532 -0600
|
||||
+++ xorg-server-1.7.99.2/exa/exa_render.c 2012-01-10 19:28:02.006706610 -0600
|
||||
@@ -576,7 +576,7 @@
|
||||
* (see use of DamagePendingRegion in exaCopyDirty)
|
||||
*/
|
||||
|
||||
- REGION_INIT(pScreen, ®ion, &box, 1);
|
||||
+ REGION_INIT2(pScreen, ®ion, &box, 1);
|
||||
|
||||
DamageRegionAppend(pDst->pDrawable, ®ion);
|
||||
|
||||
Index: xorg-server-1.7.99.2/exa/exa_unaccel.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/exa/exa_unaccel.c 2012-01-10 19:27:53.367612350 -0600
|
||||
+++ xorg-server-1.7.99.2/exa/exa_unaccel.c 2012-01-10 19:28:09.296923679 -0600
|
||||
@@ -344,7 +344,7 @@
|
||||
Box.x2 = Box.x1 + w;
|
||||
Box.y2 = Box.y1 + h;
|
||||
|
||||
- REGION_INIT(pScreen, &Reg, &Box, 1);
|
||||
+ REGION_INIT2(pScreen, &Reg, &Box, 1);
|
||||
|
||||
pExaScr->prepare_access_reg(pPix, EXA_PREPARE_SRC, &Reg);
|
||||
} else
|
||||
Index: xorg-server-1.7.99.2/fb/fboverlay.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/fb/fboverlay.c 2012-01-10 19:11:34.557708404 -0600
|
||||
+++ xorg-server-1.7.99.2/fb/fboverlay.c 2012-01-10 19:12:00.927730397 -0600
|
||||
@@ -147,7 +147,7 @@
|
||||
pbits))
|
||||
return FALSE;
|
||||
pScrPriv->layer[i].u.run.pixmap = pPixmap;
|
||||
- REGION_INIT(pScreen, &pScrPriv->layer[i].u.run.region, &box, 0);
|
||||
+ REGION_INIT2(pScreen, &pScrPriv->layer[i].u.run.region, &box, 0);
|
||||
}
|
||||
pScreen->devPrivate = pScrPriv->layer[0].u.run.pixmap;
|
||||
return TRUE;
|
||||
Index: xorg-server-1.7.99.2/glx/glxdri2.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/glx/glxdri2.c 2012-01-10 19:22:49.027529676 -0600
|
||||
+++ xorg-server-1.7.99.2/glx/glxdri2.c 2012-01-10 19:23:32.686731325 -0600
|
||||
@@ -126,7 +126,7 @@
|
||||
box.y1 = private->height - y - h;
|
||||
box.x2 = x + w;
|
||||
box.y2 = private->height - y;
|
||||
- REGION_INIT(drawable->pDraw->pScreen, ®ion, &box, 0);
|
||||
+ REGION_INIT2(drawable->pDraw->pScreen, ®ion, &box, 0);
|
||||
|
||||
DRI2CopyRegion(drawable->pDraw, ®ion,
|
||||
DRI2BufferFrontLeft, DRI2BufferBackLeft);
|
||||
@@ -154,7 +154,7 @@
|
||||
box.y1 = 0;
|
||||
box.x2 = private->width;
|
||||
box.y2 = private->height;
|
||||
- REGION_INIT(drawable->pDraw->pScreen, ®ion, &box, 0);
|
||||
+ REGION_INIT2(drawable->pDraw->pScreen, ®ion, &box, 0);
|
||||
|
||||
DRI2CopyRegion(drawable->pDraw, ®ion,
|
||||
DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft);
|
||||
@@ -171,7 +171,7 @@
|
||||
box.y1 = 0;
|
||||
box.x2 = private->width;
|
||||
box.y2 = private->height;
|
||||
- REGION_INIT(drawable->pDraw->pScreen, ®ion, &box, 0);
|
||||
+ REGION_INIT2(drawable->pDraw->pScreen, ®ion, &box, 0);
|
||||
|
||||
DRI2CopyRegion(drawable->pDraw, ®ion,
|
||||
DRI2BufferFrontLeft, DRI2BufferFakeFrontLeft);
|
||||
Index: xorg-server-1.7.99.2/hw/xfree86/common/xf86Helper.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/hw/xfree86/common/xf86Helper.c 2012-01-10 19:30:12.336705520 -0600
|
||||
+++ xorg-server-1.7.99.2/hw/xfree86/common/xf86Helper.c 2012-01-10 19:32:03.116939624 -0600
|
||||
@@ -1107,8 +1107,8 @@
|
||||
box.y1 = 0;
|
||||
box.x2 = pScreen->width;
|
||||
box.y2 = pScreen->height;
|
||||
- REGION_INIT (pScreen, &pWin->winSize, &box, 1);
|
||||
- REGION_INIT (pScreen, &pWin->borderSize, &box, 1);
|
||||
+ REGION_INIT2 (pScreen, &pWin->winSize, &box, 1);
|
||||
+ REGION_INIT2 (pScreen, &pWin->borderSize, &box, 1);
|
||||
if (WasViewable)
|
||||
REGION_RESET(pScreen, &pWin->borderClip, &box);
|
||||
pWin->drawable.width = pScreen->width;
|
||||
Index: xorg-server-1.7.99.2/hw/xfree86/common/xf86fbman.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/hw/xfree86/common/xf86fbman.c 2012-01-10 19:29:29.268021709 -0600
|
||||
+++ xorg-server-1.7.99.2/hw/xfree86/common/xf86fbman.c 2012-01-10 19:31:36.426770740 -0600
|
||||
@@ -536,7 +536,7 @@
|
||||
(resize->box.x2 == OrigArea.x2))
|
||||
return TRUE;
|
||||
|
||||
- REGION_INIT(pScreen, &FreedReg, &OrigArea, 1);
|
||||
+ REGION_INIT2(pScreen, &FreedReg, &OrigArea, 1);
|
||||
REGION_INIT(pScreen, &NewReg, &(resize->box), 1);
|
||||
REGION_SUBTRACT(pScreen, &FreedReg, &FreedReg, &NewReg);
|
||||
REGION_UNION(pScreen, offman->FreeBoxes, offman->FreeBoxes, &FreedReg);
|
||||
@@ -551,7 +551,7 @@
|
||||
|
||||
/* otherwise we remove the old region */
|
||||
|
||||
- REGION_INIT(pScreen, &FreedReg, &OrigArea, 1);
|
||||
+ REGION_INIT2(pScreen, &FreedReg, &OrigArea, 1);
|
||||
REGION_UNION(pScreen, offman->FreeBoxes, offman->FreeBoxes, &FreedReg);
|
||||
|
||||
/* remove the old link */
|
||||
@@ -1206,7 +1206,7 @@
|
||||
if (FullBox->y2 < FullBox->y1) return FALSE;
|
||||
if (FullBox->x2 < FullBox->x1) return FALSE;
|
||||
|
||||
- REGION_INIT(pScreen, &ScreenRegion, &ScreenBox, 1);
|
||||
+ REGION_INIT2(pScreen, &ScreenRegion, &ScreenBox, 1);
|
||||
REGION_INIT(pScreen, &FullRegion, FullBox, 1);
|
||||
|
||||
REGION_SUBTRACT(pScreen, &FullRegion, &FullRegion, &ScreenRegion);
|
||||
Index: xorg-server-1.7.99.2/hw/xfree86/common/xf86xv.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/hw/xfree86/common/xf86xv.c 2012-01-10 19:32:53.867575211 -0600
|
||||
+++ xorg-server-1.7.99.2/hw/xfree86/common/xf86xv.c 2012-01-10 19:34:41.106734114 -0600
|
||||
@@ -711,7 +711,7 @@
|
||||
WinBox.y2 = WinBox.y1 + portPriv->drw_h;
|
||||
|
||||
/* clip to the window composite clip */
|
||||
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
|
||||
+ REGION_INIT2(pScreen, &WinRegion, &WinBox, 1);
|
||||
REGION_NULL(pScreen, &ClipRegion);
|
||||
REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip);
|
||||
|
||||
@@ -776,7 +776,7 @@
|
||||
WinBox.y2 = WinBox.y1 + portPriv->drw_h;
|
||||
|
||||
/* clip to the window composite clip */
|
||||
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
|
||||
+ REGION_INIT2(pScreen, &WinRegion, &WinBox, 1);
|
||||
REGION_NULL(pScreen, &ClipRegion);
|
||||
REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip);
|
||||
|
||||
@@ -790,7 +790,7 @@
|
||||
VPBox.x2 = portPriv->pScrn->frameX1 + 1;
|
||||
VPBox.y2 = portPriv->pScrn->frameY1 + 1;
|
||||
|
||||
- REGION_INIT(pScreen, &VPReg, &VPBox, 1);
|
||||
+ REGION_INIT2(pScreen, &VPReg, &VPBox, 1);
|
||||
REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg);
|
||||
REGION_UNINIT(pScreen, &VPReg);
|
||||
}
|
||||
@@ -866,7 +866,7 @@
|
||||
WinBox.y2 = WinBox.y1 + portPriv->drw_h;
|
||||
|
||||
/* clip to the window composite clip */
|
||||
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
|
||||
+ REGION_INIT2(pScreen, &WinRegion, &WinBox, 1);
|
||||
REGION_NULL(pScreen, &ClipRegion);
|
||||
REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip);
|
||||
|
||||
@@ -880,7 +880,7 @@
|
||||
VPBox.x2 = portPriv->pScrn->frameX1 + 1;
|
||||
VPBox.y2 = portPriv->pScrn->frameY1 + 1;
|
||||
|
||||
- REGION_INIT(pScreen, &VPReg, &VPBox, 1);
|
||||
+ REGION_INIT2(pScreen, &VPReg, &VPBox, 1);
|
||||
REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg);
|
||||
REGION_UNINIT(pScreen, &VPReg);
|
||||
}
|
||||
@@ -1423,7 +1423,7 @@
|
||||
WinBox.x2 = WinBox.x1 + drw_w;
|
||||
WinBox.y2 = WinBox.y1 + drw_h;
|
||||
|
||||
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
|
||||
+ REGION_INIT2(pScreen, &WinRegion, &WinBox, 1);
|
||||
REGION_NULL(pScreen, &ClipRegion);
|
||||
REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip);
|
||||
|
||||
@@ -1436,7 +1436,7 @@
|
||||
VPBox.x2 = portPriv->pScrn->frameX1 + 1;
|
||||
VPBox.y2 = portPriv->pScrn->frameY1 + 1;
|
||||
|
||||
- REGION_INIT(pScreen, &VPReg, &VPBox, 1);
|
||||
+ REGION_INIT2(pScreen, &VPReg, &VPBox, 1);
|
||||
REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg);
|
||||
REGION_UNINIT(pScreen, &VPReg);
|
||||
}
|
||||
@@ -1575,7 +1575,7 @@
|
||||
WinBox.x2 = WinBox.x1 + drw_w;
|
||||
WinBox.y2 = WinBox.y1 + drw_h;
|
||||
|
||||
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
|
||||
+ REGION_INIT2(pScreen, &WinRegion, &WinBox, 1);
|
||||
REGION_NULL(pScreen, &ClipRegion);
|
||||
REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip);
|
||||
|
||||
@@ -1723,7 +1723,7 @@
|
||||
WinBox.x2 = WinBox.x1 + drw_w;
|
||||
WinBox.y2 = WinBox.y1 + drw_h;
|
||||
|
||||
- REGION_INIT(pScreen, &WinRegion, &WinBox, 1);
|
||||
+ REGION_INIT2(pScreen, &WinRegion, &WinBox, 1);
|
||||
REGION_NULL(pScreen, &ClipRegion);
|
||||
REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip);
|
||||
|
||||
@@ -1736,7 +1736,7 @@
|
||||
VPBox.x2 = portPriv->pScrn->frameX1 + 1;
|
||||
VPBox.y2 = portPriv->pScrn->frameY1 + 1;
|
||||
|
||||
- REGION_INIT(pScreen, &VPReg, &VPBox, 1);
|
||||
+ REGION_INIT2(pScreen, &VPReg, &VPBox, 1);
|
||||
REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg);
|
||||
REGION_UNINIT(pScreen, &VPReg);
|
||||
}
|
||||
Index: xorg-server-1.7.99.2/hw/xfree86/dri2/dri2.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/hw/xfree86/dri2/dri2.c 2012-01-10 21:16:09.657521437 -0600
|
||||
+++ xorg-server-1.7.99.2/hw/xfree86/dri2/dri2.c 2012-01-10 21:16:20.876960691 -0600
|
||||
@@ -283,7 +283,7 @@
|
||||
box.y1 = 0;
|
||||
box.x2 = pPriv->width;
|
||||
box.y2 = pPriv->height;
|
||||
- REGION_INIT(pDraw->pScreen, ®ion, &box, 0);
|
||||
+ REGION_INIT2(pDraw->pScreen, ®ion, &box, 0);
|
||||
|
||||
DRI2CopyRegion(pDraw, ®ion, DRI2BufferFakeFrontLeft,
|
||||
DRI2BufferFrontLeft);
|
||||
Index: xorg-server-1.7.99.2/hw/xfree86/modes/xf86Crtc.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/hw/xfree86/modes/xf86Crtc.c 2012-01-10 20:06:07.747729534 -0600
|
||||
+++ xorg-server-1.7.99.2/hw/xfree86/modes/xf86Crtc.c 2012-01-10 20:06:25.306735060 -0600
|
||||
@@ -3123,7 +3123,7 @@
|
||||
&crtc_box);
|
||||
|
||||
if (crtc) {
|
||||
- REGION_INIT (pScreen, &crtc_region_local, &crtc_box, 1);
|
||||
+ REGION_INIT2 (pScreen, &crtc_region_local, &crtc_box, 1);
|
||||
crtc_region = &crtc_region_local;
|
||||
REGION_INTERSECT (pScreen, crtc_region, crtc_region, reg);
|
||||
}
|
||||
Index: xorg-server-1.7.99.2/hw/xfree86/modes/xf86Rotate.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/hw/xfree86/modes/xf86Rotate.c 2012-01-10 20:06:52.906706867 -0600
|
||||
+++ xorg-server-1.7.99.2/hw/xfree86/modes/xf86Rotate.c 2012-01-10 20:07:09.076733051 -0600
|
||||
@@ -167,7 +167,7 @@
|
||||
if (damage_box.y1 < 0) damage_box.y1 = 0;
|
||||
if (damage_box.x2 > pScreen->width) damage_box.x2 = pScreen->width;
|
||||
if (damage_box.y2 > pScreen->height) damage_box.y2 = pScreen->height;
|
||||
- REGION_INIT (pScreen, &damage_region, &damage_box, 1);
|
||||
+ REGION_INIT2 (pScreen, &damage_region, &damage_box, 1);
|
||||
DamageRegionAppend (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
|
||||
&damage_region);
|
||||
REGION_UNINIT (pScreen, &damage_region);
|
||||
Index: xorg-server-1.7.99.2/hw/xfree86/xaa/xaaBitBlt.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/hw/xfree86/xaa/xaaBitBlt.c 2012-01-10 20:04:11.086727146 -0600
|
||||
+++ xorg-server-1.7.99.2/hw/xfree86/xaa/xaaBitBlt.c 2012-01-10 20:05:00.747564540 -0600
|
||||
@@ -118,7 +118,7 @@
|
||||
fastExpose = 0;
|
||||
}
|
||||
} else {
|
||||
- REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1);
|
||||
+ REGION_INIT2(pGC->pScreen, &rgnDst, &fastBox, 1);
|
||||
REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip);
|
||||
}
|
||||
|
||||
@@ -165,14 +165,14 @@
|
||||
if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2) {
|
||||
REGION_NULL(pGC->pScreen, &rgnDst);
|
||||
} else {
|
||||
- REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1);
|
||||
+ REGION_INIT2(pGC->pScreen, &rgnDst, &fastBox, 1);
|
||||
}
|
||||
} else {
|
||||
/* We must turn off fastClip now, since we must create
|
||||
a full blown region. It is intersected with the
|
||||
composite clip below. */
|
||||
fastClip = 0;
|
||||
- REGION_INIT(pGC->pScreen, &rgnDst, &fastBox,1);
|
||||
+ REGION_INIT2(pGC->pScreen, &rgnDst, &fastBox,1);
|
||||
}
|
||||
} else {
|
||||
REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy);
|
||||
Index: xorg-server-1.7.99.2/include/regionstr.h
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/include/regionstr.h 2012-01-10 19:02:29.548029362 -0600
|
||||
+++ xorg-server-1.7.99.2/include/regionstr.h 2012-01-10 19:02:38.466732886 -0600
|
||||
@@ -152,6 +152,11 @@
|
||||
} \
|
||||
}
|
||||
|
||||
+#define REGION_INIT2(_pScreen, _pReg, _rect, _size) \
|
||||
+{ \
|
||||
+ (_pReg)->extents = *(_rect); \
|
||||
+ (_pReg)->data = (RegDataPtr)NULL; \
|
||||
+}
|
||||
|
||||
#define REGION_UNINIT(_pScreen, _pReg) \
|
||||
{ \
|
||||
Index: xorg-server-1.7.99.2/mi/mibank.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/mi/mibank.c 2012-01-10 19:13:24.187649642 -0600
|
||||
+++ xorg-server-1.7.99.2/mi/mibank.c 2012-01-10 19:13:52.156941273 -0600
|
||||
@@ -772,7 +772,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- REGION_INIT(pScreen, &rgnDst, &fastBox, 1);
|
||||
+ REGION_INIT2(pScreen, &rgnDst, &fastBox, 1);
|
||||
REGION_INTERSECT(pScreen, &rgnDst, &rgnDst, prgnSrcClip);
|
||||
pBox = REGION_RECTS(&rgnDst);
|
||||
nBox = REGION_NUM_RECTS(&rgnDst);
|
||||
Index: xorg-server-1.7.99.2/mi/micopy.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/mi/micopy.c 2012-01-10 19:12:55.427823858 -0600
|
||||
+++ xorg-server-1.7.99.2/mi/micopy.c 2012-01-10 19:13:43.617564166 -0600
|
||||
@@ -315,7 +315,7 @@
|
||||
box.y1 = box_y1;
|
||||
box.x2 = box_x2;
|
||||
box.y2 = box_y2;
|
||||
- REGION_INIT(pGC->pScreen, &rgnDst, &box, 1);
|
||||
+ REGION_INIT2(pGC->pScreen, &rgnDst, &box, 1);
|
||||
}
|
||||
|
||||
/* Clip against complex source if needed */
|
||||
Index: xorg-server-1.7.99.2/mi/miexpose.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/mi/miexpose.c 2012-01-10 19:14:32.367860019 -0600
|
||||
+++ xorg-server-1.7.99.2/mi/miexpose.c 2012-01-10 19:15:04.996733972 -0600
|
||||
@@ -206,7 +206,7 @@
|
||||
box.x2 = pSrcDrawable->width;
|
||||
box.y2 = pSrcDrawable->height;
|
||||
prgnSrcClip = &rgnSrcRec;
|
||||
- REGION_INIT(pscr, prgnSrcClip, &box, 1);
|
||||
+ REGION_INIT2(pscr, prgnSrcClip, &box, 1);
|
||||
pSrcWin = NULL;
|
||||
}
|
||||
|
||||
@@ -239,11 +239,11 @@
|
||||
box.x2 = pDstDrawable->width;
|
||||
box.y2 = pDstDrawable->height;
|
||||
prgnDstClip = &rgnDstRec;
|
||||
- REGION_INIT(pscr, prgnDstClip, &box, 1);
|
||||
+ REGION_INIT2(pscr, prgnDstClip, &box, 1);
|
||||
}
|
||||
|
||||
/* drawable-relative source region */
|
||||
- REGION_INIT(pscr, &rgnExposed, &srcBox, 1);
|
||||
+ REGION_INIT2(pscr, &rgnExposed, &srcBox, 1);
|
||||
|
||||
/* now get the hidden parts of the source box*/
|
||||
REGION_SUBTRACT(pscr, &rgnExposed, &rgnExposed, prgnSrcClip);
|
||||
@@ -491,7 +491,7 @@
|
||||
box = *REGION_EXTENTS( pWin->drawable.pScreen, exposures);
|
||||
if (exposures == prgn) {
|
||||
exposures = &expRec;
|
||||
- REGION_INIT( pWin->drawable.pScreen, exposures, &box, 1);
|
||||
+ REGION_INIT2( pWin->drawable.pScreen, exposures, &box, 1);
|
||||
REGION_RESET( pWin->drawable.pScreen, prgn, &box);
|
||||
} else {
|
||||
REGION_RESET( pWin->drawable.pScreen, exposures, &box);
|
||||
Index: xorg-server-1.7.99.2/mi/mioverlay.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/mi/mioverlay.c 2012-01-10 19:16:09.686730991 -0600
|
||||
+++ xorg-server-1.7.99.2/mi/mioverlay.c 2012-01-10 19:16:32.496733671 -0600
|
||||
@@ -209,8 +209,8 @@
|
||||
fullBox.y1 = 0;
|
||||
fullBox.x2 = pScreen->width;
|
||||
fullBox.y2 = pScreen->height;
|
||||
- REGION_INIT(pScreen, &(pTree->borderClip), &fullBox, 1);
|
||||
- REGION_INIT(pScreen, &(pTree->clipList), &fullBox, 1);
|
||||
+ REGION_INIT2(pScreen, &(pTree->borderClip), &fullBox, 1);
|
||||
+ REGION_INIT2(pScreen, &(pTree->clipList), &fullBox, 1);
|
||||
}
|
||||
} else xfree(pTree);
|
||||
}
|
||||
@@ -1027,7 +1027,7 @@
|
||||
box = *REGION_EXTENTS(pScreen, exposures);
|
||||
if (exposures == prgn) {
|
||||
exposures = &expRec;
|
||||
- REGION_INIT(pScreen, exposures, &box, 1);
|
||||
+ REGION_INIT2(pScreen, exposures, &box, 1);
|
||||
REGION_RESET(pScreen, prgn, &box);
|
||||
} else {
|
||||
REGION_RESET(pScreen, exposures, &box);
|
||||
@@ -1672,7 +1672,7 @@
|
||||
box.x1 = x1; box.x2 = x2;
|
||||
box.y1 = y1; box.y2 = y2;
|
||||
|
||||
- REGION_INIT(pScreen, ®, &box, 1);
|
||||
+ REGION_INIT2(pScreen, ®, &box, 1);
|
||||
|
||||
REGION_INTERSECT(pScreen, ®, ®, clipList);
|
||||
if (generateExposures)
|
||||
Index: xorg-server-1.7.99.2/mi/miwindow.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/mi/miwindow.c 2012-01-10 19:17:07.617526248 -0600
|
||||
+++ xorg-server-1.7.99.2/mi/miwindow.c 2012-01-10 19:17:17.267563248 -0600
|
||||
@@ -111,7 +111,7 @@
|
||||
box.y2 = y2;
|
||||
|
||||
pScreen = pWin->drawable.pScreen;
|
||||
- REGION_INIT(pScreen, ®, &box, 1);
|
||||
+ REGION_INIT2(pScreen, ®, &box, 1);
|
||||
|
||||
REGION_INTERSECT(pScreen, ®, ®, &pWin->clipList);
|
||||
if (generateExposures)
|
||||
Index: xorg-server-1.7.99.2/miext/damage/damage.c
|
||||
===================================================================
|
||||
--- xorg-server-1.7.99.2.orig/miext/damage/damage.c 2012-01-10 19:19:39.626736500 -0600
|
||||
+++ xorg-server-1.7.99.2/miext/damage/damage.c 2012-01-10 19:21:06.396941292 -0600
|
||||
@@ -324,7 +324,7 @@
|
||||
box.y1 = draw_y;
|
||||
box.x2 = draw_x + pDamage->pDrawable->width;
|
||||
box.y2 = draw_y + pDamage->pDrawable->height;
|
||||
- REGION_INIT(pScreen, &pixClip, &box, 1);
|
||||
+ REGION_INIT2(pScreen, &pixClip, &box, 1);
|
||||
REGION_INTERSECT (pScreen, pDamageRegion, pRegion, &pixClip);
|
||||
REGION_UNINIT(pScreen, &pixClip);
|
||||
}
|
||||
@@ -2085,7 +2085,7 @@
|
||||
box.y1 = pDrawable->y;
|
||||
box.x2 = pDrawable->x + pDrawable->width;
|
||||
box.y2 = pDrawable->y + pDrawable->height;
|
||||
- REGION_INIT (pDrawable->pScreen, &pixmapClip, &box, 1);
|
||||
+ REGION_INIT2 (pDrawable->pScreen, &pixmapClip, &box, 1);
|
||||
pClip = &pixmapClip;
|
||||
}
|
||||
REGION_TRANSLATE (pDrawable->pScreen, &pDamage->damage, pDrawable->x, pDrawable->y);
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
PR = "r6"
|
||||
|
||||
PROTO_DEPS += "xf86driproto dri2proto"
|
||||
|
||||
DEPENDS += "font-util"
|
||||
|
||||
SRC_URI += "file://nodolt.patch \
|
||||
file://crosscompile.patch \
|
||||
file://libdrm-poulsbo.patch \
|
||||
file://werror-address-fix.patch \
|
||||
file://ptr-to-int-cast-fix.patch \
|
||||
file://fix-bogus-stack-variables.patch"
|
||||
|
||||
# Misc build failure for master HEAD
|
||||
SRC_URI += "file://fix_open_max_preprocessor_error.patch"
|
||||
|
||||
EXTRA_OECONF += "--enable-dri --enable-dri2 --enable-dga --enable-glx"
|
||||
|
||||
RDEPENDS_${PN} += "xserver-xorg-video-psb psb-firmware xpsb-glx \
|
||||
libdrm-poulsbo libva"
|
||||
|
||||
COMPATIBLE_MACHINE = "emenlow"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=3dd2bbe3563837f80ed8926b06c1c353"
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
require recipes-graphics/xorg-xserver/xserver-xorg.inc
|
||||
require xserver-psb-${PV}.inc
|
||||
|
||||
SRC_URI[md5sum] = "cafc4e2d4ef6cf6e47f3e7dffeb3346a"
|
||||
SRC_URI[sha256sum] = "a89f13b166b412930fe418ff50032dd2cde8bb181d8b47b5ca6f848d218fdcf2"
|
||||
|
||||
PE = "1"
|
||||
|
|
@ -1,13 +1,48 @@
|
|||
Section "ServerFlags"
|
||||
Option "AutoAddDevices" "False"
|
||||
##
|
||||
## X Config options generated from CED
|
||||
## x11 conf skeleton
|
||||
## DriverVer=
|
||||
##
|
||||
|
||||
Section "Screen"
|
||||
Identifier "Screen0"
|
||||
Device "IntelEMGD-0"
|
||||
Monitor "Monitor0"
|
||||
SubSectionSub "Display"
|
||||
EndSubSection
|
||||
EndSection
|
||||
|
||||
# Primary (First/only) display
|
||||
Section "Device"
|
||||
Identifier "Configured Video Device"
|
||||
Driver "psb"
|
||||
Option "ShadowFB" "False"
|
||||
Identifier "IntelEMGD-0"
|
||||
Driver "emgd"
|
||||
VendorName "Intel(R) DEG"
|
||||
BoardName "Embedded Graphics"
|
||||
BusID "0:2:0"
|
||||
Screen 0
|
||||
Option "PcfVersion" "1792"
|
||||
Option "ConfigId" "1"
|
||||
Option "ALL/1/name" "e6xx"
|
||||
Option "ALL/1/General/PortOrder" "24000"
|
||||
Option "ALL/1/General/DisplayConfig" "1"
|
||||
Option "ALL/1/General/DisplayDetect" "1"
|
||||
Option "ALL/1/General/TuningWA" "1"
|
||||
Option "ALL/1/Port/4/General/name" "lvds"
|
||||
Option "ALL/1/Port/4/General/EdidAvail" "3"
|
||||
Option "ALL/1/Port/4/General/EdidNotAvail" "1"
|
||||
Option "ALL/1/Port/4/General/Rotation" "0"
|
||||
Option "ALL/1/Port/4/General/Edid" "0"
|
||||
EndSection
|
||||
|
||||
Section "DRI"
|
||||
Mode 0666
|
||||
Section "ServerLayout"
|
||||
Identifier "Default Layout"
|
||||
Screen 0 "Screen0" 0 0
|
||||
# InputDevice "Mouse0" "CorePointer"
|
||||
# InputDevice "Keyboard0" "CoreKeyboard"
|
||||
# InputDevice "DevInputMice" "SendCoreEvents"
|
||||
EndSection
|
||||
|
||||
Section "ServerFlags"
|
||||
Option "DontZap" "0"
|
||||
Option "AutoAddDevices" "False"
|
||||
EndSection
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
PR := "${PR}.2"
|
||||
|
|
|
|||
|
|
@ -1,58 +0,0 @@
|
|||
Index: mesa/configs/linux-dri
|
||||
===================================================================
|
||||
--- mesa.orig/configs/linux-dri
|
||||
+++ mesa/configs/linux-dri
|
||||
@@ -3,11 +3,9 @@
|
||||
|
||||
include $(TOP)/configs/default
|
||||
|
||||
-CONFIG_NAME = linux-dri
|
||||
+$(warning ENVIRONMENT = $(shell printenv))
|
||||
|
||||
-# Compiler and flags
|
||||
-CC = gcc
|
||||
-CXX = g++
|
||||
+CONFIG_NAME = linux-dri
|
||||
|
||||
#MKDEP = /usr/X11R6/bin/makedepend
|
||||
#MKDEP = gcc -M
|
||||
@@ -25,8 +23,6 @@ DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOU
|
||||
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
|
||||
-DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
|
||||
|
||||
-X11_INCLUDES = -I/usr/X11R6/include
|
||||
-
|
||||
CFLAGS = -Wall -Wmissing-prototypes -std=c99 -ffast-math \
|
||||
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS)
|
||||
|
||||
@@ -40,9 +36,6 @@ CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
ASM_SOURCES =
|
||||
|
||||
-# Library/program dependencies
|
||||
-EXTRA_LIB_PATH=-L/usr/X11R6/lib
|
||||
-
|
||||
LIBDRM_CFLAGS = `pkg-config --cflags libdrm-poulsbo`
|
||||
LIBDRM_LIB = `pkg-config --libs libdrm-poulsbo`
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
||||
Index: mesa/configs/default
|
||||
===================================================================
|
||||
--- mesa.orig/configs/default
|
||||
+++ mesa/configs/default
|
||||
@@ -17,8 +17,6 @@ MESA_VERSION = $(MESA_MAJOR).$(MESA_MINO
|
||||
DRM_SOURCE_PATH=$(TOP)/../drm
|
||||
|
||||
# Compiler and flags
|
||||
-CC = cc
|
||||
-CXX = CC
|
||||
CFLAGS = -O
|
||||
CXXFLAGS = -O
|
||||
LDFLAGS =
|
||||
@@ -67,7 +65,6 @@ ASM_SOURCES =
|
||||
# GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
|
||||
# order to build the Motif widget too)
|
||||
GLW_SOURCES = GLwDrawA.c
|
||||
-MOTIF_CFLAGS = -I/usr/include/Motif1.2
|
||||
|
||||
|
||||
# Directories to build
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
Index: mesa/configure.ac
|
||||
===================================================================
|
||||
--- mesa.orig/configure.ac 2010-05-13 13:20:26.000000000 +0100
|
||||
+++ mesa/configure.ac 2010-07-25 17:02:58.000000000 +0100
|
||||
@@ -524,10 +524,10 @@
|
||||
fi
|
||||
|
||||
# Check for libdrm
|
||||
- PKG_CHECK_MODULES([LIBDRM], [libdrm-poulsbo >= $LIBDRM_REQUIRED])
|
||||
+ PKG_CHECK_MODULES([LIBDRM], [libdrm_poulsbo >= $LIBDRM_REQUIRED])
|
||||
PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
|
||||
- GL_PC_REQ_PRIV="libdrm-poulsbo >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
|
||||
- DRI_PC_REQ_PRIV="libdrm-poulsbo >= $LIBDRM_REQUIRED"
|
||||
+ GL_PC_REQ_PRIV="libdrm_poulsbo >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
|
||||
+ DRI_PC_REQ_PRIV="libdrm_poulsbo >= $LIBDRM_REQUIRED"
|
||||
|
||||
# find the DRI deps for libGL
|
||||
if test "$x11_pkgconfig" = yes; then
|
||||
Index: mesa/configs/linux-dri
|
||||
===================================================================
|
||||
--- mesa.orig/configs/linux-dri 2010-07-25 17:08:01.000000000 +0100
|
||||
+++ mesa/configs/linux-dri 2010-07-25 17:08:17.000000000 +0100
|
||||
@@ -36,8 +36,8 @@
|
||||
|
||||
ASM_SOURCES =
|
||||
|
||||
-LIBDRM_CFLAGS = `pkg-config --cflags libdrm-poulsbo`
|
||||
-LIBDRM_LIB = `pkg-config --libs libdrm-poulsbo`
|
||||
+LIBDRM_CFLAGS = `pkg-config --cflags libdrm_poulsbo`
|
||||
+LIBDRM_LIB = `pkg-config --libs libdrm_poulsbo`
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
|
||||
-lm -lpthread -ldl $(LIBDRM_LIB)
|
||||
Index: mesa/configs/linux-dri-xcb
|
||||
===================================================================
|
||||
--- mesa.orig/configs/linux-dri-xcb 2010-07-25 17:08:25.000000000 +0100
|
||||
+++ mesa/configs/linux-dri-xcb 2010-07-25 17:08:44.000000000 +0100
|
||||
@@ -41,8 +41,8 @@
|
||||
# Library/program dependencies
|
||||
EXTRA_LIB_PATH=`pkg-config --libs-only-L x11`
|
||||
|
||||
-LIBDRM_CFLAGS = `pkg-config --cflags libdrm-poulsbo`
|
||||
-LIBDRM_LIB = `pkg-config --libs libdrm-poulsbo`
|
||||
+LIBDRM_CFLAGS = `pkg-config --cflags libdrm_poulsbo`
|
||||
+LIBDRM_LIB = `pkg-config --libs libdrm_poulsbo`
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
|
||||
-lm -lpthread -ldl $(LIBDRM_LIB) `pkg-config --libs xcb` \
|
||||
Index: mesa/configs/linux-solo
|
||||
===================================================================
|
||||
--- mesa.orig/configs/linux-solo 2010-07-25 17:09:03.000000000 +0100
|
||||
+++ mesa/configs/linux-solo 2010-07-25 17:09:13.000000000 +0100
|
||||
@@ -16,8 +16,8 @@
|
||||
ARCH_FLAGS ?=
|
||||
|
||||
# DRM and pciaccess
|
||||
-LIBDRM_CFLAGS = `pkg-config --cflags libdrm-poulsbo`
|
||||
-LIBDRM_LIB = `pkg-config --libs libdrm-poulsbo`
|
||||
+LIBDRM_CFLAGS = `pkg-config --cflags libdrm_poulsbo`
|
||||
+LIBDRM_LIB = `pkg-config --libs libdrm_poulsbo`
|
||||
PCIACCESS_CFLAGS = `pkg-config --cflags pciaccess`
|
||||
PCIACCESS_LIB = `pkg-config --libs pciaccess`
|
||||
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
Index: mesa/src/mesa/x86/Makefile
|
||||
===================================================================
|
||||
--- mesa.orig/src/mesa/x86/Makefile 2010-10-11 16:34:12.664960996 +0100
|
||||
+++ mesa/src/mesa/x86/Makefile 2010-10-11 16:34:43.854960861 +0100
|
||||
@@ -20,11 +20,12 @@
|
||||
-rm -f matypes.h gen_matypes
|
||||
|
||||
|
||||
-gen_matypes: gen_matypes.c
|
||||
- $(CC) $(INCLUDE_DIRS) $(CFLAGS) gen_matypes.c -o gen_matypes
|
||||
+#gen_matypes: gen_matypes.c
|
||||
+# $(CC) $(INCLUDE_DIRS) $(CFLAGS) gen_matypes.c -o gen_matypes
|
||||
|
||||
# need some special rules here, unfortunately
|
||||
-matypes.h: ../main/mtypes.h ../tnl/t_context.h gen_matypes
|
||||
+matypes.h: ../main/mtypes.h ../tnl/t_context.h
|
||||
+# gen_matypes
|
||||
./gen_matypes > matypes.h
|
||||
|
||||
common_x86_asm.o: matypes.h
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
DESCRIPTION = "X11 drivers for Poulsbo (psb) 3D acceleration"
|
||||
|
||||
# There's a mesa implementation in this package, which is presumably
|
||||
# not Intel proprietary, but it has no obvious license attached to it.
|
||||
LICENSE = "Intel-binary-only"
|
||||
LIC_FILES_CHKSUM = "file://${WORKDIR}/${PN}-${PV}/COPYING;md5=02c597a2f082b4581596065bb5a521a8"
|
||||
PR = "r10"
|
||||
|
||||
inherit autotools
|
||||
|
||||
PROVIDES = "virtual/libgl mesa-dri"
|
||||
|
||||
SRC_URI="https://launchpad.net/~gma500/+archive/ppa/+files/xpsb-glx_0.18-0ubuntu1netbook2~1004um1ubuntu1.tar.gz \
|
||||
file://cross-compile.patch \
|
||||
file://libdrmname.patch \
|
||||
file://native-matypes.patch"
|
||||
|
||||
SRC_URI[md5sum] = "50423a9e861ccff5814eb95a32494952"
|
||||
SRC_URI[sha256sum] = "03c958defef56ae0ec051c6f67620fa90733649925386824b7bf029f40bd7905"
|
||||
|
||||
do_configure () {
|
||||
chmod +x autogen.sh && ./autogen.sh ${CONFIGUREOPTS} && make realclean
|
||||
cd ${S}/src/mesa/x86/
|
||||
${BUILD_CC} -I../../../include/GL -I../../../include -I.. -I../main -I../math -I../glapi -I../tnl -Wall -Wmissing-prototypes -std=c99 -ffast-math -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -fno-strict-aliasing gen_matypes.c -o gen_matypes
|
||||
}
|
||||
|
||||
do_install() {
|
||||
make DESTDIR=${D} install
|
||||
install -d -m 0755 ${D}/${libdir}/xorg/modules/dri \
|
||||
${D}/${libdir}/xorg/modules/drivers
|
||||
install -m 0644 ${WORKDIR}/${PN}-${PV}/dri/* \
|
||||
${D}/${libdir}/xorg/modules/dri
|
||||
install -m 0644 ${WORKDIR}/${PN}-${PV}/drivers/* \
|
||||
${D}/${libdir}/xorg/modules/drivers
|
||||
ln -s ${libdir}/xorg/modules/dri ${D}${libdir}/dri
|
||||
}
|
||||
|
||||
S = "${WORKDIR}/${PN}-${PV}/mesa"
|
||||
|
||||
EXTRA_OEMAKE = "linux-dri-x86"
|
||||
|
||||
DEPENDS += "libxfixes libxdamage libdrm-poulsbo libxxf86vm dri2proto libxmu libxi glproto makedepend-native"
|
||||
|
||||
FILES_${PN}-dev += "${libdir}/pkgconfig"
|
||||
FILES_${PN} += "${libdir}/xorg/modules/dri/* \
|
||||
${libdir}/xorg/modules/drivers/* \
|
||||
${libdir}/dri"
|
||||
|
||||
PACKAGES =+ "libglu libglu-dev"
|
||||
|
||||
FILES_libglu = "${libdir}/libGLU.so.*"
|
||||
FILES_libglu-dev = "${libdir}/libGLU.* ${includedir}/GL/glu*.h"
|
||||
|
||||
# Multiple virtual/gl providers being built breaks staging
|
||||
EXCLUDE_FROM_WORLD = "1"
|
||||
|
||||
COMPATIBLE_MACHINE = "emenlow"
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
diff -Nurp xserver-xorg-video-psb-0.30.0+repack.orig/src/psb_driver.c xserver-xorg-video-psb-0.30.0+repack/src/psb_driver.c
|
||||
--- xserver-xorg-video-psb-0.30.0+repack.orig/src/psb_driver.c 2009-04-17 00:00:46.000000000 +0200
|
||||
+++ xserver-xorg-video-psb-0.30.0+repack/src/psb_driver.c 2009-08-06 18:13:43.000000000 +0200
|
||||
@@ -753,7 +753,7 @@ psbInitOutputs(ScrnInfoPtr pScrn)
|
||||
|
||||
xf86GetOptValBool(pPsb->options, OPTION_NOPANEL, &pPsb->noPanel);
|
||||
|
||||
- pPsb->lidTimer = TRUE;
|
||||
+ pPsb->lidTimer = FALSE;
|
||||
xf86GetOptValBool(pPsb->options, OPTION_LIDTIMER, &pPsb->lidTimer);
|
||||
|
||||
xf86GetOptValBool(pPsb->options, OPTION_NOFITTING, &pPsb->noFitting);
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
Index: xserver-xorg-video-psb-0.32.1/configure.ac
|
||||
===================================================================
|
||||
--- xserver-xorg-video-psb-0.32.1.orig/configure.ac
|
||||
+++ xserver-xorg-video-psb-0.32.1/configure.ac
|
||||
@@ -75,12 +75,9 @@ AM_CONDITIONAL(BUILD_EXA, [test "$build_
|
||||
AC_HEADER_STDC
|
||||
|
||||
if test "$DRI" != no; then
|
||||
- AC_CHECK_FILE([${sdkdir}/dri.h],
|
||||
- [have_dri_h="yes"], [have_dri_h="no"])
|
||||
- AC_CHECK_FILE([${sdkdir}/sarea.h],
|
||||
- [have_sarea_h="yes"], [have_sarea_h="no"])
|
||||
- AC_CHECK_FILE([${sdkdir}/dristruct.h],
|
||||
- [have_dristruct_h="yes"], [have_dristruct_h="no"])
|
||||
+ have_dri_h="yes"
|
||||
+ have_sarea_h="yes"
|
||||
+ have_dristruct_h="yes"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether to include DRI support])
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
Index: xserver-xorg-video-psb-0.32.1/configure.ac
|
||||
===================================================================
|
||||
--- xserver-xorg-video-psb-0.32.1.orig/configure.ac
|
||||
+++ xserver-xorg-video-psb-0.32.1/configure.ac
|
||||
@@ -94,7 +94,7 @@ AC_MSG_RESULT([$DRI])
|
||||
|
||||
AM_CONDITIONAL(DRI, test x$DRI = xyes)
|
||||
if test "$DRI" = yes; then
|
||||
- PKG_CHECK_MODULES(DRI, [libdrm-poulsbo >= 2.0 xf86driproto])
|
||||
+ PKG_CHECK_MODULES(DRI, [libdrm_poulsbo >= 2.0 xf86driproto])
|
||||
AC_DEFINE(XF86DRI,1,[Enable DRI driver support])
|
||||
AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
|
||||
fi
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
--- xserver-xorg-video-psb-0.32.1/src/psb_accel.c.orig 2010-07-04 19:27:48.691227698 +0200
|
||||
+++ xserver-xorg-video-psb-0.32.1/src/psb_accel.c 2010-07-04 19:27:15.338230809 +0200
|
||||
@@ -308,6 +308,14 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+static void*
|
||||
+psbExaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, int usage_hint, int bpp, int* new_pitch )
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
+static void
|
||||
+psbExaDestroyPixmap(ScreenPtr pScreen, void* driverPriv ){
|
||||
+}
|
||||
static Bool
|
||||
psbExaPixmapIsOffscreen(PixmapPtr p)
|
||||
{
|
||||
@@ -1313,6 +1321,7 @@
|
||||
pExa->pixmapOffsetAlign = 8;
|
||||
pExa->pixmapPitchAlign = 32 * 4;
|
||||
pExa->flags = EXA_OFFSCREEN_PIXMAPS;
|
||||
+ pExa->flags |= EXA_HANDLES_PIXMAPS | EXA_MIXED_PIXMAPS;
|
||||
pExa->maxX = 2047;
|
||||
pExa->maxY = 2047;
|
||||
pExa->WaitMarker = psbExaWaitMarker;
|
||||
@@ -1328,6 +1337,9 @@
|
||||
pExa->Composite = psbExaSuperComposite;
|
||||
pExa->DoneComposite = psbExaDoneComposite;
|
||||
pExa->PixmapIsOffscreen = psbExaPixmapIsOffscreen;
|
||||
+ pExa->CreatePixmap = NULL;
|
||||
+ pExa->CreatePixmap2 = psbExaCreatePixmap;
|
||||
+ pExa->DestroyPixmap = psbExaDestroyPixmap;
|
||||
pExa->PrepareAccess = psbExaPrepareAccess;
|
||||
pExa->FinishAccess = psbExaFinishAccess;
|
||||
pExa->UploadToScreen = psbExaUploadToScreen;
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
--- xserver-xorg-video-psb-0.36.0-ref/src/psb_video.c 2010-06-07 22:17:46.302760345 +0200
|
||||
+++ xserver-xorg-video-psb-0.32/src/psb_video.c 2010-06-10 17:29:23.400003434 +0200
|
||||
@@ -686,8 +684,13 @@
|
||||
* coordinates) to the backing pixmap.
|
||||
*/
|
||||
|
||||
- while (!psbExaGetSuperOffset(pPixmap, &pre_add, &dstBuf))
|
||||
+ if(!psbExaGetSuperOffset(pPixmap, &pre_add, &dstBuf)){
|
||||
exaMoveInPixmap(pPixmap);
|
||||
+ if(!psbExaGetSuperOffset(pPixmap, &pre_add, &dstBuf)){
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
dst.buffer = mmKernelBuf(dstBuf);
|
||||
dst.offset = pre_add;
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
diff -p -up xserver-xorg-video-psb-0.31.0/src/psb_driver.c.orig xserver-xorg-video-psb-0.31.0/src/psb_driver.c
|
||||
--- xserver-xorg-video-psb-0.31.0/src/psb_driver.c.orig 2010-04-30 08:58:06.798598457 +0200
|
||||
+++ xserver-xorg-video-psb-0.31.0/src/psb_driver.c 2010-04-30 09:03:04.186597975 +0200
|
||||
@@ -643,6 +643,19 @@ psbPreInitDRI(ScrnInfoPtr pScrn)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+/* removed in Xserver 1.7, add it again so that proprietary Xpsb can be loaded */
|
||||
+void
|
||||
+xf86AddModuleInfo(pointer info, pointer module)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+/* removed in mesa, add it again so that proprietary Xpsb can be loaded */
|
||||
+typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...);
|
||||
+void
|
||||
+_glapi_set_warning_func( _glapi_warning_func func )
|
||||
+{
|
||||
+}
|
||||
+
|
||||
static Bool
|
||||
psbPreInitXpsb(ScrnInfoPtr pScrn)
|
||||
{
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
Index: xserver-xorg-video-psb-0.32.1/configure.ac
|
||||
===================================================================
|
||||
--- xserver-xorg-video-psb-0.32.1.orig/configure.ac
|
||||
+++ xserver-xorg-video-psb-0.32.1/configure.ac
|
||||
@@ -107,6 +107,7 @@ AC_DEFINE(INTEL_PSB_DRIVER, 1, [Compatib
|
||||
|
||||
AC_SUBST([DRI_CFLAGS])
|
||||
AC_SUBST([XORG_CFLAGS])
|
||||
+XORG_CFLAGS = `echo $XORG_CFLAGS | sed 's/hidden/default/'`
|
||||
AC_SUBST([moduledir])
|
||||
|
||||
DRIVER_NAME=psb
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- xserver-xorg-video-psb-0.31.0/src/psb_driver.c 2009-04-17 11:22:26.000000000 -0700
|
||||
+++ xserver-xorg-video-psb-0.31.0/src/psb_driver.c.new 2009-08-14 15:41:35.047596131 -0700
|
||||
@@ -909,7 +909,7 @@
|
||||
xf86DrvMsg(pScrn->scrnIndex, from, "Use %s cursor.\n",
|
||||
pPsb->sWCursor ? "software" : "hardware");
|
||||
|
||||
- pPsb->ignoreACPI = FALSE;
|
||||
+ pPsb->ignoreACPI = TRUE;
|
||||
from =
|
||||
xf86GetOptValBool(pPsb->options, OPTION_IGNORE_ACPI,
|
||||
&pPsb->ignoreACPI)
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
--- xserver-xorg-video-psb-0.31.0/src/Xpsb.h 2009-04-17 11:22:26.000000000 -0700
|
||||
+++ xserver-xorg-video-psb-0.31.0/src/Xpsb.h.new 2009-08-28 09:24:16.333677591 -0700
|
||||
@@ -38,7 +38,9 @@
|
||||
#include "xf86drm.h"
|
||||
#include "xf86.h"
|
||||
#include "xf86_OSproc.h"
|
||||
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
|
||||
#include "xf86Resources.h"
|
||||
+#endif
|
||||
#include "compiler.h"
|
||||
|
||||
#define XPSB_VOFFSET_X 0
|
||||
--- xserver-xorg-video-psb-0.31.0/src/psb_driver.h 2009-04-17 11:22:25.000000000 -0700
|
||||
+++ xserver-xorg-video-psb-0.31.0/src/psb_driver.h.new 2009-08-28 09:24:11.822679667 -0700
|
||||
@@ -34,7 +34,6 @@
|
||||
|
||||
#include "xf86.h"
|
||||
#include "xf86_OSproc.h"
|
||||
-#include "xf86Resources.h"
|
||||
#include "compiler.h"
|
||||
#include "xf86PciInfo.h"
|
||||
#include "vgaHW.h"
|
||||
@@ -46,8 +45,10 @@
|
||||
#include "xf86int10.h"
|
||||
#include "mibank.h"
|
||||
#include "dgaproc.h"
|
||||
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
|
||||
#include "xf86Resources.h"
|
||||
#include "xf86RAC.h"
|
||||
+#endif
|
||||
#include "fb.h"
|
||||
#include "xaa.h"
|
||||
#include "xf86xv.h"
|
||||
--- xserver-xorg-video-psb-0.31.0/src/i830_i2c.c 2009-04-17 11:22:24.000000000 -0700
|
||||
+++ xserver-xorg-video-psb-0.31.0/src/i830_i2c.c.new 2009-08-28 09:33:06.789804272 -0700
|
||||
@@ -31,8 +31,10 @@
|
||||
|
||||
#include "xf86.h"
|
||||
#include "xf86_OSproc.h"
|
||||
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
|
||||
#include "xf86Resources.h"
|
||||
#include "xf86RAC.h"
|
||||
+#endif
|
||||
#include "xf86cmap.h"
|
||||
#include "compiler.h"
|
||||
#include "mibstore.h"
|
||||
--- xserver-xorg-video-psb-0.31.0/src/psb_video.c 2009-04-17 11:22:26.000000000 -0700
|
||||
+++ xserver-xorg-video-psb-0.31.0/src/psb_video.c.new 2009-08-28 09:35:03.874805663 -0700
|
||||
@@ -36,7 +36,9 @@
|
||||
|
||||
#include "xf86.h"
|
||||
#include "xf86_OSproc.h"
|
||||
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
|
||||
#include "xf86Resources.h"
|
||||
+#endif
|
||||
#include "compiler.h"
|
||||
|
||||
#include "xf86xv.h"
|
||||
--- xserver-xorg-video-psb-0.31.0/src/psb_driver.c 2009-04-17 11:22:26.000000000 -0700
|
||||
+++ xserver-xorg-video-psb-0.31.0/src/psb_driver.c.new 2009-08-28 10:30:32.325553685 -0700
|
||||
@@ -317,7 +317,7 @@
|
||||
* This data is accessed by the loader. The name must be the module name
|
||||
* followed by "ModuleData".
|
||||
*/
|
||||
-XF86ModuleData psbModuleData = { &psbVersionRec, psbSetup, NULL };
|
||||
+_X_EXPORT XF86ModuleData psbModuleData = { &psbVersionRec, psbSetup, NULL };
|
||||
|
||||
static pointer
|
||||
psbSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
|
||||
@@ -1023,11 +1023,13 @@
|
||||
|
||||
PSB_DEBUG(scrnIndex, 3, "Initializing device\n");
|
||||
|
||||
+#ifndef XSERVER_LIBPCIACCESS
|
||||
if (xf86RegisterResources(pDevice->pEnt->index, NULL, ResExclusive)) {
|
||||
xf86DrvMsg(scrnIndex, X_ERROR,
|
||||
"Could not registrer device. Resource conflict.\n");
|
||||
return FALSE;
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (!xf86LoadSubModule(pDevice->pScrns[0], "vgahw"))
|
||||
return FALSE;
|
||||
|
||||
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
diff -p -up xserver-xorg-video-psb-0.31.0/libmm/mm_drm.c.assert xserver-xorg-video-psb-0.31.0/libmm/mm_drm.c
|
||||
--- xserver-xorg-video-psb-0.31.0/libmm/mm_drm.c.assert 2010-04-26 13:40:50.000000000 +0200
|
||||
+++ xserver-xorg-video-psb-0.31.0/libmm/mm_drm.c 2010-04-26 13:48:28.000000000 +0200
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "xf86mm.h"
|
||||
#include "xf86drm.h"
|
||||
#include "stdio.h"
|
||||
+#include <assert.h>
|
||||
|
||||
/*
|
||||
* This is a simple wrapper around libdrm's buffer interface to be used
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
diff -p -up xserver-xorg-video-psb-0.31.0/libmm/mm_drm.c.comment_unused xserver-xorg-video-psb-0.31.0/libmm/mm_drm.c
|
||||
--- xserver-xorg-video-psb-0.31.0/libmm/mm_drm.c.comment_unused 2009-04-17 20:22:26.000000000 +0200
|
||||
+++ xserver-xorg-video-psb-0.31.0/libmm/mm_drm.c 2010-04-26 13:40:50.000000000 +0200
|
||||
@@ -277,6 +277,7 @@ createFence(struct _MMManager *mm,
|
||||
return &dFence->mf;
|
||||
}
|
||||
|
||||
+/*
|
||||
static void
|
||||
fenceDestroy(struct _MMFence *mf)
|
||||
{
|
||||
@@ -288,6 +289,7 @@ fenceDestroy(struct _MMFence *mf)
|
||||
assert(ret == 0);
|
||||
free(dFence);
|
||||
}
|
||||
+*/
|
||||
|
||||
static int
|
||||
fenceEmit(struct _MMFence *mf, unsigned fence_class,
|
||||
@@ -369,7 +371,7 @@ mmCreateDRM(int drmFD)
|
||||
mm->fenceSignaled = fenceSignaled;
|
||||
mm->fenceWait = fenceWait;
|
||||
mm->fenceError = NULL;
|
||||
- mm->fenceDestroy = fenceDestroy;
|
||||
+ /* mm->fenceDestroy = fenceDestroy; */
|
||||
mm->destroy = destroy;
|
||||
return mm;
|
||||
|
||||
diff -p -up xserver-xorg-video-psb-0.31.0/libmm/mm_interface.h.comment_unused xserver-xorg-video-psb-0.31.0/libmm/mm_interface.h
|
||||
--- xserver-xorg-video-psb-0.31.0/libmm/mm_interface.h.comment_unused 2009-04-17 20:22:26.000000000 +0200
|
||||
+++ xserver-xorg-video-psb-0.31.0/libmm/mm_interface.h 2010-04-26 13:45:22.000000000 +0200
|
||||
@@ -141,7 +141,7 @@ typedef struct _MMManager
|
||||
int (*fenceWait) (struct _MMFence * mf, unsigned flushMask,
|
||||
unsigned flags);
|
||||
unsigned (*fenceError) (struct _MMFence * mf);
|
||||
- void (*fenceDestroy) (struct _MMFence * mf);
|
||||
+ /* void (*fenceDestroy) (struct _MMFence * mf); */
|
||||
} MMManager;
|
||||
|
||||
/*
|
||||
@@ -204,6 +204,7 @@ mmFenceEmit(struct _MMFence *mf, unsigne
|
||||
return mf->man->fenceEmit(mf, class, type, flags);
|
||||
}
|
||||
|
||||
+/*
|
||||
static inline void
|
||||
mmFenceUnReference(struct _MMFence **mfP)
|
||||
{
|
||||
@@ -214,6 +215,7 @@ mmFenceUnReference(struct _MMFence **mfP
|
||||
}
|
||||
*mfP = NULL;
|
||||
}
|
||||
+*/
|
||||
|
||||
static inline struct _MMFence *
|
||||
mmFenceReference(struct _MMFence *mf)
|
||||
diff -p -up xserver-xorg-video-psb-0.31.0/libmm/mm_user.c.comment_unused xserver-xorg-video-psb-0.31.0/libmm/mm_user.c
|
||||
--- xserver-xorg-video-psb-0.31.0/libmm/mm_user.c.comment_unused 2009-04-17 20:22:26.000000000 +0200
|
||||
+++ xserver-xorg-video-psb-0.31.0/libmm/mm_user.c 2010-04-26 13:05:15.000000000 +0200
|
||||
@@ -77,6 +77,7 @@ typedef struct _UserSignal
|
||||
UserManager *man;
|
||||
} UserSignal;
|
||||
|
||||
+/*
|
||||
void
|
||||
mmFenceSignal(struct _MMSignal *signal, unsigned class,
|
||||
unsigned type, unsigned sequence, unsigned error,
|
||||
@@ -148,6 +149,7 @@ mmFenceSignal(struct _MMSignal *signal,
|
||||
type |= fence->signalPrevious;
|
||||
}
|
||||
}
|
||||
+*/
|
||||
|
||||
static int
|
||||
fenceEmit(struct _MMFence *mf, unsigned class, unsigned type, unsigned flags)
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
diff -p -up xserver-xorg-video-psb-0.31.0/src/psb_accel.c.greedy xserver-xorg-video-psb-0.31.0/src/psb_accel.c
|
||||
--- xserver-xorg-video-psb-0.31.0/src/psb_accel.c.greedy 2009-04-17 20:22:24.000000000 +0200
|
||||
+++ xserver-xorg-video-psb-0.31.0/src/psb_accel.c 2010-04-23 14:52:47.000000000 +0200
|
||||
@@ -1331,6 +1331,15 @@ psbExaInit(ScrnInfoPtr pScrn)
|
||||
pExa->FinishAccess = psbExaFinishAccess;
|
||||
pExa->UploadToScreen = psbExaUploadToScreen;
|
||||
|
||||
+ if (!xf86FindOptionValue(pScrn->options, "MigrationHeuristic")) {
|
||||
+ const char *default_migration = "greedy";
|
||||
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
||||
+ "Using default MigrationHeuristic: %s\n",
|
||||
+ default_migration);
|
||||
+ xf86ReplaceStrOption(pScrn->options, "MigrationHeuristic", default_migration);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
if (!exaDriverInit(pScrn->pScreen, pExa)) {
|
||||
goto out_err;
|
||||
}
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
diff -p -up xserver-xorg-video-psb-0.31.0/src/psb_dri.c.loader xserver-xorg-video-psb-0.31.0/src/psb_dri.c
|
||||
--- xserver-xorg-video-psb-0.31.0/src/psb_dri.c.loader 2009-04-17 20:22:24.000000000 +0200
|
||||
+++ xserver-xorg-video-psb-0.31.0/src/psb_dri.c 2010-03-12 15:03:33.000000000 +0100
|
||||
@@ -548,8 +548,6 @@ psbDRIScreenInit(ScreenPtr pScreen)
|
||||
|
||||
PSB_DEBUG(pScrn->scrnIndex, 3, "psbDRIScreenInit\n");
|
||||
|
||||
- xf86LoaderReqSymLists(driReqSymbols, NULL);
|
||||
-
|
||||
pPsb->pDRIInfo = NULL;
|
||||
|
||||
/*
|
||||
diff -p -up xserver-xorg-video-psb-0.31.0/src/psb_driver.c.loader xserver-xorg-video-psb-0.31.0/src/psb_driver.c
|
||||
--- xserver-xorg-video-psb-0.31.0/src/psb_driver.c.loader 2010-03-12 13:48:52.000000000 +0100
|
||||
+++ xserver-xorg-video-psb-0.31.0/src/psb_driver.c 2010-03-12 15:03:26.000000000 +0100
|
||||
@@ -329,12 +329,6 @@ psbSetup(pointer Module, pointer Options
|
||||
if (!Initialised) {
|
||||
Initialised = TRUE;
|
||||
xf86AddDriver(&psb, Module, 0);
|
||||
- LoaderRefSymLists(fbSymbols, ddcSymbols, shadowSymbols,
|
||||
- psbvgahwSymbols,
|
||||
-#ifdef XF86DRI
|
||||
- psbDRMSymbols, psbDRISymbols,
|
||||
-#endif
|
||||
- NULL);
|
||||
return (pointer) TRUE;
|
||||
}
|
||||
|
||||
@@ -639,7 +633,6 @@ psbPreInitDRI(ScrnInfoPtr pScrn)
|
||||
if (!xf86LoadSubModule(pScrn, "dri"))
|
||||
return FALSE;
|
||||
|
||||
- xf86LoaderReqSymLists(psbDRISymbols, psbDRMSymbols, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -660,7 +653,6 @@ psbPreInitXpsb(ScrnInfoPtr pScrn)
|
||||
|
||||
pPsb->xpsb = TRUE;
|
||||
|
||||
- xf86LoaderReqSymLists(psbXpsbSymbols, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
@@ -680,7 +672,6 @@ psbPreInitAccel(ScrnInfoPtr pScrn)
|
||||
if (!xf86LoadSubModule(pScrn, "exa"))
|
||||
return FALSE;
|
||||
|
||||
- xf86LoaderReqSymLists(exaSymbols, NULL);
|
||||
}
|
||||
|
||||
xf86DrvMsg(pScrn->scrnIndex, from, "Acceleration %sabled\n",
|
||||
@@ -720,7 +711,6 @@ psbPreInitShadowFB(ScrnInfoPtr pScrn)
|
||||
if (!xf86LoadSubModule(pScrn, "shadow"))
|
||||
return FALSE;
|
||||
|
||||
- xf86LoaderReqSymLists(shadowSymbols, NULL);
|
||||
}
|
||||
|
||||
xf86DrvMsg(pScrn->scrnIndex, from, "Shadow framebuffer %sabled\n",
|
||||
@@ -854,7 +844,6 @@ psbPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
|
||||
if (!xf86LoadSubModule(pScrn, "vbe"))
|
||||
return FALSE;
|
||||
- xf86LoaderReqSymLists(vbeSymbols, NULL);
|
||||
|
||||
/*
|
||||
* Parse options and load required modules here.
|
||||
@@ -874,7 +863,6 @@ psbPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
|
||||
if (!xf86LoadSubModule(pScrn, "fb"))
|
||||
return (FALSE);
|
||||
- xf86LoaderReqSymLists(fbSymbols, NULL);
|
||||
|
||||
pScrn->chipset = "Intel GMA500";
|
||||
pScrn->monitor = pScrn->confScreen->monitor;
|
||||
@@ -1033,7 +1021,6 @@ psbDeviceInit(PsbDevicePtr pDevice, int
|
||||
|
||||
if (!xf86LoadSubModule(pDevice->pScrns[0], "vgahw"))
|
||||
return FALSE;
|
||||
- xf86LoaderReqSymLists(psbvgahwSymbols, NULL);
|
||||
|
||||
if (!vgaHWGetHWRec(pDevice->pScrns[0]))
|
||||
return FALSE;
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
DESCRIPTION = "2D graphics driver for Poulsbo"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://MIT_License.txt;md5=732825ecdcf420261531d935fcd914a7"
|
||||
PR = "r3"
|
||||
|
||||
inherit autotools
|
||||
|
||||
SRC_URI = "https://launchpad.net/~gma500/+archive/ppa/+files/xserver-xorg-video-psb_0.36.0-0ubuntu3~1004um9.tar.gz \
|
||||
file://xorg-x11-drv-psb-0.31.0-ignoreacpi.patch;patch=1 \
|
||||
file://xorg-x11-drv-psb-0.31.0-xserver17.patch;patch=1 \
|
||||
file://xserver-xorg-video-psb-0.31.0-assert.patch;patch=1 \
|
||||
file://xserver-xorg-video-psb-0.31.0-comment_unused.patch;patch=1 \
|
||||
file://xserver-xorg-video-psb-0.31.0-greedy.patch;patch=1 \
|
||||
file://xserver-xorg-video-psb-0.31.0-loader.patch;patch=1 \
|
||||
file://stubs.patch;patch=1 \
|
||||
file://01_disable_lid_timer.patch;patch=1 \
|
||||
file://psb_xvtempfix.patch;patch=1 \
|
||||
file://psb_mixed.patch;patch=1 \
|
||||
file://dri-h.patch \
|
||||
file://libdrm-poulsbo.patch"
|
||||
|
||||
SRC_URI[md5sum] = "67bd808960db4fe9b3a7ff2582da1608"
|
||||
SRC_URI[sha256sum] = "deeaf6e4d059e709d8a4268bd013a172f7fbd70778236d7d1e2712d1951de72c"
|
||||
|
||||
export DRI_CFLAGS="-I${STAGING_INCDIR}/psb -I${STAGING_INCDIR}/psb/drm \
|
||||
-I${STAGING_INCDIR}/X11/dri"
|
||||
|
||||
export CFLAGS = "-fvisibility=default"
|
||||
export XORG_CFLAGS="-fvisibility=default -I${STAGING_INCDIR}/xorg \
|
||||
-I${STAGING_INCDIR}/pixman-1"
|
||||
|
||||
FILES_${PN} += "${libdir}/xorg/modules/drivers/libmm.so \
|
||||
${libdir}/xorg/modules/drivers/psb_drv.so"
|
||||
|
||||
DEPENDS += "virtual/libgl virtual/xserver"
|
||||
|
||||
RDEPENDS_${PN} = "xserver-psb-module-exa"
|
||||
|
||||
COMPATIBLE_MACHINE = "emenlow"
|
||||
Loading…
Reference in New Issue
Block a user