diff options
| author | Samuel Pitoiset <[email protected]> | 2017-02-09 10:33:37 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2017-02-09 16:29:44 +0000 |
| commit | fad061270ac43ff9eed315f0eae7c40b694592de (patch) | |
| tree | 8d3b407141622c4addc4898b9b9c4192d332c30e /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
| parent | drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted() (diff) | |
| download | kernel-fad061270ac43ff9eed315f0eae7c40b694592de.tar.gz kernel-fad061270ac43ff9eed315f0eae7c40b694592de.zip | |
drm/amdgpu: report the number of bytes moved at buffer creation
Like ttm_bo_validate(), ttm_bo_init() might need to move BO and
the number of bytes moved by TTM should be reported. This can help
the throttle buffer migration mechanism to make a better decision.
v2: fix computation
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Samuel Pitoiset <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index cf2e8c4e9b8b..57301f5936fa 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -344,8 +344,7 @@ static u64 amdgpu_cs_get_threshold_for_moves(struct amdgpu_device *adev) * submission. This can result in a debt that can stop buffer migrations * temporarily. */ -static void amdgpu_cs_report_moved_bytes(struct amdgpu_device *adev, - u64 num_bytes) +void amdgpu_cs_report_moved_bytes(struct amdgpu_device *adev, u64 num_bytes) { spin_lock(&adev->mm_stats.lock); adev->mm_stats.accum_us -= bytes_to_us(adev, num_bytes); |
