path: root/drivers/gpu/drm/radeon/radeon_device.c
diff options
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_device.c
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_device.c')
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 237b7a7549e6..a8f608903989 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1178,6 +1178,11 @@ int radeon_device_init(struct radeon_device *rdev,
if (r)
DRM_ERROR("ib ring test failed (%d).\n", r);
+ r = radeon_gem_debugfs_init(rdev);
+ if (r) {
+ DRM_ERROR("registering gem debugfs failed (%d).\n", r);
+ }
if (rdev->flags & RADEON_IS_AGP && !rdev->accel_working) {
/* Acceleration not working on AGP card try again
* with fallback to PCI or PCIE GART