diff options
author | Sammy He <r62914@freescale.com> | 2011-03-22 18:39:36 +0800 |
---|---|---|
committer | Sammy He <r62914@freescale.com> | 2011-03-22 20:43:12 +0800 |
commit | cae508376e74c7e3aa11f840d0b9f040d2459e95 (patch) | |
tree | 960f580b95ef366bd040a58556d8a1a60382a7c2 /drivers | |
parent | e99165a454c88e633f3f53510a6c4d2aefbc6e47 (diff) |
ENGR00140893-1 VPU: remove VPU IRAM config and add iram info to plat data.
One kernel image is requested, however, we need to enable iram
for performance improvement on mx53, and disable it on mx51 due
to known issue. So use platform data to pass vpu iram disable/enable
flag. And considering requested iram size also can be different per
requirement, iram size is also set in platform data.
Signed-off-by: Sammy He <r62914@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mxc/vpu/Kconfig | 8 | ||||
-rw-r--r-- | drivers/mxc/vpu/mxc_vpu.c | 12 |
2 files changed, 6 insertions, 14 deletions
diff --git a/drivers/mxc/vpu/Kconfig b/drivers/mxc/vpu/Kconfig index 37e55e03d2f2..144a4c20b26f 100644 --- a/drivers/mxc/vpu/Kconfig +++ b/drivers/mxc/vpu/Kconfig @@ -12,14 +12,6 @@ config MXC_VPU The VPU codec device provides codec function for H.264/MPEG4/H.263, as well as MPEG2/VC-1/DivX on some platforms. -config MXC_VPU_IRAM - tristate "Use IRAM as temporary buffer for VPU to enhance performace" - depends on (ARCH_MX37 || ARCH_MX5) - default y - ---help--- - The VPU can use internal RAM as temporary buffer to save external - memroy bandwith, thus to enhance video performance. - config MXC_VPU_DEBUG bool "MXC VPU debugging" depends on MXC_VPU != n diff --git a/drivers/mxc/vpu/mxc_vpu.c b/drivers/mxc/vpu/mxc_vpu.c index 67b9ebbdca42..0c202c0fa806 100644 --- a/drivers/mxc/vpu/mxc_vpu.c +++ b/drivers/mxc/vpu/mxc_vpu.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2010 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2006-2011 Freescale Semiconductor, Inc. All Rights Reserved. */ /* @@ -593,13 +593,13 @@ static int vpu_dev_probe(struct platform_device *pdev) vpu_plat = pdev->dev.platform_data; - if (VPU_IRAM_SIZE) - iram_alloc(VPU_IRAM_SIZE, &addr); + if (vpu_plat && vpu_plat->iram_enable && vpu_plat->iram_size) + iram_alloc(vpu_plat->iram_size, &addr); if (addr == 0) iram.start = iram.end = 0; else { iram.start = addr; - iram.end = addr + VPU_IRAM_SIZE - 1; + iram.end = addr + vpu_plat->iram_size - 1; } if (cpu_is_mx32()) { @@ -682,8 +682,8 @@ static int vpu_dev_remove(struct platform_device *pdev) destroy_workqueue(vpu_data.workqueue); iounmap(vpu_base); - if (VPU_IRAM_SIZE) - iram_free(iram.start, VPU_IRAM_SIZE); + if (vpu_plat && vpu_plat->iram_enable && vpu_plat->iram_size) + iram_free(iram.start, vpu_plat->iram_size); return 0; } |