lib: switch intel_copy_bo to directly take a size

Instead of a width/height combination. Since I've been lazy with the
math this now only accepts page-aligned copy operations, but that's
all we need really.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2014-03-13 03:35:02 +01:00
parent 32d41cc7a7
commit eaccd444f7
9 changed files with 37 additions and 40 deletions
+5 -5
View File
@@ -81,7 +81,7 @@ create_bo(uint32_t start_val)
linear[i] = start_val++;
drm_intel_bo_unmap(linear_bo);
intel_copy_bo (batch, bo, linear_bo, width, height);
intel_copy_bo (batch, bo, linear_bo, width*height*4);
drm_intel_bo_unreference(linear_bo);
@@ -97,7 +97,7 @@ check_bo(drm_intel_bo *bo, uint32_t start_val)
linear_bo = drm_intel_bo_alloc(bufmgr, "linear dst", 1024 * 1024, 4096);
intel_copy_bo(batch, linear_bo, bo, width, height);
intel_copy_bo(batch, linear_bo, bo, width*height*4);
do_or_die(drm_intel_bo_map(linear_bo, 0));
linear = linear_bo->virtual;
@@ -143,7 +143,7 @@ static void run_test(int count)
if (src == dst)
continue;
intel_copy_bo(batch, bo[dst], bo[src], width, height);
intel_copy_bo(batch, bo[dst], bo[src], width*height*4);
bo_start_val[dst] = bo_start_val[src];
}
for (i = 0; i < count; i++)
@@ -165,7 +165,7 @@ static void run_test(int count)
if (src == dst)
continue;
intel_copy_bo(batch, bo[dst], bo[src], width, height);
intel_copy_bo(batch, bo[dst], bo[src], width*height*4);
bo_start_val[dst] = bo_start_val[src];
}
for (i = 0; i < count; i++)
@@ -179,7 +179,7 @@ static void run_test(int count)
if (src == dst)
continue;
intel_copy_bo(batch, bo[dst], bo[src], width, height);
intel_copy_bo(batch, bo[dst], bo[src], width*height*4);
bo_start_val[dst] = bo_start_val[src];
}
for (i = 0; i < count; i++) {