diff mbox

[RFC,13/13] v4l: vivi: support for dmabuf exporting

Message ID 1334063447-16824-14-git-send-email-t.stanislaws@samsung.com
State Superseded, archived
Headers show

Commit Message

Tomasz Stanislawski April 10, 2012, 1:10 p.m. UTC
This patch enhances vivi driver with a 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>
---
 drivers/media/video/vivi.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index 489d685..e34aa70 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -947,6 +947,14 @@  static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p)
 	return vb2_dqbuf(&dev->vb_vidq, p, file->f_flags & O_NONBLOCK);
 }
 
+static int vidioc_expbuf(struct file *file, void *priv,
+	struct v4l2_exportbuffer *eb)
+{
+	struct vivi_dev *dev = video_drvdata(file);
+	return vb2_expbuf(&dev->vb_vidq, eb);
+}
+
+
 static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i)
 {
 	struct vivi_dev *dev = video_drvdata(file);
@@ -1185,6 +1193,7 @@  static const struct v4l2_ioctl_ops vivi_ioctl_ops = {
 	.vidioc_querybuf      = vidioc_querybuf,
 	.vidioc_qbuf          = vidioc_qbuf,
 	.vidioc_dqbuf         = vidioc_dqbuf,
+	.vidioc_expbuf        = vidioc_expbuf,
 	.vidioc_s_std         = vidioc_s_std,
 	.vidioc_enum_input    = vidioc_enum_input,
 	.vidioc_g_input       = vidioc_g_input,