media: vimc: Add support for contiguous DMA buffers
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 30 Jul 2021 13:18:29 +0000 (15:18 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Wed, 16 Feb 2022 11:47:02 +0000 (12:47 +0100)
commit4a2e0a806cb58a4d3106add079488e0b56a221b6
treeed222cfea93b957a9e606b548c25a881a13d0240
parent79e8c421a099bfbcebe59740153e55aa0442ced6
media: vimc: Add support for contiguous DMA buffers

The vimc driver is used for testing purpose, and some test use cases
involve sharing buffers with a consumer device. Consumers often require
DMA contiguous memory, which vimc doesn't currently support. This leads
in the best case to usage of bounce buffers, which is very slow, and in
the worst case in a complete failure.

Add support for the dma-contig allocator in vimc to support those use
cases properly. The allocator is selected through a new "allocator"
module parameter, which defaults to vmalloc.

[hverkuil: add missing 'select VIDEOBUF2_DMA_CONFIG' to Kconfig]

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Documentation/admin-guide/media/vimc.rst
drivers/media/test-drivers/vimc/Kconfig
drivers/media/test-drivers/vimc/vimc-capture.c
drivers/media/test-drivers/vimc/vimc-common.h
drivers/media/test-drivers/vimc/vimc-core.c