summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinyu Chen <xinyu.chen@freescale.com>2012-10-11 15:15:44 +0800
committerXinyu Chen <xinyu.chen@freescale.com>2012-10-11 16:22:20 +0800
commit2a390e96eee149300bb686f07e3323e18605f531 (patch)
tree63dcc8ec7ac424c82f10ab5341dd3da4f7e744ee
parent730e818a6f251bb7a682fa4d48de9b7b98d09aee (diff)
ENGR00227869 mx6q: add GPU reserved memory size kernel parameter
Add gpumem=<size>M kernel parameter for user to specify the size of reserved memory for GPU driver. Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
-rw-r--r--arch/arm/mach-mx6/board-mx6q_arm2.c15
-rw-r--r--arch/arm/mach-mx6/board-mx6q_sabreauto.c15
-rw-r--r--arch/arm/mach-mx6/board-mx6q_sabrelite.c7
-rw-r--r--arch/arm/mach-mx6/board-mx6q_sabresd.c7
4 files changed, 44 insertions, 0 deletions
diff --git a/arch/arm/mach-mx6/board-mx6q_arm2.c b/arch/arm/mach-mx6/board-mx6q_arm2.c
index 3d70274941ff..883ec3e5bbdb 100644
--- a/arch/arm/mach-mx6/board-mx6q_arm2.c
+++ b/arch/arm/mach-mx6/board-mx6q_arm2.c
@@ -1921,6 +1921,21 @@ static struct mxc_dvfs_platform_data arm2_dvfscore_data = {
static void __init mx6_arm2_fixup(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
+ char *str;
+ struct tag *t;
+
+ for_each_tag(t, tags) {
+ if (t->hdr.tag == ATAG_CMDLINE) {
+ /* GPU reserved memory */
+ str = t->u.cmdline.cmdline;
+ str = strstr(str, "gpumem=");
+ if (str != NULL) {
+ str += 7;
+ imx6_gpu_pdata.reserved_mem_size = memparse(str, &str);
+ }
+ break;
+ }
+ }
}
static int __init early_enable_sgtl5000(char *p)
diff --git a/arch/arm/mach-mx6/board-mx6q_sabreauto.c b/arch/arm/mach-mx6/board-mx6q_sabreauto.c
index 61d595cddb79..5175db4350cf 100644
--- a/arch/arm/mach-mx6/board-mx6q_sabreauto.c
+++ b/arch/arm/mach-mx6/board-mx6q_sabreauto.c
@@ -1298,6 +1298,21 @@ static struct mxc_dvfs_platform_data sabreauto_dvfscore_data = {
static void __init fixup_mxc_board(struct machine_desc *desc, struct tag *tags,
char **cmdline, struct meminfo *mi)
{
+ char *str;
+ struct tag *t;
+
+ for_each_tag(t, tags) {
+ if (t->hdr.tag == ATAG_CMDLINE) {
+ /* GPU reserved memory */
+ str = t->u.cmdline.cmdline;
+ str = strstr(str, "gpumem=");
+ if (str != NULL) {
+ str += 7;
+ imx6q_gpu_pdata.reserved_mem_size = memparse(str, &str);
+ }
+ break;
+ }
+ }
}
static int __init early_enable_mipi_sensor(char *p)
diff --git a/arch/arm/mach-mx6/board-mx6q_sabrelite.c b/arch/arm/mach-mx6/board-mx6q_sabrelite.c
index 58d8b6c07b72..66cf55d40499 100644
--- a/arch/arm/mach-mx6/board-mx6q_sabrelite.c
+++ b/arch/arm/mach-mx6/board-mx6q_sabrelite.c
@@ -1134,6 +1134,13 @@ static void __init fixup_mxc_board(struct machine_desc *desc, struct tag *tags,
pdata_fb[i++].res_size[0] = memparse(str, &str);
}
}
+ /* GPU reserved memory */
+ str = t->u.cmdline.cmdline;
+ str = strstr(str, "gpumem=");
+ if (str != NULL) {
+ str += 7;
+ imx6q_gpu_pdata.reserved_mem_size = memparse(str, &str);
+ }
break;
}
}
diff --git a/arch/arm/mach-mx6/board-mx6q_sabresd.c b/arch/arm/mach-mx6/board-mx6q_sabresd.c
index 57cdcd9b14c4..c19cbabe62b2 100644
--- a/arch/arm/mach-mx6/board-mx6q_sabresd.c
+++ b/arch/arm/mach-mx6/board-mx6q_sabresd.c
@@ -1679,6 +1679,13 @@ static void __init fixup_mxc_board(struct machine_desc *desc, struct tag *tags,
pdata_fb[i++].res_size[0] = memparse(str, &str);
}
}
+ /* GPU reserved memory */
+ str = t->u.cmdline.cmdline;
+ str = strstr(str, "gpumem=");
+ if (str != NULL) {
+ str += 7;
+ imx6q_gpu_pdata.reserved_mem_size = memparse(str, &str);
+ }
break;
}
}