diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2012-01-30 21:56:59 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-03-08 14:41:01 +0400 |
commit | 3b4c34aac7abea4754059084d0eef667a1993ac8 (patch) | |
tree | 60b9835f43c4e74d5f9b2c5353b9a7c8209ab5c3 /drivers/media/video/s5p-fimc | |
parent | 6d91a51ae1cb597100e17a75370bb2ad9c7da6d6 (diff) | |
download | linux-3b4c34aac7abea4754059084d0eef667a1993ac8.tar.xz |
[media] s5p-fimc: Add support for VIDIOC_PREPARE_BUF/CREATE_BUFS ioctls
Add VIDIOC_PREPARE_BUF and VIDIOC_CREATE_BUFS ioctl handlers to enable
support for multi-size buffer queue.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/s5p-fimc')
-rw-r--r-- | drivers/media/video/s5p-fimc/fimc-capture.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index a9e9653beeb4..b2fc0b55bc11 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c @@ -1019,6 +1019,22 @@ static int fimc_cap_dqbuf(struct file *file, void *priv, return vb2_dqbuf(&fimc->vid_cap.vbq, buf, file->f_flags & O_NONBLOCK); } +static int fimc_cap_create_bufs(struct file *file, void *priv, + struct v4l2_create_buffers *create) +{ + struct fimc_dev *fimc = video_drvdata(file); + + return vb2_create_bufs(&fimc->vid_cap.vbq, create); +} + +static int fimc_cap_prepare_buf(struct file *file, void *priv, + struct v4l2_buffer *b) +{ + struct fimc_dev *fimc = video_drvdata(file); + + return vb2_prepare_buf(&fimc->vid_cap.vbq, b); +} + static int fimc_cap_cropcap(struct file *file, void *fh, struct v4l2_cropcap *cr) { @@ -1082,6 +1098,9 @@ static const struct v4l2_ioctl_ops fimc_capture_ioctl_ops = { .vidioc_qbuf = fimc_cap_qbuf, .vidioc_dqbuf = fimc_cap_dqbuf, + .vidioc_prepare_buf = fimc_cap_prepare_buf, + .vidioc_create_bufs = fimc_cap_create_bufs, + .vidioc_streamon = fimc_cap_streamon, .vidioc_streamoff = fimc_cap_streamoff, |