[media] v4l: mem2mem_testdev: add support for dmabuf importing
This patch enhances mem2mem_testdev device with support for DMABUF importing via V4L2_MEMORY_DMABUF memory type. Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
ccc4c539c0
commit
b0a55033ad
|
@ -839,7 +839,7 @@ static int queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_queue *ds
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
|
src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
|
||||||
src_vq->io_modes = VB2_MMAP;
|
src_vq->io_modes = VB2_MMAP | VB2_DMABUF;
|
||||||
src_vq->drv_priv = ctx;
|
src_vq->drv_priv = ctx;
|
||||||
src_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);
|
src_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);
|
||||||
src_vq->ops = &m2mtest_qops;
|
src_vq->ops = &m2mtest_qops;
|
||||||
|
@ -850,7 +850,7 @@ static int queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_queue *ds
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||||
dst_vq->io_modes = VB2_MMAP;
|
dst_vq->io_modes = VB2_MMAP | VB2_DMABUF;
|
||||||
dst_vq->drv_priv = ctx;
|
dst_vq->drv_priv = ctx;
|
||||||
dst_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);
|
dst_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);
|
||||||
dst_vq->ops = &m2mtest_qops;
|
dst_vq->ops = &m2mtest_qops;
|
||||||
|
|
Loading…
Reference in New Issue