]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: stm32: dcmi: use dmaengine_terminate_async in irq context
authorAlain Volmat <alain.volmat@foss.st.com>
Tue, 6 Jan 2026 11:34:35 +0000 (12:34 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 11 Mar 2026 00:05:33 +0000 (01:05 +0100)
commit04e047447a05de495ac2a9cb96adf35bf1c0e0f8
tree75a5b1bf1a841123379470f5c077ad8c58427126
parentc1cde65747158e90e3e4633d571450d929b4a4fe
media: stm32: dcmi: use dmaengine_terminate_async in irq context

Whenever receiving an OVERRUN event or an end of frame, the driver stops
currently ongoing DMA transfer since the DCMI stops sending data to dma.
Not doing this would lead to having DMA & DCMI no more synchronized in term
of expected data to be copied.
Since this is done in irq handler context, it is not possible to make any
call that would lead to scheduling hence dmaengine_terminate_sync are not
possible.
Since the dcmi driver is NOT using dma callbacks, it is possible thus to
call instead dmaengine_terminate_async (aka without synchronize) and call
again right after a new dmaengine_submit to setup again a new transfer.
And since this is now a dmaengine_submit_async, there is no need to release
the spinlock around calls to the dmaengine_submit_async.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/st/stm32/stm32-dcmi.c