aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon.h
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2013-04-25 22:29:27 -0400
committerAlex Deucher <alexander.deucher@amd.com>2013-05-02 10:09:47 -0400
commit409851f48939dffdd9f19a43830f54eac2c19a53 (patch)
tree6ec5a11ba6d6cec8959716a6aba99a392fe222e1 /drivers/gpu/drm/radeon/radeon.h
parent62d1f92e06aef9665d71ca7e986b3047ecf0b3c7 (diff)
radeon: add bo tracking debugfs
This is to allow debugging of userspace program not freeing buffer after, which is basicly a memory leak. This print the list of all gem object along with their size and placement (VRAM,GTT,CPU) and with the pid of the task that created them. agd5f: add warning fix Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon.h')
-rw-r--r--drivers/gpu/drm/radeon/radeon.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index d6c8cbaa8693..3ef7543a2986 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -358,7 +358,8 @@ struct radeon_bo {
358 struct radeon_device *rdev; 358 struct radeon_device *rdev;
359 struct drm_gem_object gem_base; 359 struct drm_gem_object gem_base;
360 360
361 struct ttm_bo_kmap_obj dma_buf_vmap; 361 struct ttm_bo_kmap_obj dma_buf_vmap;
362 pid_t pid;
362}; 363};
363#define gem_to_radeon_bo(gobj) container_of((gobj), struct radeon_bo, gem_base) 364#define gem_to_radeon_bo(gobj) container_of((gobj), struct radeon_bo, gem_base)
364 365
@@ -372,6 +373,8 @@ struct radeon_bo_list {
372 u32 tiling_flags; 373 u32 tiling_flags;
373}; 374};
374 375
376int radeon_gem_debugfs_init(struct radeon_device *rdev);
377
375/* sub-allocation manager, it has to be protected by another lock. 378/* sub-allocation manager, it has to be protected by another lock.
376 * By conception this is an helper for other part of the driver 379 * By conception this is an helper for other part of the driver
377 * like the indirect buffer or semaphore, which both have their 380 * like the indirect buffer or semaphore, which both have their