drm: Branch 'master' - 5 commits
[email protected] (Emil Velikov)
| Newsgroups | gmane.comp.video.dri.patches |
|---|---|
| Message-ID | <[email protected]> |
configure.ac | 2 - tests/kms/kms-steal-crtc.c | 3 ++ tests/kms/kms-universal-planes.c | 3 ++ tests/kmstest/Makefile.am | 4 ++- tests/kmstest/main.c | 45 +++++++++++++++++++++++++-------------- tests/modetest/modetest.c | 7 ++++-- tests/proptest/proptest.c | 2 - tests/util/kms.c | 1 tests/vbltest/vbltest.c | 7 ++++-- 9 files changed, 51 insertions(+), 23 deletions(-) New commits: commit ff0c9caa8e1e076b82241304dfd19d5b3e2a2aec Author: Kylie McClain <[email protected]> Date: Tue Jan 19 22:27:28 2016 -0500 tests: Include poll.h rather than sys/poll.h sys/poll.h is a non-standard location of the poll.h header, and is incorrect on non-glibc libcs. poll.h, however, is defined in SUS (v2) and is more portable. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93764 http://pubs.opengroup.org/onlinepubs/007908799/xsh/poll.h.html Signed-off-by: Emil Velikov <[email protected]> diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index b8aa94b..a5ac5bd 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -53,7 +53,7 @@ #include <string.h> #include <strings.h> #include <errno.h> -#include <sys/poll.h> +#include <poll.h> #include <sys/time.h> #ifdef HAVE_SYS_SELECT_H #include <sys/select.h> diff --git a/tests/vbltest/vbltest.c b/tests/vbltest/vbltest.c index 97dd44d..3f6b803 100644 --- a/tests/vbltest/vbltest.c +++ b/tests/vbltest/vbltest.c @@ -35,7 +35,7 @@ #include <unistd.h> #include <string.h> #include <errno.h> -#include <sys/poll.h> +#include <poll.h> #include <sys/time.h> #ifdef HAVE_SYS_SELECT_H #include <sys/select.h> commit 358615f416a8f3085a63c03a55564f71946083d1 Author: Khem Raj <[email protected]> Date: Wed Jan 20 05:35:11 2016 +0000 tests: Include sys/select.h Used in compliance with POSIX 2001/2008 Fixes errors e.g. error: implicit declaration of function 'select' and helps with missing definitions of FD_* defines v2: conditionally include sys/select.h, include in every test where needed. Signed-off-by: Khem Raj <[email protected]> Reviewed-by: Thierry Reding <[email protected]> (v1) Reviewed-by: Emil Velikov <[email protected]> diff --git a/configure.ac b/configure.ac index a09be61..4635d18 100644 --- a/configure.ac +++ b/configure.ac @@ -53,7 +53,7 @@ AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_FUNC_ALLOCA -AC_CHECK_HEADERS([sys/mkdev.h sys/sysctl.h]) +AC_CHECK_HEADERS([sys/mkdev.h sys/sysctl.h sys/select.h]) # Initialize libtool LT_PREREQ([2.2]) diff --git a/tests/kms/kms-steal-crtc.c b/tests/kms/kms-steal-crtc.c index 2f7f327..497772e 100644 --- a/tests/kms/kms-steal-crtc.c +++ b/tests/kms/kms-steal-crtc.c @@ -31,6 +31,9 @@ #include <stdio.h> #include <string.h> #include <unistd.h> +#ifdef HAVE_SYS_SELECT_H +#include <sys/select.h> +#endif #include <drm_fourcc.h> diff --git a/tests/kms/kms-universal-planes.c b/tests/kms/kms-universal-planes.c index 9151231..d8e5fc4 100644 --- a/tests/kms/kms-universal-planes.c +++ b/tests/kms/kms-universal-planes.c @@ -32,6 +32,9 @@ #include <stdio.h> #include <string.h> #include <unistd.h> +#ifdef HAVE_SYS_SELECT_H +#include <sys/select.h> +#endif #include <drm_fourcc.h> #include "xf86drm.h" diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index f665240..b8aa94b 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -55,6 +55,9 @@ #include <errno.h> #include <sys/poll.h> #include <sys/time.h> +#ifdef HAVE_SYS_SELECT_H +#include <sys/select.h> +#endif #include "xf86drm.h" #include "xf86drmMode.h" diff --git a/tests/vbltest/vbltest.c b/tests/vbltest/vbltest.c index 4475b49..97dd44d 100644 --- a/tests/vbltest/vbltest.c +++ b/tests/vbltest/vbltest.c @@ -37,6 +37,9 @@ #include <errno.h> #include <sys/poll.h> #include <sys/time.h> +#ifdef HAVE_SYS_SELECT_H +#include <sys/select.h> +#endif #include "xf86drm.h" #include "xf86drmMode.h" commit 1674147a149c2165a927a5d8eb0db4eee1f6a4e3 Author: Thierry Reding <[email protected]> Date: Tue Jan 5 15:21:23 2016 +0100 tests: util: Fixup util_open() parameter order util_open() takes a device parameter, followed by a module parameter. The existing tests used the drmOpen() function, which uses a different ordering of the parameters, and the old ordering was accidentally kept during the conversion. Signed-off-by: Thierry Reding <[email protected]> Reviewed-by: Emil Velikov <[email protected]> diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index 22e3e81..f665240 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -1603,7 +1603,7 @@ int main(int argc, char **argv) if (!args) encoders = connectors = crtcs = planes = framebuffers = 1; - dev.fd = util_open(module, device); + dev.fd = util_open(device, module); if (dev.fd < 0) return -1; diff --git a/tests/proptest/proptest.c b/tests/proptest/proptest.c index 24c6345..4bd0866 100644 --- a/tests/proptest/proptest.c +++ b/tests/proptest/proptest.c @@ -295,7 +295,7 @@ int main(int argc, char *argv[]) args = argc - optind; - fd = util_open(module, device); + fd = util_open(device, module); if (fd < 0) return 1; diff --git a/tests/vbltest/vbltest.c b/tests/vbltest/vbltest.c index 1833321..4475b49 100644 --- a/tests/vbltest/vbltest.c +++ b/tests/vbltest/vbltest.c @@ -120,7 +120,7 @@ int main(int argc, char **argv) } } - fd = util_open(module, device); + fd = util_open(device, module); if (fd < 0) return 1; commit 2ad5ea780b3cca83ae4f531ae0b4159e802ef825 Author: Stefan Agner <[email protected]> Date: Sat Dec 19 21:52:59 2015 -0800 tests: add fsl-dcu-drm to modules Signed-off-by: Stefan Agner <[email protected]> Reviewed-by: Emil Velikov <[email protected]> diff --git a/tests/util/kms.c b/tests/util/kms.c index 57b0191..dcd5a8e 100644 --- a/tests/util/kms.c +++ b/tests/util/kms.c @@ -139,6 +139,7 @@ static const char * const modules[] = { "imx-drm", "rockchip", "atmel-hlcdc", + "fsl-dcu-drm", }; int util_open(const char *device, const char *module) commit 0caf58a6cb82327a3f6a53f05dea8e02f1412a05 Author: Stefan Agner <[email protected]> Date: Sat Dec 19 21:52:58 2015 -0800 kmstest: Use util_open() Use the new util_open() helper instead of open-coding the method for finding a usable device. While at it, make the command-line interface more consistent with that of modetest by adding the -D and -M options. Signed-off-by: Stefan Agner <[email protected]> v2: correctly use util_open() - swap device, module Signed-off-by: Emil Velikov <[email protected]> diff --git a/tests/kmstest/Makefile.am b/tests/kmstest/Makefile.am index fd21e61..100662e 100644 --- a/tests/kmstest/Makefile.am +++ b/tests/kmstest/Makefile.am @@ -2,6 +2,7 @@ AM_CFLAGS = \ $(WARN_CFLAGS)\ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)/libkms/ \ + -I$(top_srcdir)/tests/ \ -I$(top_srcdir) if HAVE_INSTALL_TESTS @@ -17,7 +18,8 @@ kmstest_SOURCES = \ kmstest_LDADD = \ $(top_builddir)/libdrm.la \ - $(top_builddir)/libkms/libkms.la + $(top_builddir)/libkms/libkms.la \ + $(top_builddir)/tests/util/libutil.la run: kmstest ./kmstest diff --git a/tests/kmstest/main.c b/tests/kmstest/main.c index 120bc0f..a0e4ebb 100644 --- a/tests/kmstest/main.c +++ b/tests/kmstest/main.c @@ -25,12 +25,14 @@ * **************************************************************************/ - +#include <getopt.h> #include <stdio.h> #include <string.h> #include "xf86drm.h" #include "libkms.h" +#include "util/kms.h" + #define CHECK_RET_RETURN(ret, str) \ if (ret < 0) { \ printf("%s: %s (%s)\n", __func__, str, strerror(-ret)); \ @@ -56,26 +58,37 @@ static int test_bo(struct kms_driver *kms) return 0; } -static const char *drivers[] = { - "i915", - "radeon", - "nouveau", - "vmwgfx", - "exynos", - "amdgpu", - "imx-drm", - "rockchip", - "atmel-hlcdc", - NULL -}; +static void usage(const char *program) +{ + fprintf(stderr, "Usage: %s [options]\n", program); + fprintf(stderr, "\n"); + fprintf(stderr, " -D DEVICE open the given device\n"); + fprintf(stderr, " -M MODULE open the given module\n"); +} int main(int argc, char** argv) { + static const char optstr[] = "D:M:"; struct kms_driver *kms; - int ret, fd, i; + int c, fd, ret; + char *device = NULL; + char *module = NULL; + + while ((c = getopt(argc, argv, optstr)) != -1) { + switch (c) { + case 'D': + device = optarg; + break; + case 'M': + module = optarg; + break; + default: + usage(argv[0]); + return 0; + } + } - for (i = 0, fd = -1; fd < 0 && drivers[i]; i++) - fd = drmOpen(drivers[i], NULL); + fd = util_open(device, module); CHECK_RET_RETURN(fd, "Could not open device"); ret = kms_create(fd, &kms); ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 --