Skip to contentSkip to conversation

media: fsl_viu: fix bug in streamon routine

PATCH New Anatolij Gustschin 1 participant 1 message Apr 12, 2011 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/media/video/fsl-viu.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/media/video/fsl-viu.c +4 -0
index 031af16..4b2bba8 100644
@@ -911,12 +911,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);
Signature · 1 line
1.7.1