diff options
author | Christian König <deathsimple@vodafone.de> | 2012-05-09 15:34:51 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-05-09 17:22:33 +0100 |
commit | 711a9729337466e5ec70c418d33f4bf9fa65c38d (patch) | |
tree | a5c3ffd9089ef2668e43f86a0b70bc0e59a61a09 /drivers/gpu/drm/radeon/radeon_sa.c | |
parent | a651c55a0b489a9d5900354d487ebe34d84eec2c (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.c | 14 |
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) list_del_init(&sa_bo->list); spin_unlock(&sa_bo->manager->lock); } + +#if defined(CONFIG_DEBUG_FS) +void radeon_sa_bo_dump_debug_info(struct radeon_sa_manager *sa_manager, + struct seq_file *m) +{ + struct radeon_sa_bo *i; + + spin_lock(&sa_manager->lock); + list_for_each_entry(i, &sa_manager->sa_bo, list) { + seq_printf(m, "offset %08d: size %4d\n", i->offset, i->size); + } + spin_unlock(&sa_manager->lock); +} +#endif |