diff options
author | Christian König <christian.koenig@amd.com> | 2016-06-21 14:28:14 (GMT) |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-07 18:54:49 (GMT) |
commit | dbd5ed60ac856632609491229e6d7ad70115fb09 (patch) | |
tree | 63947ebcb6273c20c88cf5348f790ab46b7615aa /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
parent | 0eaeb070ed6d22e5b42e47210c249283ddf5b08f (diff) | |
download | linux-dbd5ed60ac856632609491229e6d7ad70115fb09.tar.xz |
drm/amdgpu: add eviction counter
Keep track of the number of evictions since boot.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index f85527f..b7742e6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -397,6 +397,11 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, return -EINVAL; adev = amdgpu_get_adev(bo->bdev); + + /* remember the eviction */ + if (evict) + atomic64_inc(&adev->num_evictions); + if (old_mem->mem_type == TTM_PL_SYSTEM && bo->ttm == NULL) { amdgpu_move_null(bo, new_mem); return 0; |