diff options
author | Christian König <christian.koenig@amd.com> | 2016-02-15 11:41:37 (GMT) |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-02-16 22:43:54 (GMT) |
commit | b22e3ce8a63fc950f7e77c3b422d2b4cf469be4d (patch) | |
tree | 6c1a30661f12960937f7e3114e7b9d96ee1fe1b3 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
parent | de0549008ae79bce70808d2955c782b8632e35ed (diff) | |
download | linux-b22e3ce8a63fc950f7e77c3b422d2b4cf469be4d.tar.xz |
drm/amdgpu: optionally print the pin count in gem_info as well
Usefull when debugging page flipping.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index e6fb7de..d7f1e49 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); |