diff options
author | Archit Taneja <archit@ti.com> | 2014-03-13 07:44:06 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-23 13:26:54 -0400 |
commit | 668f91d4997634a78c947b210e19309726c30693 (patch) | |
tree | 988ec6197c13839ab9d571c26bc1309d2012d0bc | |
parent | b2c9472f0559ba23fa0c2cf565577d1cd9421e50 (diff) |
[media] v4l: ti-vpe: Allow DMABUF buffer type support
For OMAP and DRA7x, we generally allocate video and graphics buffers through
omapdrm since the corresponding omap-gem driver provides DMM-Tiler backed
contiguous buffers. omapdrm is a dma-buf exporter. These buffers are used by
other drivers in the video pipeline.
Add VB2_DMABUF flag to the io_modes of the vb2 output and capture queues. This
allows the driver to import dma shared buffers.
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/platform/ti-vpe/vpe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c index d90ad2bed2fa..b3cea49d6279 100644 --- a/drivers/media/platform/ti-vpe/vpe.c +++ b/drivers/media/platform/ti-vpe/vpe.c | |||
@@ -1784,7 +1784,7 @@ static int queue_init(void *priv, struct vb2_queue *src_vq, | |||
1784 | 1784 | ||
1785 | memset(src_vq, 0, sizeof(*src_vq)); | 1785 | memset(src_vq, 0, sizeof(*src_vq)); |
1786 | src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; | 1786 | src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; |
1787 | src_vq->io_modes = VB2_MMAP; | 1787 | src_vq->io_modes = VB2_MMAP | VB2_DMABUF; |
1788 | src_vq->drv_priv = ctx; | 1788 | src_vq->drv_priv = ctx; |
1789 | src_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer); | 1789 | src_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer); |
1790 | src_vq->ops = &vpe_qops; | 1790 | src_vq->ops = &vpe_qops; |
@@ -1797,7 +1797,7 @@ static int queue_init(void *priv, struct vb2_queue *src_vq, | |||
1797 | 1797 | ||
1798 | memset(dst_vq, 0, sizeof(*dst_vq)); | 1798 | memset(dst_vq, 0, sizeof(*dst_vq)); |
1799 | dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; | 1799 | dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; |
1800 | dst_vq->io_modes = VB2_MMAP; | 1800 | dst_vq->io_modes = VB2_MMAP | VB2_DMABUF; |
1801 | dst_vq->drv_priv = ctx; | 1801 | dst_vq->drv_priv = ctx; |
1802 | dst_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer); | 1802 | dst_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer); |
1803 | dst_vq->ops = &vpe_qops; | 1803 | dst_vq->ops = &vpe_qops; |