gpu: ion: Add more debug info

Add more debug information to ion_debug_heap_show:
-Get number of allocations from heap
-Get number of user space mappings.
-Get number of kernel space mappings.
-Get indicator whether heaps has been secured or not.

Change-Id: I05491b3dd8caccfc3bbe5a9e55642e5e2cd431c4
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
diff --git a/drivers/gpu/ion/ion.c b/drivers/gpu/ion/ion.c
index 00002ff..ae4dfcb 100644
--- a/drivers/gpu/ion/ion.c
+++ b/drivers/gpu/ion/ion.c
@@ -1576,6 +1576,22 @@
 		seq_printf(s, "total heap size: %lx\n",
 			heap->ops->get_total(heap));
 	}
+	if (heap->ops->get_alloc_cnt) {
+		seq_printf(s, "allocation count: %lx\n",
+			heap->ops->get_alloc_cnt(heap));
+	}
+	if (heap->ops->get_umap_cnt) {
+		seq_printf(s, "umapping count: %lx\n",
+			heap->ops->get_umap_cnt(heap));
+	}
+	if (heap->ops->get_kmap_cnt) {
+		seq_printf(s, "kmapping count: %lx\n",
+			heap->ops->get_kmap_cnt(heap));
+	}
+	if (heap->ops->get_secured) {
+		seq_printf(s, "secured heap: %s\n",
+			heap->ops->get_secured(heap) ? "Yes" : "No");
+	}
 	return 0;
 }