Commit b22e3ce8 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: optionally print the pin count in gem_info as well

Usefull when debugging page flipping.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent de054900
...@@ -704,6 +704,7 @@ static int amdgpu_debugfs_gem_info(struct seq_file *m, void *data) ...@@ -704,6 +704,7 @@ static int amdgpu_debugfs_gem_info(struct seq_file *m, void *data)
mutex_lock(&adev->gem.mutex); mutex_lock(&adev->gem.mutex);
list_for_each_entry(rbo, &adev->gem.objects, list) { list_for_each_entry(rbo, &adev->gem.objects, list) {
unsigned pin_count;
unsigned domain; unsigned domain;
const char *placement; const char *placement;
...@@ -720,8 +721,13 @@ static int amdgpu_debugfs_gem_info(struct seq_file *m, void *data) ...@@ -720,8 +721,13 @@ static int amdgpu_debugfs_gem_info(struct seq_file *m, void *data)
placement = " CPU"; placement = " CPU";
break; 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); 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++; i++;
} }
mutex_unlock(&adev->gem.mutex); mutex_unlock(&adev->gem.mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment