gpu: ion: Refactor debugfs printing
Printing to debugfs is done from a centralized location for
all the heaps managed by ion. This architecture is not
sustainable in the long run since different heaps have different
requirements for what should be printed.
Refactor the debugfs printing for ion so that each heap is
responsible for printing its information.
Change-Id: I1dbe13432a4ab07f27ea4756c3be7fa01ad1df92
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
diff --git a/drivers/gpu/ion/ion_priv.h b/drivers/gpu/ion/ion_priv.h
index 98709b6..78dfe6e 100644
--- a/drivers/gpu/ion/ion_priv.h
+++ b/drivers/gpu/ion/ion_priv.h
@@ -139,8 +139,6 @@
int (*cache_op)(struct ion_heap *heap, struct ion_buffer *buffer,
void *vaddr, unsigned int offset,
unsigned int length, unsigned int cmd);
- unsigned long (*get_allocated)(struct ion_heap *heap);
- unsigned long (*get_total)(struct ion_heap *heap);
int (*map_iommu)(struct ion_buffer *buffer,
struct ion_iommu_map *map_data,
unsigned int domain_num,
@@ -149,10 +147,7 @@
unsigned long iova_length,
unsigned long flags);
void (*unmap_iommu)(struct ion_iommu_map *data);
- unsigned long (*get_umap_cnt)(struct ion_heap *heap);
- unsigned long (*get_kmap_cnt)(struct ion_heap *heap);
- unsigned long (*get_alloc_cnt)(struct ion_heap *heap);
- unsigned long (*get_secured)(struct ion_heap *heap);
+ int (*print_debug)(struct ion_heap *heap, struct seq_file *s);
int (*secure_heap)(struct ion_heap *heap);
int (*unsecure_heap)(struct ion_heap *heap);
};