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)
commitc1b403352c5de09338e7a5ae65104398d9b2e76c
tree692c9948443033ce6d0fa30640a60133544191a7
parentfc5004e5d477cb77a00c9827de395ba708a2cd2a
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