--- drivers/gpu/drm/radeon/radeon_ttm.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) Index: linux-2.6/drivers/gpu/drm/radeon/radeon_ttm.c =================================================================== --- linux-2.6.orig/drivers/gpu/drm/radeon/radeon_ttm.c +++ linux-2.6/drivers/gpu/drm/radeon/radeon_ttm.c @@ -240,6 +240,7 @@ static int radeon_move_blit(struct ttm_b uint64_t old_start, new_start; struct radeon_fence *fence; int r; + ktime_t delta, calltime, rettime; rdev = radeon_get_rdev(bo->bdev); r = radeon_fence_create(rdev, &fence); @@ -275,10 +276,29 @@ static int radeon_move_blit(struct ttm_b DRM_ERROR("Trying to move memory with CP turned off.\n"); return -EINVAL; } + + calltime = ktime_get(); + pr_info("%s: new type: %s, old type: %s\n", __func__, + new_mem->mem_type == TTM_PL_VRAM ? "vram" : "tt", + old_mem->mem_type == TTM_PL_VRAM ? "vram" : "tt"); + r = radeon_copy(rdev, old_start, new_start, new_mem->num_pages, fence); /* FIXME: handle copy error */ + + rettime = ktime_get(); + delta = ktime_sub(rettime, calltime); + pr_info("radeon_copy: result: %d, elapsed %Ld usecs\n", r, + (unsigned long long)ktime_to_ns(delta) >> 10); + calltime = ktime_get(); + r = ttm_bo_move_accel_cleanup(bo, (void *)fence, NULL, evict, no_wait_reserve, no_wait_gpu, new_mem); + + rettime = ktime_get(); + delta = ktime_sub(rettime, calltime); + pr_info("ttm_bo_move_accel_cleanup: result: %d, elapsed %Ld usecs\n", r, + (unsigned long long)ktime_to_ns(delta) >> 10); + radeon_fence_unref(&fence); return r; }