hardware/intel/libva
修订版 | 91455761d2584f08dba4e893ef042ce41b33626c (tree) |
---|---|
时间 | 2009-04-23 04:54:26 |
作者 | Austin Yuan <shengquan.yuan@inte...> |
Commiter | Austin Yuan |
More update for DRI2 support
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
@@ -36,8 +36,6 @@ AC_SYS_LARGEFILE | ||
36 | 36 | |
37 | 37 | PKG_CHECK_MODULES([X11], [x11]) |
38 | 38 | PKG_CHECK_MODULES([XEXT], [xext]) |
39 | -PKG_CHECK_MODULES([Xfixes], [xfixes]) | |
40 | -PKG_CHECK_MODULES([XDAMAGE], [xdamage]) | |
41 | 39 | PKG_CHECK_MODULES([DRM], [libdrm]) |
42 | 40 | PKG_CHECK_MODULES(LIBDRM_DEPS, [libdrm]) |
43 | 41 |
@@ -27,7 +27,7 @@ INCLUDES = \ | ||
27 | 27 | libva_la_LTLIBRARIES = libva.la |
28 | 28 | libva_ladir = $(libdir) |
29 | 29 | libva_la_LDFLAGS = -version-number 0:30:0 -no-undefined |
30 | -libva_la_LIBADD = $(LIBVA_LIBS) -ldl -lX11 -lXext -lXfixes -lXdamage -lXv -lXrandr X11/libva_X11.la | |
30 | +libva_la_LIBADD = $(LIBVA_LIBS) -ldl -ldrm -lX11 -lXext X11/libva_X11.la | |
31 | 31 | |
32 | 32 | SUBDIRS = X11 |
33 | 33 |
@@ -40,7 +40,8 @@ | ||
40 | 40 | #include "va_dri2.h" |
41 | 41 | |
42 | 42 | static char va_dri2ExtensionName[] = DRI2_NAME; |
43 | -static XExtensionInfo *va_dri2Info; | |
43 | +static XExtensionInfo _va_dri2_info_data; | |
44 | +static XExtensionInfo *va_dri2Info = &_va_dri2_info_data; | |
44 | 45 | static XEXT_GENERATE_CLOSE_DISPLAY (VA_DRI2CloseDisplay, va_dri2Info) |
45 | 46 | static /* const */ XExtensionHooks va_dri2ExtensionHooks = { |
46 | 47 | NULL, /* create_gc */ |
@@ -49,7 +50,7 @@ static /* const */ XExtensionHooks va_dri2ExtensionHooks = { | ||
49 | 50 | NULL, /* free_gc */ |
50 | 51 | NULL, /* create_font */ |
51 | 52 | NULL, /* free_font */ |
52 | - VA_DRI2CloseDisplay, /* close_display */ | |
53 | + VA_DRI2CloseDisplay, /* close_display */ | |
53 | 54 | NULL, /* wire_to_event */ |
54 | 55 | NULL, /* event_to_wire */ |
55 | 56 | NULL, /* error */ |
@@ -27,9 +27,14 @@ | ||
27 | 27 | #include "va_backend.h" |
28 | 28 | #include "va_x11.h" |
29 | 29 | #include "va_dri.h" |
30 | +#include "va_dri2.h" | |
30 | 31 | #include <stdio.h> |
31 | 32 | #include <stdarg.h> |
32 | 33 | #include <string.h> |
34 | +#include <sys/types.h> | |
35 | +#include <sys/stat.h> | |
36 | +#include <fcntl.h> | |
37 | +#include <errno.h> | |
33 | 38 | |
34 | 39 | static VADisplayContextP pDisplayContexts = NULL; |
35 | 40 |
@@ -97,7 +102,8 @@ static VAStatus va_DRI2GetDriverName ( | ||
97 | 102 | { |
98 | 103 | VADriverContextP ctx = pDisplayContext->pDriverContext; |
99 | 104 | VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN; |
100 | - char *driverName, *deviceName; | |
105 | + int eventBase, errorBase; | |
106 | + char *device_name; | |
101 | 107 | int driver_major; |
102 | 108 | int driver_minor; |
103 | 109 | int driver_patch; |
@@ -114,7 +120,7 @@ static VAStatus va_DRI2GetDriverName ( | ||
114 | 120 | } |
115 | 121 | |
116 | 122 | if (!VA_DRI2Connect(ctx->x11_dpy, RootWindow(ctx->x11_dpy, ctx->x11_screen), |
117 | - &driver_name, &device_name)) { | |
123 | + driver_name, &device_name)) { | |
118 | 124 | va_infoMessage("DRI2 isn't enabled, fallback to DRI1\n"); |
119 | 125 | return VA_STATUS_ERROR_UNKNOWN; |
120 | 126 | } |
@@ -214,7 +220,7 @@ static VAStatus va_DisplayContextGetDriverName ( | ||
214 | 220 | { |
215 | 221 | /* For easier debugging */ |
216 | 222 | if (*driver_name) |
217 | - Xfree(*driver_name); | |
223 | + XFree(*driver_name); | |
218 | 224 | |
219 | 225 | *driver_name = strdup(getenv("LIBVA_DRIVER_NAME")); |
220 | 226 | return VA_STATUS_SUCCESS; |