[Libva] [PATCH 2/4] Add raw DRM support.

Gwenole Beauchesne gb.devel at gmail.com
Tue Jul 3 07:43:34 PDT 2012


From: Dmitry Ermilov <dmitry.ermilov at intel.com>

Signed-off-by: Dmitry Ermilov <dmitry.ermilov at intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
---
 configure.ac         |   17 +++++++++++++++++
 src/i965_drv_video.c |    5 +++++
 src/i965_render.c    |    2 +-
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 1093ba0..3c084a0 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,14 @@ 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"])
+fi
+
 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 +122,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 f662645..90f41e2 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.type != VA_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"
-- 
1.7.9.5



More information about the Libva mailing list