]> git.baikalelectronics.ru Git - kernel.git/commit
media: stm32: dcmi: create a dma scatterlist based on DMA max_sg_burst value
authorAlain Volmat <alain.volmat@foss.st.com>
Mon, 10 Jan 2022 10:37:39 +0000 (11:37 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 23 Jan 2022 20:18:43 +0000 (21:18 +0100)
commitad3299bcbbc152c612a4d04fbeaa91333f1e0133
tree692c9948443033ce6d0fa30640a60133544191a7
parentd4e8b27d98829fa0ec3037ad2d92eb31835b4cc1
media: stm32: dcmi: create a dma scatterlist based on DMA max_sg_burst value

Prior to submitting a transfer to the DMA, the client should first check
the capabilities of the DMA channel in term of maximum of each segment.
This is given by the max_sg_burst value reported by dma_get_slave_caps API.
Based on that, if the transfer is larger than what can be handled by the
DMA channel, we split the transfer into several scatterlist elements.

[hverkuil: fix checkpatch parenthesis alignment warning]

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/stm32/stm32-dcmi.c