4 Commits

Author SHA1 Message Date
Daniel Vetter
4f6ab180a1 tests/gem_cpu_concurrent_blt: convert to subtest infrastructure
Small changes to avoid expensive setup just to print out the subtest
list, and setting up the source buffers such that "early-read" works
without having run "overwrite-soure" right beforehand.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 12:00:33 +01:00
Daniel Vetter
d9fb72e266 tests: improve concurrent blit tests
By adding another testcase that follows up with a gpu read. This
checks whether the kernel properly tracks the pending write and
doesn't lose it (or sync up to the wrong seqno).

For some odd reason only the cpu mmap variant blows up, the gtt one
works here. I need to look into that some more.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-07-13 10:35:11 +02:00
Chris Wilson
b78243fc61 test/gem_cpu_concurrent_blit: Limit memory usage to half aperture
So that we don't cause needless thrashing on older devices and spoil the
test.
2012-04-10 19:41:43 +01:00
Chris Wilson
da026d8bfe test: Exercise concurrent GPU read/write with CPU domain access
Designed to exercise this patch to i915.ko:

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index fbf1118..57ae1f2 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3181,9 +3181,11 @@ i915_gem_object_set_to_cpu_domain(struct drm_i915_gem_obj
        if (ret)
                return ret;

-       ret = i915_gem_object_wait_rendering(obj);
-       if (ret)
-               return ret;
+       if (write || obj->pending_gpu_write) {
+               ret = i915_gem_object_wait_rendering(obj);
+               if (ret)
+                       return ret;
+       }

        i915_gem_object_flush_gtt_write_domain(obj);

By exercising the conditions whereby should either of the checks be missed
an error is detected.
2012-04-10 19:35:29 +01:00