Commit b28d61b6 authored by Tomasz Stanislawski's avatar Tomasz Stanislawski Committed by Mauro Carvalho Chehab

[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: default avatarTomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Tested-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a812a966
...@@ -1231,6 +1231,14 @@ static int fimc_cap_qbuf(struct file *file, void *priv, ...@@ -1231,6 +1231,14 @@ static int fimc_cap_qbuf(struct file *file, void *priv,
return vb2_qbuf(&fimc->vid_cap.vbq, buf); 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, static int fimc_cap_dqbuf(struct file *file, void *priv,
struct v4l2_buffer *buf) struct v4l2_buffer *buf)
{ {
...@@ -1355,6 +1363,7 @@ static const struct v4l2_ioctl_ops fimc_capture_ioctl_ops = { ...@@ -1355,6 +1363,7 @@ static const struct v4l2_ioctl_ops fimc_capture_ioctl_ops = {
.vidioc_qbuf = fimc_cap_qbuf, .vidioc_qbuf = fimc_cap_qbuf,
.vidioc_dqbuf = fimc_cap_dqbuf, .vidioc_dqbuf = fimc_cap_dqbuf,
.vidioc_expbuf = fimc_cap_expbuf,
.vidioc_prepare_buf = fimc_cap_prepare_buf, .vidioc_prepare_buf = fimc_cap_prepare_buf,
.vidioc_create_bufs = fimc_cap_create_bufs, .vidioc_create_bufs = fimc_cap_create_bufs,
......
...@@ -439,6 +439,15 @@ static int fimc_m2m_dqbuf(struct file *file, void *fh, ...@@ -439,6 +439,15 @@ static int fimc_m2m_dqbuf(struct file *file, void *fh,
return v4l2_m2m_dqbuf(file, ctx->m2m_ctx, buf); 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, static int fimc_m2m_streamon(struct file *file, void *fh,
enum v4l2_buf_type type) enum v4l2_buf_type type)
{ {
...@@ -607,6 +616,7 @@ static const struct v4l2_ioctl_ops fimc_m2m_ioctl_ops = { ...@@ -607,6 +616,7 @@ static const struct v4l2_ioctl_ops fimc_m2m_ioctl_ops = {
.vidioc_querybuf = fimc_m2m_querybuf, .vidioc_querybuf = fimc_m2m_querybuf,
.vidioc_qbuf = fimc_m2m_qbuf, .vidioc_qbuf = fimc_m2m_qbuf,
.vidioc_dqbuf = fimc_m2m_dqbuf, .vidioc_dqbuf = fimc_m2m_dqbuf,
.vidioc_expbuf = fimc_m2m_expbuf,
.vidioc_streamon = fimc_m2m_streamon, .vidioc_streamon = fimc_m2m_streamon,
.vidioc_streamoff = fimc_m2m_streamoff, .vidioc_streamoff = fimc_m2m_streamoff,
.vidioc_g_crop = fimc_m2m_g_crop, .vidioc_g_crop = fimc_m2m_g_crop,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment