summaryrefslogtreecommitdiff
path: root/drivers/media/platform/coda
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2019-10-24 07:32:49 -0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2019-11-05 08:59:50 -0300
commit3b299d9abf159c5e40864f8ece97d914b6a9f4b1 (patch)
tree9bb9c85702f6d3095be62a183783eea8c8cf572c /drivers/media/platform/coda
parenta3fd80198de6ab98a205cf7fb148d88e9e1c44bb (diff)
media: coda: request to skip kernel mapping for decoded buffers
The kernel driver never touches the decoded buffers with the CPU. All accesses are either done by hardware DMA masters or userspace mapping the buffers. This means we don't need a kernel virtual address mapping for those buffers at all. As those buffers are usually quite large, we can save a good deal of kernel vmalloc space by requesting to not have a kernel mapping set up for them. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/platform/coda')
-rw-r--r--drivers/media/platform/coda/coda-common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 834f11fe9dc2..287dc1692286 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -2387,6 +2387,7 @@ int coda_decoder_queue_init(void *priv, struct vb2_queue *src_vq,
dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
dst_vq->io_modes = VB2_DMABUF | VB2_MMAP;
+ dst_vq->dma_attrs = DMA_ATTR_NO_KERNEL_MAPPING;
dst_vq->mem_ops = &vb2_dma_contig_memops;
return coda_queue_init(priv, dst_vq);