Commit 062a15cf authored by Javier Martin's avatar Javier Martin Committed by Mauro Carvalho Chehab

[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: default avatarJavier Martin <javier.martin@vista-silicon.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 84b3bd46
...@@ -233,7 +233,7 @@ static void __init visstrim_camera_init(void) ...@@ -233,7 +233,7 @@ static void __init visstrim_camera_init(void)
static void __init visstrim_reserve(void) static void __init visstrim_reserve(void)
{ {
/* reserve 4 MiB for mx2-camera */ /* reserve 4 MiB for mx2-camera */
mx2_camera_base = arm_memblock_steal(2 * MX2_CAMERA_BUF_SIZE, mx2_camera_base = arm_memblock_steal(3 * MX2_CAMERA_BUF_SIZE,
MX2_CAMERA_BUF_SIZE); MX2_CAMERA_BUF_SIZE);
} }
...@@ -420,6 +420,30 @@ static void __init visstrim_coda_init(void) ...@@ -420,6 +420,30 @@ static void __init visstrim_coda_init(void)
return; return;
} }
/* DMA deinterlace */
static struct platform_device visstrim_deinterlace = {
.name = "m2m-deinterlace",
.id = 0,
};
static void __init visstrim_deinterlace_init(void)
{
int ret = -ENOMEM;
struct platform_device *pdev = &visstrim_deinterlace;
int dma;
ret = platform_device_register(pdev);
dma = dma_declare_coherent_memory(&pdev->dev,
mx2_camera_base + 2 * MX2_CAMERA_BUF_SIZE,
mx2_camera_base + 2 * MX2_CAMERA_BUF_SIZE,
MX2_CAMERA_BUF_SIZE,
DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
if (!(dma & DMA_MEMORY_MAP))
return;
}
static void __init visstrim_m10_revision(void) static void __init visstrim_m10_revision(void)
{ {
int exp_version = 0; int exp_version = 0;
...@@ -482,6 +506,7 @@ static void __init visstrim_m10_board_init(void) ...@@ -482,6 +506,7 @@ static void __init visstrim_m10_board_init(void)
platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0, platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0,
&iclink_tvp5150, sizeof(iclink_tvp5150)); &iclink_tvp5150, sizeof(iclink_tvp5150));
gpio_led_register_device(0, &visstrim_m10_led_data); gpio_led_register_device(0, &visstrim_m10_led_data);
visstrim_deinterlace_init();
visstrim_camera_init(); visstrim_camera_init();
visstrim_coda_init(); visstrim_coda_init();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment