aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-08-17 21:58:58 +0000
committerAlex Deucher <[email protected]>2016-08-22 17:47:21 +0000
commit83a59b6338c71425f3159fc9ab31380f237af733 (patch)
tree3882a5dc46b74d6dafb88a21437d3496973db11d /drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
parentdrm/amdgpu: recover vram bo from shadow after gpu reset V2 (diff)
downloadkernel-83a59b6338c71425f3159fc9ab31380f237af733.tar.gz
kernel-83a59b6338c71425f3159fc9ab31380f237af733.zip
drm/amdgpu: add AMDGPU_INFO_NUM_EVICTIONS
For profiling. v2: really bump the minor version Signed-off-by: Marek Olšák <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index d942654a1de0..4c8e68a82c47 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -373,6 +373,9 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
case AMDGPU_INFO_NUM_BYTES_MOVED:
ui64 = atomic64_read(&adev->num_bytes_moved);
return copy_to_user(out, &ui64, min(size, 8u)) ? -EFAULT : 0;
+ case AMDGPU_INFO_NUM_EVICTIONS:
+ ui64 = atomic64_read(&adev->num_evictions);
+ return copy_to_user(out, &ui64, min(size, 8u)) ? -EFAULT : 0;
case AMDGPU_INFO_VRAM_USAGE:
ui64 = atomic64_read(&adev->vram_usage);
return copy_to_user(out, &ui64, min(size, 8u)) ? -EFAULT : 0;