Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad567ffb authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Dan Williams
Browse files

dma: fix ipu_idmac.c to not discard the last queued buffer



This also fixes the case of a single queued buffer, for example, when taking a
single frame snapshot with the mx3_camera driver.

Reported-by: default avatarAgustin Ferrin Pozuelo <gatoguan-os@yahoo.com>
Tested-by: default avatarAgustin Ferrin Pozuelo <gatoguan-os@yahoo.com>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 4f005dbe
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1272,7 +1272,8 @@ static irqreturn_t idmac_interrupt(int irq, void *dev_id)
	/* Other interrupts do not interfere with this channel */
	/* Other interrupts do not interfere with this channel */
	spin_lock(&ichan->lock);
	spin_lock(&ichan->lock);
	if (unlikely(chan_id != IDMAC_SDC_0 && chan_id != IDMAC_SDC_1 &&
	if (unlikely(chan_id != IDMAC_SDC_0 && chan_id != IDMAC_SDC_1 &&
		     ((curbuf >> chan_id) & 1) == ichan->active_buffer)) {
		     ((curbuf >> chan_id) & 1) == ichan->active_buffer &&
		     !list_is_last(ichan->queue.next, &ichan->queue))) {
		int i = 100;
		int i = 100;


		/* This doesn't help. See comment in ipu_disable_channel() */
		/* This doesn't help. See comment in ipu_disable_channel() */