]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: stm32: dcmipp: bytecap: clear all interrupts upon stream stop
authorAlain Volmat <alain.volmat@foss.st.com>
Fri, 19 Dec 2025 14:30:35 +0000 (15:30 +0100)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Fri, 16 Jan 2026 13:08:52 +0000 (14:08 +0100)
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>
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-bytecap.c

index 1c1b6b48918ee26f245d4cf99086473c44e74123..b18e273ef4a3e6e8339f5d4d2c01899594e46d5b 100644 (file)
@@ -512,6 +512,9 @@ static void dcmipp_bytecap_stop_streaming(struct vb2_queue *vq)
        /* Disable pipe */
        reg_clear(vcap, DCMIPP_P0FSCR, DCMIPP_P0FSCR_PIPEN);
 
+       /* Clear any pending interrupts */
+       reg_write(vcap, DCMIPP_CMFCR, DCMIPP_CMIER_P0ALL);
+
        spin_lock_irq(&vcap->irqlock);
 
        /* Return all queued buffers to vb2 in ERROR state */