From fa8a123855e20068204982596b8fafceb1a67f0b Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 26 Aug 2009 13:13:37 +1000 Subject: drm/mm: add ability to dump mm lists via debugfs This adds code to the drm_mm to talk to debugfs, and adds support to radeon to add the VRAM and GTT mm lists to debugfs. I tested with spinlock debugging and it doesn't give out. Signed-off-by: Dave Airlie --- include/drm/drm_mm.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/drm/drm_mm.h') diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index f8332073d27..bc5a87e8aee 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h @@ -96,4 +96,8 @@ static inline struct drm_mm *drm_get_mm(struct drm_mm_node *block) return block->mm; } +#ifdef CONFIG_DEBUG_FS +int drm_mm_dump_table(struct seq_file *m, struct drm_mm *mm); +#endif + #endif -- cgit v1.2.3 From f1938cd6e900a85de64184e46d841efc9efd3484 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 8 Sep 2009 11:32:08 +1000 Subject: drm: include seq_file.h for debugfs builds. Fixes a warning seen on powerpc. Signed-off-by: Dave Airlie --- include/drm/drm_mm.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/drm/drm_mm.h') diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index bc5a87e8aee..62329f9a42c 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h @@ -37,6 +37,9 @@ * Generic range manager structs */ #include +#ifdef CONFIG_DEBUG_FS +#include +#endif struct drm_mm_node { struct list_head fl_entry; -- cgit v1.2.3