summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 31005e4)
raw | patch | inline | side by side (parent: 31005e4)
author | Rob Clark <rob@ti.com> | |
Sat, 21 Jan 2012 19:47:39 +0000 (13:47 -0600) | ||
committer | Rob Clark <rob@ti.com> | |
Thu, 26 Jan 2012 20:24:35 +0000 (14:24 -0600) |
Test v4l2 headers, and only enable v4l2/dmabuf tests if dmabuf support
is detected.
is detected.
Makefile.am | patch | blob | history | |
cam-setup.sh | [new file with mode: 0755] | patch | blob |
configure.ac | patch | blob | history | |
util/Makefile.am | patch | blob | history |
diff --git a/Makefile.am b/Makefile.am
index e176126d2afd42cb21e3d349702713544308ab72..dc13f6d5e5cab4defded2ddcad3cff3f76d10093 100644 (file)
--- a/Makefile.am
+++ b/Makefile.am
#
SUBDIRS = util
-bin_PROGRAMS = fliptest dmabuftest
+bin_PROGRAMS = fliptest
+
+if ENABLE_V4L2_DMABUF
+bin_PROGRAMS += dmabuftest
+endif
if ENABLE_DCE
bin_PROGRAMS += viddec3test
fliptest_SOURCES = fliptest.c
fliptest_LDADD = $(LDADD_COMMON)
+if ENABLE_V4L2_DMABUF
dmabuftest_SOURCES = dmabuftest.c
dmabuftest_LDADD = $(LDADD_COMMON)
+endif
if ENABLE_DCE
viddec3test_SOURCES = viddec3test.c
diff --git a/cam-setup.sh b/cam-setup.sh
--- /dev/null
+++ b/cam-setup.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# link pipeline:
+/usr/bin/media-ctl -d /dev/media0 -r -l '"OMAP4 ISS CSI2a":1 -> "OMAP4 ISS CSI2a output":0 [1]'
+
+# set formats:
+/usr/bin/media-ctl -d /dev/media0 -r -f '"ov5640 3-003c":0 [UYVY 640x480]','"OMAP4 ISS CSI2a":0 [UYVY 640x480]'
+
+# print setup:
+/usr/bin/media-ctl -d /dev/media0 -p
+
diff --git a/configure.ac b/configure.ac
index 06a930f36f04f5620e03a2e8e94ee38b68f9bf2b..cded853033935fac556abfa0532150a99d9dd436 100644 (file)
--- a/configure.ac
+++ b/configure.ac
# Obtain compiler/linker options for depedencies
PKG_CHECK_MODULES(DRM, libdrm libdrm_omap)
+# Check for v4l2 dmabuf support:
+AC_CHECK_MEMBER([struct v4l2_buffer.m.fd],
+ [HAVE_V4L2_DMABUF=yes],
+ [HAVE_V4L2_DMABUF=no],
+ [[#include <linux/videodev2.h>]])
+if test "x$HAVE_V4L2_DMABUF" = "xyes"; then
+ AC_DEFINE(HAVE_V4L2_DMABUF, 1, [Have V4L2 DMABUF support])
+else
+ AC_MSG_WARN([No V4L2 DMABUF support detected, disabling V4L2 DMABUF tests])
+fi
+AM_CONDITIONAL(ENABLE_V4L2_DMABUF, [test "x$HAVE_V4L2_DMABUF" = xyes])
+
# Check optional X11:
PKG_CHECK_MODULES(X11, x11 libdri2, [HAVE_X11=yes], [HAVE_X11=no])
if test "x$HAVE_X11" = "xyes"; then
diff --git a/util/Makefile.am b/util/Makefile.am
index 9d3ddd2fa24b1530d7707866e0f9b1e8c5ba9777..e00fe2a2b51192d0ff85f75915d340a66dfe7b7b 100644 (file)
--- a/util/Makefile.am
+++ b/util/Makefile.am
libutil_la_SOURCES = \
display-kms.c \
- v4l2.c \
util.c
if ENABLE_X11
libutil_la_SOURCES += display-x11.c
endif
+if ENABLE_V4L2_DMABUF
+libutil_la_SOURCES += v4l2.c
+endif
+
if ENABLE_DCE
libutil_la_SOURCES += demux.c
endif