[media] v4l: s5p-fimc: support for dmabuf exporting
This patch enhances s5p-fimc with support for DMABUF exporting via VIDIOC_EXPBUF ioctl. Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
a812a9665d
commit
b28d61b622
|
@ -1231,6 +1231,14 @@ static int fimc_cap_qbuf(struct file *file, void *priv,
|
|||
return vb2_qbuf(&fimc->vid_cap.vbq, buf);
|
||||
}
|
||||
|
||||
static int fimc_cap_expbuf(struct file *file, void *priv,
|
||||
struct v4l2_exportbuffer *eb)
|
||||
{
|
||||
struct fimc_dev *fimc = video_drvdata(file);
|
||||
|
||||
return vb2_expbuf(&fimc->vid_cap.vbq, eb);
|
||||
}
|
||||
|
||||
static int fimc_cap_dqbuf(struct file *file, void *priv,
|
||||
struct v4l2_buffer *buf)
|
||||
{
|
||||
|
@ -1355,6 +1363,7 @@ static const struct v4l2_ioctl_ops fimc_capture_ioctl_ops = {
|
|||
|
||||
.vidioc_qbuf = fimc_cap_qbuf,
|
||||
.vidioc_dqbuf = fimc_cap_dqbuf,
|
||||
.vidioc_expbuf = fimc_cap_expbuf,
|
||||
|
||||
.vidioc_prepare_buf = fimc_cap_prepare_buf,
|
||||
.vidioc_create_bufs = fimc_cap_create_bufs,
|
||||
|
|
|
@ -439,6 +439,15 @@ static int fimc_m2m_dqbuf(struct file *file, void *fh,
|
|||
return v4l2_m2m_dqbuf(file, ctx->m2m_ctx, buf);
|
||||
}
|
||||
|
||||
static int fimc_m2m_expbuf(struct file *file, void *fh,
|
||||
struct v4l2_exportbuffer *eb)
|
||||
{
|
||||
struct fimc_ctx *ctx = fh_to_ctx(fh);
|
||||
|
||||
return v4l2_m2m_expbuf(file, ctx->m2m_ctx, eb);
|
||||
}
|
||||
|
||||
|
||||
static int fimc_m2m_streamon(struct file *file, void *fh,
|
||||
enum v4l2_buf_type type)
|
||||
{
|
||||
|
@ -607,6 +616,7 @@ static const struct v4l2_ioctl_ops fimc_m2m_ioctl_ops = {
|
|||
.vidioc_querybuf = fimc_m2m_querybuf,
|
||||
.vidioc_qbuf = fimc_m2m_qbuf,
|
||||
.vidioc_dqbuf = fimc_m2m_dqbuf,
|
||||
.vidioc_expbuf = fimc_m2m_expbuf,
|
||||
.vidioc_streamon = fimc_m2m_streamon,
|
||||
.vidioc_streamoff = fimc_m2m_streamoff,
|
||||
.vidioc_g_crop = fimc_m2m_g_crop,
|
||||
|
|
Loading…
Reference in New Issue