summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-09-03 13:38:30 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-09-03 13:38:30 +0100
commit081887504a72878fc5f54778af68ebd9404b4e04 (patch)
tree94662cb6fcea05c5e0b7e0163d412e3592b1b52c
parent3309f54e8f15d2d82544b00abff2215f50ca27b2 (diff)
downloadintel-gpu-tools-081887504a72878fc5f54778af68ebd9404b4e04.tar.gz
intel-gpu-tools-081887504a72878fc5f54778af68ebd9404b4e04.tar.bz2
intel-gpu-tools-081887504a72878fc5f54778af68ebd9404b4e04.zip
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 <chris@chris-wilson.co.uk>
-rw-r--r--tests/gem_concurrent_blit.c27
1 files 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);
+ }
}
}