| 87ebce19 | 06-Jan-2026 |
Alain Volmat <alain.volmat@foss.st.com> |
media: stm32: dcmi: addition of DMA-MDMA chaining support
Add possibility to rely on an additional MDMA channel and chain the DMA and MDMA channels allowing to achieve faster capture. Indeed, on the
media: stm32: dcmi: addition of DMA-MDMA chaining support
Add possibility to rely on an additional MDMA channel and chain the DMA and MDMA channels allowing to achieve faster capture. Indeed, on the MP15 platform, the MDMA engine has an higher bandwidth to the DDR than the DMA engine. Relying on that it is possible to capture frames from the DCMI IP into the DDR by using two channels as follow:
DCMI -> (DMA) -> SRAM -> (MDMA) -> DDR
The DMA is able by himself to trigger a MDMA request hence, once properly configured, the DCMI IP can simply trigger the DMA in order to have the data pushed up to the DDR (via the SRAM and a MDMA channel).
This behavior is detailed in the document Documentation/arch/arm/stm32/stm32-dma-mdma-chaining.rst
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>
show more ...
|
| fd239fef | 06-Jan-2026 |
Alain Volmat <alain.volmat@foss.st.com> |
media: stm32: dcmi: continuous mode capture in JPEG
Overall cleanup done allows to now have the JPEG handling done in the same way as other formats in continuous mode, allowing to achieve a faster f
media: stm32: dcmi: continuous mode capture in JPEG
Overall cleanup done allows to now have the JPEG handling done in the same way as other formats in continuous mode, allowing to achieve a faster framerate in all resolutions.
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>
show more ...
|
| 04e04744 | 06-Jan-2026 |
Alain Volmat <alain.volmat@foss.st.com> |
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
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>
show more ...
|
| c1cde657 | 06-Jan-2026 |
Alain Volmat <alain.volmat@foss.st.com> |
media: stm32: dcmi: perform all dma handling within irq_thread
Move all the type of frame handling within the dcmi_irq_thread handler and do not rely on dma_callback as previously.
This simplifies
media: stm32: dcmi: perform all dma handling within irq_thread
Move all the type of frame handling within the dcmi_irq_thread handler and do not rely on dma_callback as previously.
This simplifies the code by having only a single path for both compressed and uncompressed data while also making the system more reactive since irq_handler have more chances to be called faster than the dma completion callback. Indeed, in case of the dma completion callback, this run as a tasklet created by the dma framework upon getting an interrupt from the dma and run at a lower priority level than other irq handlers.
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>
show more ...
|
| c0216d07 | 06-Jan-2026 |
Alain Volmat <alain.volmat@foss.st.com> |
media: stm32: dcmi: rework spin_lock calls
Rework of the spin_lock calls in preparation of the rework of the data handling of the driver. Keep it straight forward with basically spin_lock protection
media: stm32: dcmi: rework spin_lock calls
Rework of the spin_lock calls in preparation of the rework of the data handling of the driver. Keep it straight forward with basically spin_lock protection around everything except dmaengine calls that might sleep (ex: synchronize / terminate)
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>
show more ...
|
| 4847286b | 06-Jan-2026 |
Alain Volmat <alain.volmat@foss.st.com> |
media: stm32: dcmi: stop the dma transfer on overrun
Ensure to stop the dma transfer whenever receiving a overrun to avoid having a buffer partially filled with a frame and partially with the next f
media: stm32: dcmi: stop the dma transfer on overrun
Ensure to stop the dma transfer whenever receiving a overrun to avoid having a buffer partially filled with a frame and partially with the next frame.
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>
show more ...
|
| 9b6f6208 | 06-Jan-2026 |
Alain Volmat <alain.volmat@foss.st.com> |
media: stm32: dcmi: only create dma descriptor once at buf_prepare
Perform the dmaengine prep_slave_sg call within buf_prepare and mark the descriptor as reusable in order to avoid having to redo th
media: stm32: dcmi: only create dma descriptor once at buf_prepare
Perform the dmaengine prep_slave_sg call within buf_prepare and mark the descriptor as reusable in order to avoid having to redo this at every start of the dma. This also allow to remove the mutex used by the driver to protect dma descriptors related piece of codes.
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>
show more ...
|
| bc901885 | 06-Jan-2026 |
Alain Volmat <alain.volmat@foss.st.com> |
media: stm32: dcmi: perform dmaengine_slave_config at probe
Perform the dma channel configuration at probe time right after the channel allocation since this is fixed for the whole lifetime of the d
media: stm32: dcmi: perform dmaengine_slave_config at probe
Perform the dma channel configuration at probe time right after the channel allocation since this is fixed for the whole lifetime of the driver.
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>
show more ...
|
| 8e3c7238 | 19-Dec-2025 |
Alain Volmat <alain.volmat@foss.st.com> |
media: stm32: dcmipp: bytecap: remove useless cmier variable
The struct dcmipp_bytecap_device embeds a cmier variable which is actually only set once and then used in several places for interrupt ma
media: stm32: dcmipp: bytecap: remove useless cmier variable
The struct dcmipp_bytecap_device embeds a cmier variable which is actually only set once and then used in several places for interrupt mask or interrupt enable/disable. Use the DCMIPP_CMIER_P0ALL bitfield macro directly instead of using it through the cmier variable.
There is also no need to mask again vcap->cmsr2 against enabled interrupts bit since this has already been done when storing the interrupt status into the cmsr2 variable.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
show more ...
|
| 8a71f1f8 | 19-Dec-2025 |
Alain Volmat <alain.volmat@foss.st.com> |
media: stm32: dcmipp: byteproc: only allow compose with 8/16bit fmts
Since the byteproc is working at byte level, it is not possible to perform decimation with formats other than 8 or 16 bit per pix
media: stm32: dcmipp: byteproc: only allow compose with 8/16bit fmts
Since the byteproc is working at byte level, it is not possible to perform decimation with formats other than 8 or 16 bit per pixel. Ensure any other format won't be able to set a compose.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
show more ...
|
| 3363aa26 | 19-Dec-2025 |
Alain Volmat <alain.volmat@foss.st.com> |
media: stm32: dcmipp: byteproc: disable compose for all bayers
Avoid possibility to perform compose on all frames which mbus code is within the bayer range or jpeg format.
Fixes: 822c72eb1519 ("med
media: stm32: dcmipp: byteproc: disable compose for all bayers
Avoid possibility to perform compose on all frames which mbus code is within the bayer range or jpeg format.
Fixes: 822c72eb1519 ("media: stm32: dcmipp: add bayer 10~14 bits formats") Cc: stable@vger.kernel.org Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
show more ...
|
| 222f1279 | 19-Dec-2025 |
Alain Volmat <alain.volmat@foss.st.com> |
media: stm32: dcmipp: bytecap: clear all interrupts upon stream stop
Ensure that there are no pending interrupts after we have stopped the pipeline. Indeed, it could happen that new interrupt has be
media: stm32: dcmipp: bytecap: clear all interrupts upon stream stop
Ensure that there are no pending interrupts after we have stopped the pipeline. Indeed, it could happen that new interrupt has been generated during the stop_streaming processing hence clear them in order to avoid getting a new interrupt right from the start of a next start_streaming.
Fixes: 28e0f3772296 ("media: stm32-dcmipp: STM32 DCMIPP camera interface driver") Cc: stable@vger.kernel.org Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
show more ...
|
| 5954ad7d | 10-Jun-2025 |
Arnd Bergmann <arnd@arndb.de> |
media: st-delta: avoid excessive stack usage
Building with a reduced stack warning limit shows that delta_mjpeg_decode() copies a giant structure to the stack each time but only uses three of its me
media: st-delta: avoid excessive stack usage
Building with a reduced stack warning limit shows that delta_mjpeg_decode() copies a giant structure to the stack each time but only uses three of its members:
drivers/media/platform/st/sti/delta/delta-mjpeg-dec.c: In function 'delta_mjpeg_decode': drivers/media/platform/st/sti/delta/delta-mjpeg-dec.c:427:1: error: the frame size of 1296 bytes is larger than 1280 bytes [-Werror=frame-larger-than=]
Open-code the passing of the structure members that are actually used here.
Fixes: 433ff5b4a29b ("[media] st-delta: add mjpeg support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
show more ...
|