Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e90f789 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

[media] v4l: omap4iss: Enable DMABUF support



Enable DMABUF import and export operations using videobuf2.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent aadec012
Loading
Loading
Loading
Loading
+10 −1
Original line number Original line Diff line number Diff line
@@ -772,6 +772,14 @@ iss_video_qbuf(struct file *file, void *fh, struct v4l2_buffer *b)
	return vb2_qbuf(&vfh->queue, b);
	return vb2_qbuf(&vfh->queue, b);
}
}


static int
iss_video_expbuf(struct file *file, void *fh, struct v4l2_exportbuffer *e)
{
	struct iss_video_fh *vfh = to_iss_video_fh(fh);

	return vb2_expbuf(&vfh->queue, e);
}

static int
static int
iss_video_dqbuf(struct file *file, void *fh, struct v4l2_buffer *b)
iss_video_dqbuf(struct file *file, void *fh, struct v4l2_buffer *b)
{
{
@@ -1021,6 +1029,7 @@ static const struct v4l2_ioctl_ops iss_video_ioctl_ops = {
	.vidioc_reqbufs			= iss_video_reqbufs,
	.vidioc_reqbufs			= iss_video_reqbufs,
	.vidioc_querybuf		= iss_video_querybuf,
	.vidioc_querybuf		= iss_video_querybuf,
	.vidioc_qbuf			= iss_video_qbuf,
	.vidioc_qbuf			= iss_video_qbuf,
	.vidioc_expbuf			= iss_video_expbuf,
	.vidioc_dqbuf			= iss_video_dqbuf,
	.vidioc_dqbuf			= iss_video_dqbuf,
	.vidioc_streamon		= iss_video_streamon,
	.vidioc_streamon		= iss_video_streamon,
	.vidioc_streamoff		= iss_video_streamoff,
	.vidioc_streamoff		= iss_video_streamoff,
@@ -1071,7 +1080,7 @@ static int iss_video_open(struct file *file)
	q = &handle->queue;
	q = &handle->queue;


	q->type = video->type;
	q->type = video->type;
	q->io_modes = VB2_MMAP;
	q->io_modes = VB2_MMAP | VB2_DMABUF;
	q->drv_priv = handle;
	q->drv_priv = handle;
	q->ops = &iss_video_vb2ops;
	q->ops = &iss_video_vb2ops;
	q->mem_ops = &vb2_dma_contig_memops;
	q->mem_ops = &vb2_dma_contig_memops;