summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2014-03-13 08:44:06 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-23 14:26:54 -0300
commit668f91d4997634a78c947b210e19309726c30693 (patch)
tree988ec6197c13839ab9d571c26bc1309d2012d0bc /drivers
parentb2c9472f0559ba23fa0c2cf565577d1cd9421e50 (diff)
downloadop-kernel-dev-668f91d4997634a78c947b210e19309726c30693.zip
op-kernel-dev-668f91d4997634a78c947b210e19309726c30693.tar.gz
[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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/platform/ti-vpe/vpe.c4
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 d90ad2b..b3cea49 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,
memset(src_vq, 0, sizeof(*src_vq));
src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
- src_vq->io_modes = VB2_MMAP;
+ src_vq->io_modes = VB2_MMAP | VB2_DMABUF;
src_vq->drv_priv = ctx;
src_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);
src_vq->ops = &vpe_qops;
@@ -1797,7 +1797,7 @@ static int queue_init(void *priv, struct vb2_queue *src_vq,
memset(dst_vq, 0, sizeof(*dst_vq));
dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
- dst_vq->io_modes = VB2_MMAP;
+ dst_vq->io_modes = VB2_MMAP | VB2_DMABUF;
dst_vq->drv_priv = ctx;
dst_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);
dst_vq->ops = &vpe_qops;
OpenPOWER on IntegriCloud