Commit c3353330 authored by Anatolij Gustschin's avatar Anatolij Gustschin Committed by Mauro Carvalho Chehab

[media] media: fsl-viu: fix support for streaming with mmap method

Streaming using mmap didn't work in the VIU driver. We need to
start/stop DMA in streamon/streamoff and free the buffers on
release. Add appropriate driver extension now.
Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 2a72b39e
...@@ -915,6 +915,8 @@ static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i) ...@@ -915,6 +915,8 @@ static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i)
if (fh->type != i) if (fh->type != i)
return -EINVAL; return -EINVAL;
viu_start_dma(fh->dev);
return videobuf_streamon(&fh->vb_vidq); return videobuf_streamon(&fh->vb_vidq);
} }
...@@ -927,6 +929,8 @@ static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i) ...@@ -927,6 +929,8 @@ static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i)
if (fh->type != i) if (fh->type != i)
return -EINVAL; return -EINVAL;
viu_stop_dma(fh->dev);
return videobuf_streamoff(&fh->vb_vidq); return videobuf_streamoff(&fh->vb_vidq);
} }
...@@ -1331,6 +1335,7 @@ static int viu_release(struct file *file) ...@@ -1331,6 +1335,7 @@ static int viu_release(struct file *file)
viu_stop_dma(dev); viu_stop_dma(dev);
videobuf_stop(&fh->vb_vidq); videobuf_stop(&fh->vb_vidq);
videobuf_mmap_free(&fh->vb_vidq);
kfree(fh); kfree(fh);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment