ARM: mx27: Add VPU support
Subsystems (3)
PATCH v2 1/2 ARM: mx27: Add VPU support
mx27 has a VPU (Video Processing Unit) block that allows doing H264/MPEG4 decoding and encoding in hardware.
Add support for it in a common SoC file instead of per board file.
---
Javier,
I removed dma_declare_coherent_memory call, as per Sascha's suggestion on my first submission of adding mx27pdk VPU support. Hope this is ok with you.
Changes since v1:
- Call imx27_add_coda() on a common mx27 location instead of per board.
arch/arm/mach-imx/mach-imx27_visstrim_m10.c | 18 ------------------ arch/arm/mach-imx/mm-imx27.c | 3 ++- 2 files changed, 2 insertions(+), 19 deletions(-)
arch/arm/mach-imx/mach-imx27_visstrim_m10.c +0 -18
@@ -434,23 +434,6 @@ static const struct imx_ssi_platform_data visstrim_m10_ssi_pdata __initconst = { .flags = IMX_SSI_DMA | IMX_SSI_SYN, }; -/* coda */ - -static void __init visstrim_coda_init (void ) -{ -struct platform_device *pdev; -int dma; - - pdev =imx27_add_coda (); - dma =dma_declare_coherent_memory (&pdev->dev, - mx2_camera_base +MX2_CAMERA_BUF_SIZE , - mx2_camera_base +MX2_CAMERA_BUF_SIZE , -MX2_CAMERA_BUF_SIZE , -DMA_MEMORY_MAP |DMA_MEMORY_EXCLUSIVE ); -if (!(dma &DMA_MEMORY_MAP )) -return ; -} -/* DMA deinterlace */ static struct platform_device visstrim_deinterlace = { .name ="m2m-deinterlace" ,
@@ -548,7 +531,6 @@ static void __init visstrim_m10_board_init(void)gpio_led_register_device (0 , &visstrim_m10_led_data);visstrim_deinterlace_init ();visstrim_camera_init (); -visstrim_coda_init (); }static void __init visstrim_m10_timer_init (void )
arch/arm/mach-imx/mm-imx27.c +2 -1
@@ -25,9 +25,9 @@#include <asm/mach/map.h> #include "common.h" -#include "devices/devices-common.h" #include "hardware.h" #include "iomux-v1.h" +#include "devices-imx27.h" /* MX27 memory map definition */ static struct map_desc imx27_io_desc[]__initdata = {
@@ -98,4 +98,5 @@ void __init imx27_soc_init(void)/* imx27 has the imx21 type audmux */ platform_device_register_simple ("imx21-audmux" ,0 , imx27_audmux_res,ARRAY_SIZE (imx27_audmux_res)); +imx27_add_coda (); }
Signature · 1 line
1.7.9.5
PATCH v2 2/2 ARM: imx_v4_v5_defconfig: Add VPU support
Let the VPU driver be built by default.
---
Changes since v1:
- Fix the dependencies
arch/arm/configs/imx_v4_v5_defconfig | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/configs/imx_v4_v5_defconfig +3 -0
@@ -121,11 +121,14 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_REGULATOR_MC13783=y CONFIG_REGULATOR_MC13892=y CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_VIDEO_DEV=y CONFIG_V4L_PLATFORM_DRIVERS=y CONFIG_SOC_CAMERA=y CONFIG_SOC_CAMERA_OV2640=y CONFIG_VIDEO_MX2=y +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_CODA=y CONFIG_FB=y CONFIG_FB_IMX=y CONFIG_BACKLIGHT_LCD_SUPPORT=y
Signature · 1 line
1.7.9.5
Sascha Hauer
maintainerPATCH v2 1/2 ARM: mx27: Add VPU support
In reply to Fabio EstevamQuoted 70 lines · Fabio Estevam
mx27 has a VPU (Video Processing Unit) block that allows doing H264/MPEG4 decoding and encoding in hardware.
Add support for it in a common SoC file instead of per board file.
Signed-off-by Fabio Estevam <[email protected]>---
Javier,I removed
dma_declare_coherent_memorycall, as per Sascha's suggestion on my first submission of adding mx27pdk VPU support. Hope this is ok with you.Changes since v1:
- Callimx27_add_coda()on a common mx27 location instead of per board.arch/arm/mach-imx/mach-imx27_visstrim_m10.c | 18 ------------------ arch/arm/mach-imx/mm-imx27.c | 3 ++- 2 files changed, 2 insertions(+), 19 deletions(-)arch/arm/mach-imx/mach-imx27_visstrim_m10.c +0
-18@@ -434,23 +434,6 @@ static const struct imx_ssi_platform_data visstrim_m10_ssi_pdata __initconst = { .flags = IMX_SSI_DMA | IMX_SSI_SYN, }; -/* coda */ - -static void __init visstrim_coda_init (void ) -{ -struct platform_device *pdev; -int dma; - - pdev =imx27_add_coda (); - dma =dma_declare_coherent_memory (&pdev->dev, - mx2_camera_base +MX2_CAMERA_BUF_SIZE , - mx2_camera_base +MX2_CAMERA_BUF_SIZE , -MX2_CAMERA_BUF_SIZE , -DMA_MEMORY_MAP |DMA_MEMORY_EXCLUSIVE ); -if (!(dma &DMA_MEMORY_MAP )) -return ; -} -/* DMA deinterlace */ static struct platform_device visstrim_deinterlace = { .name ="m2m-deinterlace" ,@@ -548,7 +531,6 @@ static void __init visstrim_m10_board_init(void)gpio_led_register_device (0 , &visstrim_m10_led_data);visstrim_deinterlace_init ();visstrim_camera_init (); -visstrim_coda_init (); }static void __init visstrim_m10_timer_init (void )arch/arm/mach-imx/mm-imx27.c +1
-1@@ -25,9 +25,9 @@#include <asm/mach/map.h> #include "common.h" -#include "devices/devices-common.h" #include "hardware.h" #include "iomux-v1.h" +#include "devices-imx27.h" /* MX27 memory map definition */ static struct map_desc imx27_io_desc[]__initdata = {
arch/arm/mach-imx/mm-imx27.c void __init imx27_soc_init(void) · line 101
Quoted 4 lines
arch/arm/mach-imx/mm-imx27.c +1
-0@@ -98,4 +98,5 @@ void __init imx27_soc_init(void)/* imx27 has the imx21 type audmux */ platform_device_register_simple ("imx21-audmux" ,0 , imx27_audmux_res,ARRAY_SIZE (imx27_audmux_res)); +imx27_add_coda ();
As Eric mentioned this may lead to problems on the i.MX27L without VPU. Do you have the possibility to test this?
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Fabio Estevam
reviewerPATCH v2 1/2 ARM: mx27: Add VPU support
Quoted 2 lines · Sascha Hauer
As Eric mentioned this may lead to problems on the i.MX27L without VPU. Do you have the possibility to test this?
I do not have any board with a MX27L variant. Maybe we could try reading the SREV info register to distinguish between MX27 and MX27L. MX27RM does not provide any info on this though.
If this does not work, then maybe we should register VPU as per board like the v1 patch did.
Regards,
Fabio Estevam
Sascha Hauer
maintainerPATCH v2 1/2 ARM: mx27: Add VPU support
Quoted 8 lines · Fabio Estevam
Quoted 2 lines · Sascha Hauer
As Eric mentioned this may lead to problems on the i.MX27L without VPU. Do you have the possibility to test this?
I do not have any board with a MX27L variant. Maybe we could try reading the SREV info register to distinguish between MX27 and MX27L. MX27RM does not provide any info on this though.
If that works I would prefer this, but I also have no i.MX27L to test it. Otherwise doing it like v1 is the best we can do.
You should probably put the changes to Javiers board into a separate patch so that Javier can Ack it indepently of what we are coming up with.
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |