mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 15:02:40 -04:00
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>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
79e8c421a0
commit
4a2e0a806c
@@ -35,6 +35,13 @@
|
||||
|
||||
#define VIMC_PIX_FMT_MAX_CODES 8
|
||||
|
||||
extern unsigned int vimc_allocator;
|
||||
|
||||
enum vimc_allocator_type {
|
||||
VIMC_ALLOCATOR_VMALLOC = 0,
|
||||
VIMC_ALLOCATOR_DMA_CONTIG = 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* vimc_colorimetry_clamp - Adjust colorimetry parameters
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user