diff options
-rw-r--r-- | configure.ac | 26 | ||||
-rwxr-xr-x | src/i965_drv_video.c | 5 | ||||
-rw-r--r-- | src/i965_render.c | 2 |
3 files changed, 32 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 1093ba0..d5fa71e 100644 --- a/configure.ac +++ b/configure.ac @@ -41,6 +41,11 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [ AC_SUBST(AM_DEFAULT_VERBOSITY) ]) +AC_ARG_ENABLE(drm, + [AC_HELP_STRING([--enable-drm], + [build with VA/DRM API support @<:@default=yes@:>@])], + [], [enable_drm="yes"]) + AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC @@ -67,6 +72,23 @@ dnl Check for VA-API PKG_CHECK_MODULES(LIBVA_DEPS, [libva >= libva_version]) PKG_CHECK_MODULES(LIBVA_X11_DEPS, [libva-x11]) +dnl Check for VA/DRM API +USE_DRM="$enable_drm" +if test "$USE_DRM" = "yes"; then + PKG_CHECK_MODULES(LIBVA_DRM_DEPS, [libva-drm], + [AC_DEFINE([HAVE_VA_DRM], [1], [Defined to 1 if VA/DRM API is enabled])], + [USE_DRM="no"]) + + # Check for <drm_fourcc.h> + if test "$USE_DRM" = "yes"; then + saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $DRM_CFLAGS" + AC_CHECK_HEADERS([drm_fourcc.h], [:], [USE_DRM="no"]) + CPPFLAGS="$saved_CPPFLAGS" + fi +fi +AM_CONDITIONAL(USE_DRM, test "$USE_DRM" = "yes") + VA_VERSION=`$PKG_CONFIG --modversion libva` VA_MAJOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f1` VA_MINOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f2` @@ -109,9 +131,13 @@ AC_OUTPUT([ ]) dnl Print summary +BACKENDS="x11" +AS_IF([test "$USE_DRM" = "yes"], [BACKENDS="$BACKENDS drm"]) + echo echo $PACKAGE configuration summary: echo echo VA-API version ................... : $VA_VERSION_STR echo VA-API drivers path .............. : $LIBVA_DRIVERS_PATH +echo Windowing systems ................ : $BACKENDS echo diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c index c042d38..f809a8e 100755 --- a/src/i965_drv_video.c +++ b/src/i965_drv_video.c @@ -3274,6 +3274,11 @@ i965_PutSurface(VADriverContextP ctx, Bool new_region = False; int pp_flag = 0; +#ifdef HAVE_VA_DRM + if (ctx->display_type == VA_DISPLAY_DRM) + return VA_STATUS_ERROR_UNIMPLEMENTED; +#endif + /* Currently don't support DRI1 */ if (dri_state->base.auth_type != VA_DRM_AUTH_DRI2) return VA_STATUS_ERROR_UNKNOWN; diff --git a/src/i965_render.c b/src/i965_render.c index 7db0946..4584c14 100644 --- a/src/i965_render.c +++ b/src/i965_render.c @@ -36,7 +36,7 @@ #include <string.h> #include <assert.h> -#include <va/va_dricommon.h> +#include <va/va_drmcommon.h> #include "intel_batchbuffer.h" #include "intel_driver.h" |