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

Commit 6748c1cf authored by Malathi Gottam's avatar Malathi Gottam Committed by Mauro Carvalho Chehab
Browse files

media: venus: add support for USERPTR to queue



Add USERPTR to queue access methods by adding this
support to io_modes on both the planes.

Signed-off-by: default avatarMalathi Gottam <mgottam@codeaurora.org>
Tested-by: default avatarAlexandre Courbot <acourbot@chromium.org>
Acked-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 708d75fe
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1074,7 +1074,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
	int ret;

	src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
	src_vq->io_modes = VB2_MMAP | VB2_DMABUF;
	src_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
	src_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
	src_vq->ops = &venc_vb2_ops;
	src_vq->mem_ops = &vb2_dma_sg_memops;
@@ -1090,7 +1090,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
		return ret;

	dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
	dst_vq->io_modes = VB2_MMAP | VB2_DMABUF;
	dst_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
	dst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
	dst_vq->ops = &venc_vb2_ops;
	dst_vq->mem_ops = &vb2_dma_sg_memops;