diff options
author | Anatolij Gustschin <agust@denx.de> | 2010-12-17 04:40:50 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-29 05:17:03 -0500 |
commit | c3353330508aee4390442df2d7f6ce0ef5006185 (patch) | |
tree | a87d764e4beeb15872c76a83602516f45059ddba /drivers/media | |
parent | 2a72b39e516bf772e707d5a080d5d07b1c8ac0c0 (diff) |
[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: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/fsl-viu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/video/fsl-viu.c b/drivers/media/video/fsl-viu.c index b8faff2dd711..693e9c07e3f4 100644 --- a/drivers/media/video/fsl-viu.c +++ b/drivers/media/video/fsl-viu.c | |||
@@ -915,6 +915,8 @@ static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i) | |||
915 | if (fh->type != i) | 915 | if (fh->type != i) |
916 | return -EINVAL; | 916 | return -EINVAL; |
917 | 917 | ||
918 | viu_start_dma(fh->dev); | ||
919 | |||
918 | return videobuf_streamon(&fh->vb_vidq); | 920 | return videobuf_streamon(&fh->vb_vidq); |
919 | } | 921 | } |
920 | 922 | ||
@@ -927,6 +929,8 @@ static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i) | |||
927 | if (fh->type != i) | 929 | if (fh->type != i) |
928 | return -EINVAL; | 930 | return -EINVAL; |
929 | 931 | ||
932 | viu_stop_dma(fh->dev); | ||
933 | |||
930 | return videobuf_streamoff(&fh->vb_vidq); | 934 | return videobuf_streamoff(&fh->vb_vidq); |
931 | } | 935 | } |
932 | 936 | ||
@@ -1331,6 +1335,7 @@ static int viu_release(struct file *file) | |||
1331 | 1335 | ||
1332 | viu_stop_dma(dev); | 1336 | viu_stop_dma(dev); |
1333 | videobuf_stop(&fh->vb_vidq); | 1337 | videobuf_stop(&fh->vb_vidq); |
1338 | videobuf_mmap_free(&fh->vb_vidq); | ||
1334 | 1339 | ||
1335 | kfree(fh); | 1340 | kfree(fh); |
1336 | 1341 | ||