提交 3b4c34aa 编写于 作者: S Sylwester Nawrocki 提交者: Mauro Carvalho Chehab

[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: NSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 6d91a51a
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册