drm/ttm: add number of bytes moved to the operation context

Add some statistics how many bytes we have moved.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Christian König 2017-04-27 18:19:46 +02:00 committed by Alex Deucher
parent 2823f4f019
commit 6cd2e71e89
2 changed files with 2 additions and 0 deletions

View File

@ -361,6 +361,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
else
bo->offset = 0;
ctx->bytes_moved += bo->num_pages << PAGE_SHIFT;
return 0;
out_err:

View File

@ -270,6 +270,7 @@ struct ttm_bo_kmap_obj {
struct ttm_operation_ctx {
bool interruptible;
bool no_wait_gpu;
uint64_t bytes_moved;
};
/**