aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2011-04-12 07:15:58 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 08:29:59 -0400
commitf3b1af19647f375efb96cbd0589f9279caea7023 (patch)
treee6197cb097326a94a4b516bb1a1bd0a2d798ec7c
parent791ae6991051729697dfe60f277744ad6de42316 (diff)
[media] media: fsl_viu: fix bug in streamon routine
Currently video capturing using streaming I/O method doesn't work if capturing to overlay buffer took place before. When enabling the stream we have to check the overlay enable driver flag and reset it so that the interrupt handler won't execute the overlay interrupt path after enabling DMA in streamon routine. Otherwise the capture interrupt won't be handled correctly causing non working VIDIOC_DQBUF ioctl. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/fsl-viu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/fsl-viu.c b/drivers/media/video/fsl-viu.c
index ab0e09d391f1..908d7012c3f2 100644
--- a/drivers/media/video/fsl-viu.c
+++ b/drivers/media/video/fsl-viu.c
@@ -926,12 +926,16 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p)
926static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i) 926static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i)
927{ 927{
928 struct viu_fh *fh = priv; 928 struct viu_fh *fh = priv;
929 struct viu_dev *dev = fh->dev;
929 930
930 if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 931 if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
931 return -EINVAL; 932 return -EINVAL;
932 if (fh->type != i) 933 if (fh->type != i)
933 return -EINVAL; 934 return -EINVAL;
934 935
936 if (dev->ovenable)
937 dev->ovenable = 0;
938
935 viu_start_dma(fh->dev); 939 viu_start_dma(fh->dev);
936 940
937 return videobuf_streamon(&fh->vb_vidq); 941 return videobuf_streamon(&fh->vb_vidq);