diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-05-19 17:49:58 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-08-22 00:25:13 +0400 |
commit | 48a8a0cb764c25939788a476e7f1b1695c337835 (patch) | |
tree | 29bf920a9978bb1d46632f31805a9a97e839fe65 /drivers/media/platform/omap3isp/ispvideo.c | |
parent | 25c5cc9194f241d9180b4ca76a1845efd0a02769 (diff) | |
download | linux-48a8a0cb764c25939788a476e7f1b1695c337835.tar.xz |
[media] omap3isp: Default to progressive field order when setting the format
If the requested field order is not supported default to progressive as
we can't guess how the user will configure the pipeline later on.
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.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c index 2876f34b84c0..2fe1c463232d 100644 --- a/drivers/media/platform/omap3isp/ispvideo.c +++ b/drivers/media/platform/omap3isp/ispvideo.c @@ -631,6 +631,15 @@ isp_video_set_format(struct file *file, void *fh, struct v4l2_format *format) if (format->type != video->type) return -EINVAL; + /* Default to the progressive field order if the requested value is not + * supported (or set to ANY). The only supported orders are progressive + * (available on all video nodes) and alternate (available on capture + * nodes only). + */ + if (format->fmt.pix.field != V4L2_FIELD_ALTERNATE || + video->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) + format->fmt.pix.field = V4L2_FIELD_NONE; + /* Fill the bytesperline and sizeimage fields by converting to media bus * format and back to pixel format. */ |