Skip to content

Commit

Permalink
[media] media: fsl-viu: fix support for streaming with mmap method
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Anatolij Gustschin authored and Mauro Carvalho Chehab committed Dec 29, 2010
1 parent 2a72b39 commit c335333
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/media/video/fsl-viu.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@ static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i)
if (fh->type != i)
return -EINVAL;

viu_start_dma(fh->dev);

return videobuf_streamon(&fh->vb_vidq);
}

Expand All @@ -927,6 +929,8 @@ static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i)
if (fh->type != i)
return -EINVAL;

viu_stop_dma(fh->dev);

return videobuf_streamoff(&fh->vb_vidq);
}

Expand Down Expand Up @@ -1331,6 +1335,7 @@ static int viu_release(struct file *file)

viu_stop_dma(dev);
videobuf_stop(&fh->vb_vidq);
videobuf_mmap_free(&fh->vb_vidq);

kfree(fh);

Expand Down

0 comments on commit c335333

Please sign in to comment.