aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2011-04-12 08:15:58 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 09:29:59 -0300
commitf3b1af19647f375efb96cbd0589f9279caea7023 (patch)
treee6197cb097326a94a4b516bb1a1bd0a2d798ec7c /drivers
parent791ae6991051729697dfe60f277744ad6de42316 (diff)
downloadkernel_samsung_smdk4412-f3b1af19647f375efb96cbd0589f9279caea7023.zip
kernel_samsung_smdk4412-f3b1af19647f375efb96cbd0589f9279caea7023.tar.gz
kernel_samsung_smdk4412-f3b1af19647f375efb96cbd0589f9279caea7023.tar.bz2
[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>
Diffstat (limited to 'drivers')
-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 ab0e09d..908d701 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)
static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i)
{
struct viu_fh *fh = priv;
+ struct viu_dev *dev = fh->dev;
if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
if (fh->type != i)
return -EINVAL;
+ if (dev->ovenable)
+ dev->ovenable = 0;
+
viu_start_dma(fh->dev);
return videobuf_streamon(&fh->vb_vidq);