From: Christian König Date: Mon, 15 Feb 2016 11:41:37 +0000 (+0100) Subject: drm/amdgpu: optionally print the pin count in gem_info as well X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b22e3ce8a63fc950f7e77c3b422d2b4cf469be4d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/amdgpu: optionally print the pin count in gem_info as well Usefull when debugging page flipping. Signed-off-by: Christian König Reviewed-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index e6fb7ded5a66..d7f1e49ab6ce 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -704,6 +704,7 @@ static int amdgpu_debugfs_gem_info(struct seq_file *m, void *data) mutex_lock(&adev->gem.mutex); list_for_each_entry(rbo, &adev->gem.objects, list) { + unsigned pin_count; unsigned domain; const char *placement; @@ -720,8 +721,13 @@ static int amdgpu_debugfs_gem_info(struct seq_file *m, void *data) placement = " CPU"; break; } - seq_printf(m, "bo[0x%08x] %12ld %s pid %8d\n", + seq_printf(m, "bo[0x%08x] %12ld %s pid %8d", i, amdgpu_bo_size(rbo), placement, rbo->pid); + + pin_count = ACCESS_ONCE(rbo->pin_count); + if (pin_count) + seq_printf(m, " pin count %d", pin_count); + seq_printf(m, "\n"); i++; } mutex_unlock(&adev->gem.mutex);