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>
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>
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.