From 081887504a72878fc5f54778af68ebd9404b4e04 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 3 Sep 2014 13:38:30 +0100 Subject: igt/gem_concurrent_blit: Move igt_require() out of children Otherwise the test infrastructure throws a fit. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83420 Signed-off-by: Chris Wilson --- tests/gem_concurrent_blit.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/tests/gem_concurrent_blit.c b/tests/gem_concurrent_blit.c index f08689bf..9f769e5d 100644 --- a/tests/gem_concurrent_blit.c +++ b/tests/gem_concurrent_blit.c @@ -319,7 +319,6 @@ static void render_copy_bo(drm_intel_bo *dst, drm_intel_bo *src) drm_intel_bo_get_tiling(dst, &d.tiling, &swizzle); drm_intel_bo_get_tiling(src, &s.tiling, &swizzle); - igt_require(rendercopy); rendercopy(batch, NULL, &s, 0, 0, width, height, @@ -459,6 +458,15 @@ static void run_forked(struct access_mode *mode, num_buffers = old_num_buffers; } +static void bcs_require(void) +{ +} + +static void rcs_require(void) +{ + igt_require(rendercopy); +} + static void run_basic_modes(struct access_mode *mode, drm_intel_bo **src, drm_intel_bo **dst, @@ -468,27 +476,34 @@ run_basic_modes(struct access_mode *mode, struct { const char *prefix; do_copy copy; + void (*require)(void); } pipelines[] = { - { "bcs", blt_copy_bo }, - { "rcs", render_copy_bo }, + { "bcs", blt_copy_bo, bcs_require }, + { "rcs", render_copy_bo, rcs_require }, { NULL, NULL } }, *p; for (p = pipelines; p->prefix; p++) { /* try to overwrite the source values */ - igt_subtest_f("%s-%s-overwrite-source%s", mode->name, p->prefix, suffix) + igt_subtest_f("%s-%s-overwrite-source%s", mode->name, p->prefix, suffix) { + p->require(); run_wrap_func(mode, src, dst, dummy, do_overwrite_source, p->copy); + } /* try to read the results before the copy completes */ - igt_subtest_f("%s-%s-early-read%s", mode->name, p->prefix, suffix) + igt_subtest_f("%s-%s-early-read%s", mode->name, p->prefix, suffix) { + p->require(); run_wrap_func(mode, src, dst, dummy, do_early_read, p->copy); + } /* and finally try to trick the kernel into loosing the pending write */ - igt_subtest_f("%s-%s-gpu-read-after-write%s", mode->name, p->prefix, suffix) + igt_subtest_f("%s-%s-gpu-read-after-write%s", mode->name, p->prefix, suffix) { + p->require(); run_wrap_func(mode, src, dst, dummy, do_gpu_read_after_write, p->copy); + } } } -- cgit v1.2.3