[PATCH RFC 066/111] staging: etnaviv: dump mmu allocations
Lucas Stach
l.stach at pengutronix.de
Thu Apr 2 08:30:08 PDT 2015
From: Russell King <rmk+kernel at arm.linux.org.uk>
Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
---
drivers/staging/etnaviv/etnaviv_drv.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/staging/etnaviv/etnaviv_drv.c b/drivers/staging/etnaviv/etnaviv_drv.c
index 568615154845..77e05b80f18d 100644
--- a/drivers/staging/etnaviv/etnaviv_drv.c
+++ b/drivers/staging/etnaviv/etnaviv_drv.c
@@ -20,6 +20,7 @@
#include "etnaviv_drv.h"
#include "etnaviv_gpu.h"
+#include "etnaviv_mmu.h"
void etnaviv_register_mmu(struct drm_device *dev, struct etnaviv_iommu *mmu)
{
@@ -239,6 +240,23 @@ static int etnaviv_mm_show(struct drm_device *dev, struct seq_file *m)
return drm_mm_dump_table(m, &dev->vma_offset_manager->vm_addr_space_mm);
}
+static int etnaviv_mmu_show(struct drm_device *dev, struct seq_file *m)
+{
+ struct etnaviv_drm_private *priv = dev->dev_private;
+ struct etnaviv_gpu *gpu;
+ unsigned int i;
+
+ for (i = 0; i < ETNA_MAX_PIPES; i++) {
+ gpu = priv->gpu[i];
+ if (gpu) {
+ seq_printf(m, "Active Objects (%s):\n",
+ dev_name(gpu->dev));
+ drm_mm_dump_table(m, &gpu->mmu->mm);
+ }
+ }
+ return 0;
+}
+
static int show_locked(struct seq_file *m, void *arg)
{
struct drm_info_node *node = (struct drm_info_node *) m->private;
@@ -262,6 +280,7 @@ static struct drm_info_list ETNAVIV_debugfs_list[] = {
{"gpu", show_locked, 0, etnaviv_gpu_show},
{"gem", show_locked, 0, etnaviv_gem_show},
{ "mm", show_locked, 0, etnaviv_mm_show },
+ {"mmu", show_locked, 0, etnaviv_mmu_show},
};
static int etnaviv_debugfs_init(struct drm_minor *minor)
--
2.1.4
More information about the dri-devel
mailing list