diff options
author | Liu Ying <Ying.Liu@freescale.com> | 2012-02-23 13:48:19 +0800 |
---|---|---|
committer | Liu Ying <Ying.Liu@freescale.com> | 2012-02-23 14:38:11 +0800 |
commit | e2207c48a8d77d09014ca57c733aea36b1db37ec (patch) | |
tree | be4111984ec7eb93cc9447f62135e8c2ba57dd82 /arch | |
parent | 697acccd323c38f3d48923528ec0bfda04d8e5a7 (diff) |
ENGR00175222-1 IPUv3 pdev:Check fb size before reserve ov fb
This patch checks overlay fb size before reserve fb mem for
it.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit b29df373e547c83f9b3bcfd9a98016f462fa9ec2)
Diffstat (limited to 'arch')
-rwxr-xr-x | arch/arm/plat-mxc/devices/platform-imx_ipuv3.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm/plat-mxc/devices/platform-imx_ipuv3.c b/arch/arm/plat-mxc/devices/platform-imx_ipuv3.c index 0750265fa3a7..c5b4d9928aaf 100755 --- a/arch/arm/plat-mxc/devices/platform-imx_ipuv3.c +++ b/arch/arm/plat-mxc/devices/platform-imx_ipuv3.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright (C) 2011-2012 Freescale Semiconductor, Inc. All Rights Reserved. */ /* @@ -217,12 +217,18 @@ struct platform_device *__init imx_add_ipuv3_fb( .end = pdata->res_base[0] + pdata->res_size[0] - 1, .flags = IORESOURCE_MEM, }, { - .start = pdata->res_base[1], - .end = pdata->res_base[1] + pdata->res_size[1] - 1, + .start = 0, + .end = 0, .flags = IORESOURCE_MEM, }, }; + if (pdata->res_size[1] > 0) { + res[1].start = pdata->res_base[1]; + res[1].end = pdata->res_base[1] + + pdata->res_size[1] - 1; + } + return imx_add_platform_device_dmamask("mxc_sdc_fb", id, res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32)); |