aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/omap3isp/ispvideo.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-05-19 15:37:38 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-08-21 16:25:14 -0400
commit9a36d8ed33c481a99f69f8a2eeb22e3c7750e522 (patch)
tree05e04c5c044086df8248e88877426758571be347 /drivers/media/platform/omap3isp/ispvideo.c
parent0a7b1a01037e0d43e1b85134be4217c7831f57d6 (diff)
[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)
482 else 482 else
483 buf->vb.v4l2_buf.sequence = atomic_read(&pipe->frame_number); 483 buf->vb.v4l2_buf.sequence = atomic_read(&pipe->frame_number);
484 484
485 if (pipe->field != V4L2_FIELD_NONE)
486 buf->vb.v4l2_buf.sequence /= 2;
487
488 buf->vb.v4l2_buf.field = pipe->field;
489
485 /* Report pipeline errors to userspace on the capture device side. */ 490 /* Report pipeline errors to userspace on the capture device side. */
486 if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE && pipe->error) { 491 if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE && pipe->error) {
487 state = VB2_BUF_STATE_ERROR; 492 state = VB2_BUF_STATE_ERROR;
@@ -1038,6 +1043,7 @@ isp_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type)
1038 video->queue = &vfh->queue; 1043 video->queue = &vfh->queue;
1039 INIT_LIST_HEAD(&video->dmaqueue); 1044 INIT_LIST_HEAD(&video->dmaqueue);
1040 atomic_set(&pipe->frame_number, -1); 1045 atomic_set(&pipe->frame_number, -1);
1046 pipe->field = vfh->format.fmt.pix.field;
1041 1047
1042 mutex_lock(&video->queue_lock); 1048 mutex_lock(&video->queue_lock);
1043 ret = vb2_streamon(&vfh->queue, type); 1049 ret = vb2_streamon(&vfh->queue, type);