From 65fec5e5836cb347e99d22320ec3ff776ddf2a1f Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 19 May 2015 14:51:43 +0100 Subject: igt/gem_streaming_writes: Add more validation steps Inalcude a pre-pass to check that the non-streaming, partial writes work. Signed-off-by: Chris Wilson --- tests/gem_streaming_writes.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'tests/gem_streaming_writes.c') diff --git a/tests/gem_streaming_writes.c b/tests/gem_streaming_writes.c index d1a1b42f..63a32dc0 100644 --- a/tests/gem_streaming_writes.c +++ b/tests/gem_streaming_writes.c @@ -60,7 +60,7 @@ static bool __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *eb) return drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, eb) == 0; } -static void test_streaming(int fd, int mode) +static void test_streaming(int fd, int mode, int sync) { const int has_64bit_reloc = intel_gen(intel_get_drm_devid(fd)) >= 8; struct drm_i915_gem_execbuffer2 execbuf; @@ -192,6 +192,8 @@ static void test_streaming(int fd, int mode) int b; if (pass) { + if (sync) + gem_set_domain(fd, src, domain, domain); for (i = 0; i < CHUNK_SIZE/4; i++) s[offset/4 + i] = (OBJECT_SIZE*pass + offset)/4 + i; } @@ -227,17 +229,19 @@ static void test_streaming(int fd, int mode) igt_main { - int fd; + int fd, sync; igt_fixture fd = drm_open_any(); - igt_subtest("cpu") - test_streaming(fd, 0); - igt_subtest("gtt") - test_streaming(fd, 1); - igt_subtest("wc") - test_streaming(fd, 2); + for (sync = 2; sync--; ) { + igt_subtest_f("cpu%s", sync ? "-sync":"") + test_streaming(fd, 0, sync); + igt_subtest_f("gtt%s", sync ? "-sync":"") + test_streaming(fd, 1, sync); + igt_subtest_f("wc%s", sync ? "-sync":"") + test_streaming(fd, 2, sync); + } igt_fixture close(fd); -- cgit v1.2.3