Commit 6cd2e71e authored by Christian König's avatar Christian König Committed by Alex Deucher

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

Add some statistics how many bytes we have moved.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Reviewed-by: default avatarChunming Zhou <david1.zhou@amd.com>
Tested-by: default avatarDieter Nützel <Dieter@nuetzel-hh.de>
Tested-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Acked-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2823f4f0
...@@ -361,6 +361,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo, ...@@ -361,6 +361,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
else else
bo->offset = 0; bo->offset = 0;
ctx->bytes_moved += bo->num_pages << PAGE_SHIFT;
return 0; return 0;
out_err: out_err:
......
...@@ -270,6 +270,7 @@ struct ttm_bo_kmap_obj { ...@@ -270,6 +270,7 @@ struct ttm_bo_kmap_obj {
struct ttm_operation_ctx { struct ttm_operation_ctx {
bool interruptible; bool interruptible;
bool no_wait_gpu; bool no_wait_gpu;
uint64_t bytes_moved;
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment