Skip to content

Commit

Permalink
dma: fix ipu_idmac.c to not discard the last queued buffer
Browse files Browse the repository at this point in the history
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: Agustin Ferrin Pozuelo <gatoguan-os@yahoo.com>
Tested-by: Agustin Ferrin Pozuelo <gatoguan-os@yahoo.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Guennadi Liakhovetski authored and Dan Williams committed May 12, 2009
1 parent 4f005db commit ad567ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/dma/ipu/ipu_idmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,8 @@ static irqreturn_t idmac_interrupt(int irq, void *dev_id)
/* Other interrupts do not interfere with this channel */
spin_lock(&ichan->lock);
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;

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

0 comments on commit ad567ff

Please sign in to comment.