msm: kgsl: Add function to get the register map information

Add a function that returns the memory descriptor which has information
about the register map of MMU. This is required to change pagetables
and flush tlb in stream for IOMMU

Change-Id: I0f8ed81754b4ea4ba5eaf270fe231a52b2bf4290
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
diff --git a/drivers/gpu/msm/kgsl_mmu.h b/drivers/gpu/msm/kgsl_mmu.h
index 9f812ec..df4a64b 100644
--- a/drivers/gpu/msm/kgsl_mmu.h
+++ b/drivers/gpu/msm/kgsl_mmu.h
@@ -138,6 +138,8 @@
 	int (*mmu_get_pt_lsb)(struct kgsl_mmu *mmu,
 				unsigned int unit_id,
 				enum kgsl_iommu_context_id ctx_id);
+	int (*mmu_get_reg_map_desc)(struct kgsl_mmu *mmu,
+				void **reg_map_desc);
 };
 
 struct kgsl_mmu_pt_ops {
@@ -250,4 +252,13 @@
 		return pt->pt_ops->mmu_pt_get_base_addr(pt);
 }
 
+static inline int kgsl_mmu_get_reg_map_desc(struct kgsl_mmu *mmu,
+						void **reg_map_desc)
+{
+	if (mmu->mmu_ops && mmu->mmu_ops->mmu_get_reg_map_desc)
+		return mmu->mmu_ops->mmu_get_reg_map_desc(mmu, reg_map_desc);
+	else
+		return 0;
+}
+
 #endif /* __KGSL_MMU_H */