summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-10-02 21:40:46 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-10-02 21:40:46 +0100
commitaaa460951d9d54f27dc2a7d775ed5cf439b9768f (patch)
tree0666de95a2f8d0d5fcc4d0fe98eb13a7c31668cc /tests
parent99a0824669374144d2c644c3a5d9bb7cf65ef716 (diff)
gem_cpu_reloc: Do another pass explicitly moving to the CPU write domain
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_cpu_reloc.c19
1 files changed, 18 insertions, 1 deletions
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");