diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-09-26 07:55:49 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-09-26 07:58:11 +0100 |
commit | 3e766b8255efb6c994e6501be2af44b4bdc4d191 (patch) | |
tree | 70915636c5aeaef5d895779dc0cfbf0718616037 /tests/gem_concurrent_blit.c | |
parent | 3205a9167fca34db8eb177a9050faf1b4115e9fa (diff) |
igt/gem_concurrent_blit: Only read back a few GTT values
Due to the nature of the test, we can be reasonably sure that it is
either all copied or not. So we can sacrificing testing the entire
buffer for the expected value in order to speed up the test by only
testing along the diagonal.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84354
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_concurrent_blit.c')
-rw-r--r-- | tests/gem_concurrent_blit.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/gem_concurrent_blit.c b/tests/gem_concurrent_blit.c index 9f769e5d..7d8d628d 100644 --- a/tests/gem_concurrent_blit.c +++ b/tests/gem_concurrent_blit.c @@ -104,11 +104,10 @@ unmapped_create_bo(drm_intel_bufmgr *bufmgr, int width, int height) static void gtt_set_bo(drm_intel_bo *bo, uint32_t val, int width, int height) { + uint32_t *vaddr = bo->virtual; int size = width * height; - uint32_t *vaddr; drm_intel_gem_bo_start_gtt_access(bo, true); - vaddr = bo->virtual; while (size--) *vaddr++ = val; } @@ -116,13 +115,13 @@ gtt_set_bo(drm_intel_bo *bo, uint32_t val, int width, int height) static void gtt_cmp_bo(drm_intel_bo *bo, uint32_t val, int width, int height, drm_intel_bo *tmp) { - int size = width * height; - uint32_t *vaddr; + uint32_t *vaddr = bo->virtual; + int y; + /* GTT access is slow. So we just compare a few points */ drm_intel_gem_bo_start_gtt_access(bo, false); - vaddr = bo->virtual; - while (size--) - igt_assert_eq_u32(*vaddr++, val); + for (y = 0; y < height; y++) + igt_assert_eq_u32(vaddr[y*width+y], val); } static drm_intel_bo * |