aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/radeon/radeon_ttm.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 43c5ab34b634..fc787e8fa730 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -33,6 +33,7 @@
33#include <ttm/ttm_bo_driver.h> 33#include <ttm/ttm_bo_driver.h>
34#include <ttm/ttm_placement.h> 34#include <ttm/ttm_placement.h>
35#include <ttm/ttm_module.h> 35#include <ttm/ttm_module.h>
36#include <ttm/ttm_page_alloc.h>
36#include <drm/drmP.h> 37#include <drm/drmP.h>
37#include <drm/radeon_drm.h> 38#include <drm/radeon_drm.h>
38#include <linux/seq_file.h> 39#include <linux/seq_file.h>
@@ -744,8 +745,8 @@ static int radeon_mm_dump_table(struct seq_file *m, void *data)
744static int radeon_ttm_debugfs_init(struct radeon_device *rdev) 745static int radeon_ttm_debugfs_init(struct radeon_device *rdev)
745{ 746{
746#if defined(CONFIG_DEBUG_FS) 747#if defined(CONFIG_DEBUG_FS)
747 static struct drm_info_list radeon_mem_types_list[RADEON_DEBUGFS_MEM_TYPES]; 748 static struct drm_info_list radeon_mem_types_list[RADEON_DEBUGFS_MEM_TYPES+1];
748 static char radeon_mem_types_names[RADEON_DEBUGFS_MEM_TYPES][32]; 749 static char radeon_mem_types_names[RADEON_DEBUGFS_MEM_TYPES+1][32];
749 unsigned i; 750 unsigned i;
750 751
751 for (i = 0; i < RADEON_DEBUGFS_MEM_TYPES; i++) { 752 for (i = 0; i < RADEON_DEBUGFS_MEM_TYPES; i++) {
@@ -762,7 +763,13 @@ static int radeon_ttm_debugfs_init(struct radeon_device *rdev)
762 radeon_mem_types_list[i].data = &rdev->mman.bdev.man[TTM_PL_TT].manager; 763 radeon_mem_types_list[i].data = &rdev->mman.bdev.man[TTM_PL_TT].manager;
763 764
764 } 765 }
765 return radeon_debugfs_add_files(rdev, radeon_mem_types_list, RADEON_DEBUGFS_MEM_TYPES); 766 /* Add ttm page pool to debugfs */
767 sprintf(radeon_mem_types_names[i], "ttm_page_pool");
768 radeon_mem_types_list[i].name = radeon_mem_types_names[i];
769 radeon_mem_types_list[i].show = &ttm_page_alloc_debugfs;
770 radeon_mem_types_list[i].driver_features = 0;
771 radeon_mem_types_list[i].data = NULL;
772 return radeon_debugfs_add_files(rdev, radeon_mem_types_list, RADEON_DEBUGFS_MEM_TYPES+1);
766 773
767#endif 774#endif
768 return 0; 775 return 0;