diff options
author | Javier Martin <javier.martin@vista-silicon.com> | 2012-07-26 04:57:30 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-08-06 08:08:00 -0400 |
commit | 062a15cf24f838749f8f40a8ca6fd33af84052db (patch) | |
tree | a46ba0128dcff6b08964667bd5002965b600059c /arch | |
parent | 84b3bd462393133e5ba6949c32a26f46b5e9f93d (diff) |
[media] i.MX27: Visstrim_M10: Add support for deinterlacing driver
Visstrim_M10 have a tvp5150 whose video output must be deinterlaced.
The new mem2mem deinterlacing driver is very useful for that purpose.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-imx/mach-imx27_visstrim_m10.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index 3194362aa782..821d6aac411c 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
@@ -233,7 +233,7 @@ static void __init visstrim_camera_init(void) | |||
233 | static void __init visstrim_reserve(void) | 233 | static void __init visstrim_reserve(void) |
234 | { | 234 | { |
235 | /* reserve 4 MiB for mx2-camera */ | 235 | /* reserve 4 MiB for mx2-camera */ |
236 | mx2_camera_base = arm_memblock_steal(2 * MX2_CAMERA_BUF_SIZE, | 236 | mx2_camera_base = arm_memblock_steal(3 * MX2_CAMERA_BUF_SIZE, |
237 | MX2_CAMERA_BUF_SIZE); | 237 | MX2_CAMERA_BUF_SIZE); |
238 | } | 238 | } |
239 | 239 | ||
@@ -420,6 +420,30 @@ static void __init visstrim_coda_init(void) | |||
420 | return; | 420 | return; |
421 | } | 421 | } |
422 | 422 | ||
423 | /* DMA deinterlace */ | ||
424 | static struct platform_device visstrim_deinterlace = { | ||
425 | .name = "m2m-deinterlace", | ||
426 | .id = 0, | ||
427 | }; | ||
428 | |||
429 | static void __init visstrim_deinterlace_init(void) | ||
430 | { | ||
431 | int ret = -ENOMEM; | ||
432 | struct platform_device *pdev = &visstrim_deinterlace; | ||
433 | int dma; | ||
434 | |||
435 | ret = platform_device_register(pdev); | ||
436 | |||
437 | dma = dma_declare_coherent_memory(&pdev->dev, | ||
438 | mx2_camera_base + 2 * MX2_CAMERA_BUF_SIZE, | ||
439 | mx2_camera_base + 2 * MX2_CAMERA_BUF_SIZE, | ||
440 | MX2_CAMERA_BUF_SIZE, | ||
441 | DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE); | ||
442 | if (!(dma & DMA_MEMORY_MAP)) | ||
443 | return; | ||
444 | } | ||
445 | |||
446 | |||
423 | static void __init visstrim_m10_revision(void) | 447 | static void __init visstrim_m10_revision(void) |
424 | { | 448 | { |
425 | int exp_version = 0; | 449 | int exp_version = 0; |
@@ -482,6 +506,7 @@ static void __init visstrim_m10_board_init(void) | |||
482 | platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0, | 506 | platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0, |
483 | &iclink_tvp5150, sizeof(iclink_tvp5150)); | 507 | &iclink_tvp5150, sizeof(iclink_tvp5150)); |
484 | gpio_led_register_device(0, &visstrim_m10_led_data); | 508 | gpio_led_register_device(0, &visstrim_m10_led_data); |
509 | visstrim_deinterlace_init(); | ||
485 | visstrim_camera_init(); | 510 | visstrim_camera_init(); |
486 | visstrim_coda_init(); | 511 | visstrim_coda_init(); |
487 | } | 512 | } |