From: Jonathan Corbet Date: Fri, 16 Mar 2012 22:14:54 +0000 (-0300) Subject: [media] marvell-cam: Don't signal multiple frame completions in scatter/gather mode X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f2354dd180755e25369167eda5de2c226d59fb1d;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [media] marvell-cam: Don't signal multiple frame completions in scatter/gather mode There is only one frame known to the DMA engine in scatter/gather mode, but it still tells us that any or all of frames 1-3 are done at each completion interrupt. Avoid the creation of junk frames by being sure to only "complete" one on each interrupt. Signed-off-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/marvell-ccic/mcam-core.c b/drivers/media/video/marvell-ccic/mcam-core.c index e46a72af63c4..036db2746407 100644 --- a/drivers/media/video/marvell-ccic/mcam-core.c +++ b/drivers/media/video/marvell-ccic/mcam-core.c @@ -1697,6 +1697,8 @@ int mccic_irq(struct mcam_camera *cam, unsigned int irqs) if (irqs & (IRQ_EOF0 << frame)) { mcam_frame_complete(cam, frame); handled = 1; + if (cam->buffer_mode == B_DMA_sg) + break; } /* * If a frame starts, note that we have DMA active. This