12 Commits

Author SHA1 Message Date
Chris Wilson
9f2621e1b5 igt/gem_exec_flush: Test continuously rewriting the batch
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-03 09:27:22 +01:00
Chris Wilson
d9025d3298 igt/gem_exec_flush: Match gem_set_domain to pointer access
When using the kernel set-domain cache management, we need to set the
domain as appropriate for our pointer access. In this case we access the
buffer through a CPU mmap, and so we must request access via the CPU
domain.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-02 18:57:03 +01:00
Chris Wilson
22e6157d38 igt/gem_exec_flush: Immediately repeat the same cacheline
When looking at a pair of GPU writes, where we want to make sure that
the clean cacheline is invalidated automatically, we want to reuse that
cacheline whilst we know it remains valid (i.e. repeat the test using a
new value to the same location).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-02 16:10:18 +01:00
Chris Wilson
6862b33d50 igt/gem_exec_flush: Move assertions out of interruptible loops
Since the value in the bo may be altered by the test, we only want to
repeat phases of the test to avoid breaking the test itself.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-02 14:58:00 +01:00
Chris Wilson
7c70d2fca2 igt/gem_exec_flush: Mark mmap-wc dependency
Add a requirement for mmap-wc so that failure on older kernels is explained.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-02 13:23:33 +01:00
Chris Wilson
691b76a84b igt/gem_exec_flush: Use a cacheline stride
Look at different cachelines on each pass, otherwise each group of 16
flush the same cachline.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-02 09:21:50 +01:00
Chris Wilson
805a05caae igt/gem_exec_flush: Add interruptible testing
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-02 09:21:50 +01:00
Chris Wilson
16c9edb464 igt/gem_exec_flush: Add basic set-domain checks
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-02 09:21:50 +01:00
Chris Wilson
f3532cab97 igt/gem_exec_flush: For good measure, check pread/pwrite
As a point of comparison, test the pread/pwrite interface as well.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-01 21:46:28 +01:00
Chris Wilson
89f354e0a5 igt/gem_exec_flush: Use subtest groups to tidy requirement checking
We can make the requirement testing and reporting tidier by using
igt_subtest_group.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-01 15:58:24 +01:00
Chris Wilson
a0d6645d45 igt/gem_exec_flush: Add a read-only variation
Alternate between two values written by the GPU so that we can look for
stale cachelines without having to overwrite the value with the CPU.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-01 15:16:18 +01:00
Chris Wilson
ef3f61a6d3 tests: Add gem_exec_flush
A basic check that the execbuf flushes writes from the batch and that
they are coherent afterwards.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-29 21:05:58 +01:00