[Intel-gfx] [PATCH] blit

Chris Wilson chris at chris-wilson.co.uk
Thu Jan 22 05:21:14 PST 2015


---
 tests/gem_concurrent_blit.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/gem_concurrent_blit.c b/tests/gem_concurrent_blit.c
index 48ee48a..8e0a851 100644
--- a/tests/gem_concurrent_blit.c
+++ b/tests/gem_concurrent_blit.c
@@ -90,14 +90,14 @@ prw_set_bo(drm_intel_bo *bo, uint32_t val, int width, int height)
 static void
 prw_cmp_bo(drm_intel_bo *bo, uint32_t val, int width, int height, drm_intel_bo *tmp)
 {
-	int size = width * height, i;
+	int size = width * height, y;
 	uint32_t *vaddr;
 
 	do_or_die(drm_intel_bo_map(tmp, true));
 	do_or_die(drm_intel_bo_get_subdata(bo, 0, 4*size, tmp->virtual));
 	vaddr = tmp->virtual;
-	for (i = 0; i < size; i++)
-		igt_assert_eq_u32(vaddr[i], val);
+	for (y = 0; y < height; y++)
+		igt_assert_eq_u32(vaddr[y*width+y], val);
 	drm_intel_bo_unmap(tmp);
 }
 
@@ -219,13 +219,13 @@ cpu_set_bo(drm_intel_bo *bo, uint32_t val, int width, int height)
 static void
 cpu_cmp_bo(drm_intel_bo *bo, uint32_t val, int width, int height, drm_intel_bo *tmp)
 {
-	int size = width * height;
 	uint32_t *vaddr;
+	int y;
 
 	do_or_die(drm_intel_bo_map(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);
 	drm_intel_bo_unmap(bo);
 }
 
@@ -363,7 +363,7 @@ const struct access_mode {
 
 #define MAX_NUM_BUFFERS 1024
 int num_buffers = MAX_NUM_BUFFERS;
-const int width = 512, height = 512;
+const int width = 1024, height = 256;
 igt_render_copyfunc_t rendercopy;
 
 typedef void (*do_copy)(drm_intel_bo *dst, drm_intel_bo *src);
-- 
2.1.4



More information about the Intel-gfx mailing list