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-8960-display.c b/arch/arm/mach-msm/board-8960-display.c
index 77040d9..69519f0 100644
--- a/arch/arm/mach-msm/board-8960-display.c
+++ b/arch/arm/mach-msm/board-8960-display.c
@@ -21,6 +21,9 @@
#include <mach/board.h>
#include <mach/gpio.h>
#include <mach/gpiomux.h>
+#include <linux/ion.h>
+#include <mach/ion.h>
+
#include "devices.h"
#include "board-8960.h"
@@ -550,11 +553,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 msm8960_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
}
static struct platform_device mipi_dsi_renesas_panel_device = {