msm: ion heap support for the mdp driver

heap id is added to mdp driver pdata as driver needs to allocate
the memory from different heap based on the msm target

Change-Id: I60d163b663f56933fc0360cc6fa48edf2d0bb3c7
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-8930-display.c b/arch/arm/mach-msm/board-8930-display.c
index e179e84..afd79f4 100644
--- a/arch/arm/mach-msm/board-8930-display.c
+++ b/arch/arm/mach-msm/board-8930-display.c
@@ -22,6 +22,9 @@
 #include <mach/gpio.h>
 #include <mach/gpiomux.h>
 #include <mach/socinfo.h>
+#include <linux/ion.h>
+#include <mach/ion.h>
+
 #include "devices.h"
 
 /* TODO: Remove this once PM8038 physically becomes
@@ -435,11 +438,23 @@
 	.mdp_bus_scale_table = &mdp_bus_scale_pdata,
 #endif
 	.mdp_rev = MDP_REV_42,
+#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
+	.mem_hid = ION_CP_MM_HEAP_ID,
+#else
+	.mem_hid = MEMTYPE_EBI1,
+#endif
 };
 
 void __init msm8930_mdp_writeback(struct memtype_reserve* reserve_table)
 {
-
+	mdp_pdata.ov0_wb_size = MSM_FB_OVERLAY0_WRITEBACK_SIZE;
+	mdp_pdata.ov1_wb_size = MSM_FB_OVERLAY1_WRITEBACK_SIZE;
+#if defined(CONFIG_ANDROID_PMEM) && !defined(CONFIG_MSM_MULTIMEDIA_USE_ION)
+	reserve_table[mdp_pdata.mem_hid].size +=
+		mdp_pdata.ov0_wb_size;
+	reserve_table[mdp_pdata.mem_hid].size +=
+		mdp_pdata.ov1_wb_size;
+#endif
 }
 
 #define LPM_CHANNEL0 0