Skip to content

Commit

Permalink
[media] v4l: s5p-tv: mixer: support for dmabuf exporting
Browse files Browse the repository at this point in the history
This patch enhances s5p-tv 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>
  • Loading branch information
Tomasz Stanislawski authored and Mauro Carvalho Chehab committed Nov 25, 2012
1 parent b28d61b commit 3c44efd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/media/platform/s5p-tv/mixer_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,15 @@ static int mxr_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p)
return vb2_dqbuf(&layer->vb_queue, p, file->f_flags & O_NONBLOCK);
}

static int mxr_expbuf(struct file *file, void *priv,
struct v4l2_exportbuffer *eb)
{
struct mxr_layer *layer = video_drvdata(file);

mxr_dbg(layer->mdev, "%s:%d\n", __func__, __LINE__);
return vb2_expbuf(&layer->vb_queue, eb);
}

static int mxr_streamon(struct file *file, void *priv, enum v4l2_buf_type i)
{
struct mxr_layer *layer = video_drvdata(file);
Expand Down Expand Up @@ -724,6 +733,7 @@ static const struct v4l2_ioctl_ops mxr_ioctl_ops = {
.vidioc_querybuf = mxr_querybuf,
.vidioc_qbuf = mxr_qbuf,
.vidioc_dqbuf = mxr_dqbuf,
.vidioc_expbuf = mxr_expbuf,
/* Streaming control */
.vidioc_streamon = mxr_streamon,
.vidioc_streamoff = mxr_streamoff,
Expand Down

0 comments on commit 3c44efd

Please sign in to comment.