diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | lib/drmtest.h | 2 | ||||
-rw-r--r-- | overlay/Makefile.am | 2 | ||||
-rw-r--r-- | overlay/debugfs.c | 21 | ||||
-rw-r--r-- | overlay/debugfs.h | 1 | ||||
-rw-r--r-- | overlay/overlay.c | 2 | ||||
-rw-r--r-- | tests/gem_ctx_bad_exec.c | 2 | ||||
-rw-r--r-- | tests/gem_dummy_reloc_loop.c | 2 |
8 files changed, 33 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 1c8e84bc..029887b2 100644 --- a/configure.ac +++ b/configure.ac @@ -70,7 +70,7 @@ if test "x$GCC" = "xyes"; then fi AC_SUBST(ASSEMBLER_WARN_CFLAGS) -PKG_CHECK_MODULES(DRM, [libdrm_intel >= 2.4.45 libdrm]) +PKG_CHECK_MODULES(DRM, [libdrm_intel >= 2.4.40 libdrm]) PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10]) PKG_CHECK_MODULES(OVERLAY_XVLIB, [xv x11 xext], enable_overlay_xvlib=yes, enable_overlay_xvlib=no) PKG_CHECK_MODULES(OVERLAY_XLIB, [cairo-xlib], enable_overlay_xlib=yes, enable_overlay_xlib=no) diff --git a/lib/drmtest.h b/lib/drmtest.h index 485d30ef..1cada0cb 100644 --- a/lib/drmtest.h +++ b/lib/drmtest.h @@ -210,9 +210,11 @@ static inline void gem_require_ring(int fd, int ring_id) case I915_EXEC_BSD: igt_require(HAS_BSD_RING(intel_get_drm_devid(fd))); return; +#ifdef I915_EXEC_VEBOX case I915_EXEC_VEBOX: igt_require(gem_has_vebox(fd)); return; +#endif default: assert(0); return; diff --git a/overlay/Makefile.am b/overlay/Makefile.am index 09f273c0..00a1ef5f 100644 --- a/overlay/Makefile.am +++ b/overlay/Makefile.am @@ -14,6 +14,8 @@ intel_gpu_overlay_SOURCES = \ chart.c \ cpu-top.h \ cpu-top.c \ + debugfs.h \ + debugfs.c \ gem-objects.h \ gem-objects.c \ gpu-top.h \ diff --git a/overlay/debugfs.c b/overlay/debugfs.c new file mode 100644 index 00000000..969ec368 --- /dev/null +++ b/overlay/debugfs.c @@ -0,0 +1,21 @@ +#include <sys/stat.h> +#include <sys/mount.h> +#include <errno.h> + +#include "debugfs.h" + +int debugfs_init(void) +{ + struct stat st; + + if (stat("/sys/kernel/debug/dri", &st) == 0) + return 0; + + if (stat("/sys/kernel/debug", &st)) + return errno; + + if (mount("debug", "/sys/kernel/debug", "debugfs", 0, 0)) + return errno; + + return 0; +} diff --git a/overlay/debugfs.h b/overlay/debugfs.h new file mode 100644 index 00000000..52577eff --- /dev/null +++ b/overlay/debugfs.h @@ -0,0 +1 @@ +int debugfs_init(void); diff --git a/overlay/overlay.c b/overlay/overlay.c index 6fb2bc26..98ee3d87 100644 --- a/overlay/overlay.c +++ b/overlay/overlay.c @@ -517,6 +517,8 @@ int main(int argc, char **argv) if (ctx.surface == NULL) return ENOMEM; + debugfs_init(); + init_gpu_top(&ctx, &ctx.gpu_top); init_gpu_perf(&ctx, &ctx.gpu_perf); init_gpu_freq(&ctx, &ctx.gpu_freq); diff --git a/tests/gem_ctx_bad_exec.c b/tests/gem_ctx_bad_exec.c index 348b2f8f..68b74af2 100644 --- a/tests/gem_ctx_bad_exec.c +++ b/tests/gem_ctx_bad_exec.c @@ -106,8 +106,10 @@ int main(int argc, char *argv[]) igt_assert(exec(fd, handle, I915_EXEC_BSD, ctx_id) != 0); igt_subtest("blt") igt_assert(exec(fd, handle, I915_EXEC_BLT, ctx_id) != 0); +#ifdef I915_EXEC_VEBOX igt_subtest("vebox") igt_assert(exec(fd, handle, I915_EXEC_VEBOX, ctx_id) != 0); +#endif igt_exit(); } diff --git a/tests/gem_dummy_reloc_loop.c b/tests/gem_dummy_reloc_loop.c index 651703bf..73eab895 100644 --- a/tests/gem_dummy_reloc_loop.c +++ b/tests/gem_dummy_reloc_loop.c @@ -173,6 +173,7 @@ int main(int argc, char **argv) printf("dummy loop run on blt completed\n"); } +#ifdef I915_EXEC_VEBOX igt_subtest("vebox") { gem_require_ring(fd, I915_EXEC_VEBOX); sleep(2); @@ -180,6 +181,7 @@ int main(int argc, char **argv) dummy_reloc_loop(LOCAL_I915_EXEC_VEBOX); printf("dummy loop run on vebox completed\n"); } +#endif igt_subtest("mixed") { if (num_rings > 1) { |