summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorWayne Zou <b36644@freescale.com>2012-07-13 15:01:59 +0800
committerEric Nelson <eric.nelson@boundarydevices.com>2012-08-28 09:49:50 -0700
commit1fcdc5a7d02691cdc025b0ad8ffc324eb6623e24 (patch)
treee22d7cc30b24e0083412bb5a26ac11a489f2f336 /drivers/media
parent036e9e47ac7d80c774c14508ab9b46779ebb2ffb (diff)
ENGR00216293 V4L2 output: Check input params for progressive tiled format
Check input params for progressive tiled format to remind the application input wrong params and make driver more robust. Signed-off-by: Wayne Zou <b36644@freescale.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/mxc/output/mxc_vout.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/video/mxc/output/mxc_vout.c b/drivers/media/video/mxc/output/mxc_vout.c
index 0f755e3353a4..f1f376db98ce 100644
--- a/drivers/media/video/mxc/output/mxc_vout.c
+++ b/drivers/media/video/mxc/output/mxc_vout.c
@@ -1109,6 +1109,13 @@ static int mxc_vout_try_format(struct mxc_vout_output *vout, struct v4l2_format
int ret = 0;
struct v4l2_rect rect;
+ if ((f->fmt.pix.field != V4L2_FIELD_NONE) &&
+ (IPU_PIX_FMT_TILED_NV12 == vout->task.input.format)) {
+ v4l2_err(vout->vfd->v4l2_dev,
+ "progressive tiled fmt should used V4L2_FIELD_NONE!\n");
+ return -EINVAL;
+ }
+
if (f->fmt.pix.priv && copy_from_user(&rect,
(void __user *)f->fmt.pix.priv, sizeof(rect)))
return -EFAULT;