aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/platform/atmel
diff options
context:
space:
mode:
authorGravatar Eugen Hristev <eugen.hristev@microchip.com> 2022-05-03 10:44:14 +0200
committerGravatar Mauro Carvalho Chehab <mchehab@kernel.org> 2022-05-13 11:02:21 +0200
commite0cf8b9e3a52116905ff15cf9d0e68728da1542c (patch)
tree5e0ce1c32fcec0aa315fd7cdbaeb93f525ac1ae7 /drivers/media/platform/atmel
parentmedia: vsp1: Fix offset calculation for plane cropping (diff)
downloadlinux-e0cf8b9e3a52116905ff15cf9d0e68728da1542c.tar.gz
linux-e0cf8b9e3a52116905ff15cf9d0e68728da1542c.tar.bz2
linux-e0cf8b9e3a52116905ff15cf9d0e68728da1542c.zip
media: atmel: atmel-isc-base: use streaming status when queueing buffers
During experiments with libcamera, it looks like vb2_is_streaming returns true before our start streaming is called. Order of operations is streamon -> queue -> start_streaming ISC would have started the DMA immediately when a buffer is being added to the vbqueue if the queue is streaming. It is more safe to start the DMA after the start streaming of the driver is called. Thus, even if vb2queue is streaming, add the buffer to the dma queue of the driver instead of actually starting the DMA process, if the start streaming has not been called yet. Tho achieve this, we have to use vb2_start_streaming_called instead of vb2_is_streaming. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/platform/atmel')
-rw-r--r--drivers/media/platform/atmel/atmel-isc-base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/atmel/atmel-isc-base.c b/drivers/media/platform/atmel/atmel-isc-base.c
index db15770d5b88..d2cc6c99984f 100644
--- a/drivers/media/platform/atmel/atmel-isc-base.c
+++ b/drivers/media/platform/atmel/atmel-isc-base.c
@@ -442,7 +442,7 @@ static void isc_buffer_queue(struct vb2_buffer *vb)
spin_lock_irqsave(&isc->dma_queue_lock, flags);
if (!isc->cur_frm && list_empty(&isc->dma_queue) &&
- vb2_is_streaming(vb->vb2_queue)) {
+ vb2_start_streaming_called(vb->vb2_queue)) {
isc->cur_frm = buf;
isc_start_dma(isc);
} else