diff options
| author | Christian König <[email protected]> | 2016-06-21 14:28:14 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2016-07-07 18:54:49 +0000 |
| commit | dbd5ed60ac856632609491229e6d7ad70115fb09 (patch) | |
| tree | 63947ebcb6273c20c88cf5348f790ab46b7615aa /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
| parent | drm/amdgpu: add amdgpu_irq_gpu_reset_resume_helper (diff) | |
| download | kernel-dbd5ed60ac856632609491229e6d7ad70115fb09.tar.gz kernel-dbd5ed60ac856632609491229e6d7ad70115fb09.zip | |
drm/amdgpu: add eviction counter
Keep track of the number of evictions since boot.
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
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 f85527fbbac5..b7742e62972a 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; |
