diff options
author | Ilija Hadzic <ihadzic@research.bell-labs.com> | 2012-01-31 09:35:25 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-02-03 04:32:30 -0500 |
commit | 6d75e83ee31c146c8a3d56c762d3e15c483dc40e (patch) | |
tree | 5a2179287c5d2283e6e524fe7802783a803fa585 /drivers/gpu/drm/radeon | |
parent | 86a4d69c0ad62ced87a74bbd43f2acefc66a97b0 (diff) |
drm/radeon/kms: remove benchmarks shorter than one page
copy_blit operation works only on integral number of pages
so benchmarks shorter than one page size (4K) do not make sense
v2: use RADEON_GPU_PAGE_SIZE instead of "magic" 1024 number and
sweep sizes between 1 * <page_size> to 16K * <page_size> doubling
the size in each iteration; we get the same coverage, as
in the original benchmark, but guarantee integer multiples
of page size
v3: add whitespace between '*' operator per review received from
zajec5@gmail.com
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_benchmark.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_benchmark.c b/drivers/gpu/drm/radeon/radeon_benchmark.c index 815f2341ab94..58cee89215c7 100644 --- a/drivers/gpu/drm/radeon/radeon_benchmark.c +++ b/drivers/gpu/drm/radeon/radeon_benchmark.c | |||
@@ -208,22 +208,22 @@ void radeon_benchmark(struct radeon_device *rdev, int test_number) | |||
208 | break; | 208 | break; |
209 | case 3: | 209 | case 3: |
210 | /* GTT to VRAM, buffer size sweep, powers of 2 */ | 210 | /* GTT to VRAM, buffer size sweep, powers of 2 */ |
211 | for (i = 1; i <= 65536; i <<= 1) | 211 | for (i = 1; i <= 16384; i <<= 1) |
212 | radeon_benchmark_move(rdev, i*1024, | 212 | radeon_benchmark_move(rdev, i * RADEON_GPU_PAGE_SIZE, |
213 | RADEON_GEM_DOMAIN_GTT, | 213 | RADEON_GEM_DOMAIN_GTT, |
214 | RADEON_GEM_DOMAIN_VRAM); | 214 | RADEON_GEM_DOMAIN_VRAM); |
215 | break; | 215 | break; |
216 | case 4: | 216 | case 4: |
217 | /* VRAM to GTT, buffer size sweep, powers of 2 */ | 217 | /* VRAM to GTT, buffer size sweep, powers of 2 */ |
218 | for (i = 1; i <= 65536; i <<= 1) | 218 | for (i = 1; i <= 16384; i <<= 1) |
219 | radeon_benchmark_move(rdev, i*1024, | 219 | radeon_benchmark_move(rdev, i * RADEON_GPU_PAGE_SIZE, |
220 | RADEON_GEM_DOMAIN_VRAM, | 220 | RADEON_GEM_DOMAIN_VRAM, |
221 | RADEON_GEM_DOMAIN_GTT); | 221 | RADEON_GEM_DOMAIN_GTT); |
222 | break; | 222 | break; |
223 | case 5: | 223 | case 5: |
224 | /* VRAM to VRAM, buffer size sweep, powers of 2 */ | 224 | /* VRAM to VRAM, buffer size sweep, powers of 2 */ |
225 | for (i = 1; i <= 65536; i <<= 1) | 225 | for (i = 1; i <= 16384; i <<= 1) |
226 | radeon_benchmark_move(rdev, i*1024, | 226 | radeon_benchmark_move(rdev, i * RADEON_GPU_PAGE_SIZE, |
227 | RADEON_GEM_DOMAIN_VRAM, | 227 | RADEON_GEM_DOMAIN_VRAM, |
228 | RADEON_GEM_DOMAIN_VRAM); | 228 | RADEON_GEM_DOMAIN_VRAM); |
229 | break; | 229 | break; |