summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@intel.com>2009-04-22 15:54:26 -0400
committerAustin Yuan <shengquan.yuan@intel.com>2009-04-22 15:54:26 -0400
commit91455761d2584f08dba4e893ef042ce41b33626c (patch)
treec9c21d1e853bed8caf78c77280906be53e973877 /src
parent997d59cf2092a29979c19a62fbe43d7f8d4dfa29 (diff)
More update for DRI2 support
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/X11/va_dri2.c5
-rw-r--r--src/X11/va_x11.c12
3 files changed, 13 insertions, 6 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 06aeaff..68ce13e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -27,7 +27,7 @@ INCLUDES = \
libva_la_LTLIBRARIES = libva.la
libva_ladir = $(libdir)
libva_la_LDFLAGS = -version-number 0:30:0 -no-undefined
-libva_la_LIBADD = $(LIBVA_LIBS) -ldl -lX11 -lXext -lXfixes -lXdamage -lXv -lXrandr X11/libva_X11.la
+libva_la_LIBADD = $(LIBVA_LIBS) -ldl -ldrm -lX11 -lXext X11/libva_X11.la
SUBDIRS = X11
diff --git a/src/X11/va_dri2.c b/src/X11/va_dri2.c
index 10340b2..4bd5b52 100644
--- a/src/X11/va_dri2.c
+++ b/src/X11/va_dri2.c
@@ -40,7 +40,8 @@
#include "va_dri2.h"
static char va_dri2ExtensionName[] = DRI2_NAME;
-static XExtensionInfo *va_dri2Info;
+static XExtensionInfo _va_dri2_info_data;
+static XExtensionInfo *va_dri2Info = &_va_dri2_info_data;
static XEXT_GENERATE_CLOSE_DISPLAY (VA_DRI2CloseDisplay, va_dri2Info)
static /* const */ XExtensionHooks va_dri2ExtensionHooks = {
NULL, /* create_gc */
@@ -49,7 +50,7 @@ static /* const */ XExtensionHooks va_dri2ExtensionHooks = {
NULL, /* free_gc */
NULL, /* create_font */
NULL, /* free_font */
- VA_DRI2CloseDisplay, /* close_display */
+ VA_DRI2CloseDisplay, /* close_display */
NULL, /* wire_to_event */
NULL, /* event_to_wire */
NULL, /* error */
diff --git a/src/X11/va_x11.c b/src/X11/va_x11.c
index f050648..85b21d5 100644
--- a/src/X11/va_x11.c
+++ b/src/X11/va_x11.c
@@ -27,9 +27,14 @@
#include "va_backend.h"
#include "va_x11.h"
#include "va_dri.h"
+#include "va_dri2.h"
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
static VADisplayContextP pDisplayContexts = NULL;
@@ -97,7 +102,8 @@ static VAStatus va_DRI2GetDriverName (
{
VADriverContextP ctx = pDisplayContext->pDriverContext;
VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN;
- char *driverName, *deviceName;
+ int eventBase, errorBase;
+ char *device_name;
int driver_major;
int driver_minor;
int driver_patch;
@@ -114,7 +120,7 @@ static VAStatus va_DRI2GetDriverName (
}
if (!VA_DRI2Connect(ctx->x11_dpy, RootWindow(ctx->x11_dpy, ctx->x11_screen),
- &driver_name, &device_name)) {
+ driver_name, &device_name)) {
va_infoMessage("DRI2 isn't enabled, fallback to DRI1\n");
return VA_STATUS_ERROR_UNKNOWN;
}
@@ -214,7 +220,7 @@ static VAStatus va_DisplayContextGetDriverName (
{
/* For easier debugging */
if (*driver_name)
- Xfree(*driver_name);
+ XFree(*driver_name);
*driver_name = strdup(getenv("LIBVA_DRIVER_NAME"));
return VA_STATUS_SUCCESS;