aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_sa.c
diff options
context:
space:
mode:
authorChristian König <deathsimple@vodafone.de>2012-05-09 09:34:51 -0400
committerDave Airlie <airlied@redhat.com>2012-05-09 12:22:33 -0400
commit711a9729337466e5ec70c418d33f4bf9fa65c38d (patch)
treea5c3ffd9089ef2668e43f86a0b70bc0e59a61a09 /drivers/gpu/drm/radeon/radeon_sa.c
parenta651c55a0b489a9d5900354d487ebe34d84eec2c (diff)
drm/radeon: add sub allocator debugfs file
Dumping the current allocations. Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_sa.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_sa.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_sa.c b/drivers/gpu/drm/radeon/radeon_sa.c
index aed0a8c68c84..1db056873b4b 100644
--- a/drivers/gpu/drm/radeon/radeon_sa.c
+++ b/drivers/gpu/drm/radeon/radeon_sa.c
@@ -193,3 +193,17 @@ void radeon_sa_bo_free(struct radeon_device *rdev, struct radeon_sa_bo *sa_bo)
193 list_del_init(&sa_bo->list); 193 list_del_init(&sa_bo->list);
194 spin_unlock(&sa_bo->manager->lock); 194 spin_unlock(&sa_bo->manager->lock);
195} 195}
196
197#if defined(CONFIG_DEBUG_FS)
198void radeon_sa_bo_dump_debug_info(struct radeon_sa_manager *sa_manager,
199 struct seq_file *m)
200{
201 struct radeon_sa_bo *i;
202
203 spin_lock(&sa_manager->lock);
204 list_for_each_entry(i, &sa_manager->sa_bo, list) {
205 seq_printf(m, "offset %08d: size %4d\n", i->offset, i->size);
206 }
207 spin_unlock(&sa_manager->lock);
208}
209#endif