[media] media: Add mem2mem deinterlacing driver

Some video decoders such as tvp5150 provide separate
video fields (V4L2_FIELD_SEQ_TB/BT). This driver uses
dmaengine to convert this format to V4L2_FIELD_INTERLACED_TB/BT
(weaving) or V4L2_FIELD_NONE (line doubling) so that the
image can be displayed or processed.

Of course there will be combing effect in the image but this
can be accepted for some low quality applications.

Currently only YUV420 and YUYV formats are supported but
it can be extended later.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index c95954d..d5df1fd 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -1233,6 +1233,14 @@
 	   Coda is a range of video codec IPs that supports
 	   H.264, MPEG-4, and other video formats.
 
+config VIDEO_MEM2MEM_DEINTERLACE
+	tristate "Deinterlace support"
+	depends on VIDEO_DEV && VIDEO_V4L2 && DMA_ENGINE
+	select VIDEOBUF2_DMA_CONTIG
+	select V4L2_MEM2MEM_DEV
+	help
+	    Generic deinterlacing V4L2 driver.
+
 config VIDEO_SAMSUNG_S5P_G2D
 	tristate "Samsung S5P and EXYNOS4 G2D 2d graphics accelerator driver"
 	depends on VIDEO_DEV && VIDEO_V4L2 && PLAT_S5P