summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/omap3isp/ispvideo.c
diff options
context:
space:
mode:
authorLaurent Pinchart2014-05-19 21:37:38 +0200
committerMauro Carvalho Chehab2014-08-21 22:25:14 +0200
commit9a36d8ed33c481a99f69f8a2eeb22e3c7750e522 (patch)
tree05e04c5c044086df8248e88877426758571be347 /drivers/media/platform/omap3isp/ispvideo.c
parent[media] omap3isp: ccdc: Simplify the ccdc_isr_buffer() function (diff)
downloadkernel-qcow2-linux-9a36d8ed33c481a99f69f8a2eeb22e3c7750e522.tar.gz
kernel-qcow2-linux-9a36d8ed33c481a99f69f8a2eeb22e3c7750e522.tar.xz
kernel-qcow2-linux-9a36d8ed33c481a99f69f8a2eeb22e3c7750e522.zip
[media] omap3isp: ccdc: Add basic support for interlaced video
When the CCDC input is interlaced enable the alternate field order on the CCDC output video node. The field signal polarity is specified through platform data. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/omap3isp/ispvideo.c')
-rw-r--r--drivers/media/platform/omap3isp/ispvideo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c
index 756c1628ef86..c38f1d4cc538 100644
--- a/drivers/media/platform/omap3isp/ispvideo.c
+++ b/drivers/media/platform/omap3isp/ispvideo.c
@@ -482,6 +482,11 @@ struct isp_buffer *omap3isp_video_buffer_next(struct isp_video *video)
else
buf->vb.v4l2_buf.sequence = atomic_read(&pipe->frame_number);
+ if (pipe->field != V4L2_FIELD_NONE)
+ buf->vb.v4l2_buf.sequence /= 2;
+
+ buf->vb.v4l2_buf.field = pipe->field;
+
/* Report pipeline errors to userspace on the capture device side. */
if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE && pipe->error) {
state = VB2_BUF_STATE_ERROR;
@@ -1038,6 +1043,7 @@ isp_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type)
video->queue = &vfh->queue;
INIT_LIST_HEAD(&video->dmaqueue);
atomic_set(&pipe->frame_number, -1);
+ pipe->field = vfh->format.fmt.pix.field;
mutex_lock(&video->queue_lock);
ret = vb2_streamon(&vfh->queue, type);