Commit fa8bbe0a authored by Songjun Wu's avatar Songjun Wu Committed by Mauro Carvalho Chehab

[media] atmel-isc: start dma in some scenario

If a new vb buf is added to vb queue, the queue is
empty and steaming, dma should be started.
Signed-off-by: default avatarSongjun Wu <songjun.wu@microchip.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 37e90a22
...@@ -617,7 +617,13 @@ static void isc_buffer_queue(struct vb2_buffer *vb) ...@@ -617,7 +617,13 @@ static void isc_buffer_queue(struct vb2_buffer *vb)
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&isc->dma_queue_lock, flags); spin_lock_irqsave(&isc->dma_queue_lock, flags);
list_add_tail(&buf->list, &isc->dma_queue); if (!isc->cur_frm && list_empty(&isc->dma_queue) &&
vb2_is_streaming(vb->vb2_queue)) {
isc->cur_frm = buf;
isc_start_dma(isc->regmap, isc->cur_frm,
isc->current_fmt->reg_dctrl_dview);
} else
list_add_tail(&buf->list, &isc->dma_queue);
spin_unlock_irqrestore(&isc->dma_queue_lock, flags); spin_unlock_irqrestore(&isc->dma_queue_lock, flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment