From aaa460951d9d54f27dc2a7d775ed5cf439b9768f Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 2 Oct 2012 21:40:46 +0100 Subject: gem_cpu_reloc: Do another pass explicitly moving to the CPU write domain Signed-off-by: Chris Wilson --- tests/gem_cpu_reloc.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'tests/gem_cpu_reloc.c') diff --git a/tests/gem_cpu_reloc.c b/tests/gem_cpu_reloc.c index a83eea6d..787e5071 100644 --- a/tests/gem_cpu_reloc.c +++ b/tests/gem_cpu_reloc.c @@ -189,7 +189,24 @@ int main(int argc, char **argv) exec(fd, bad); gem_close(fd, bad); - drmtest_progress("gem_cpu_reloc: ", count+i, 2*count); + drmtest_progress("gem_cpu_reloc: ", count+i, 3*count); + } + + /* Third time lucky? */ + for (i = 0; i < count; i++) { + uint32_t bad; + + bad = gem_create(fd, 4096); + gem_write(fd, bad, 0, hang, sizeof(hang)); + + /* launch the newly created batch */ + gem_set_domain(fd, handles[i], + I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); + copy(fd, handles[i], noop, bad); + exec(fd, bad); + gem_close(fd, bad); + + drmtest_progress("gem_cpu_reloc: ", 2*count+i, 3*count); } fprintf(stderr, "Test suceeded, cleanup up - this might take a while.\n"); -- cgit v1.2.3