Messages in this thread | | | From | Robert Jarzmik <> | Subject | Re: [PATCH v3 4/4] media: pxa_camera: conversion to dmaengine | Date | Sun, 30 Aug 2015 21:34:54 +0200 |
| |
Guennadi Liakhovetski <g.liakhovetski@gmx.de> writes:
>> + last_buf = list_entry(pcdev->capture.prev, >> + struct pxa_buffer, vb.queue); > > You can use list_last_entry() Ok.
>> + last_status = dma_async_is_tx_complete(pcdev->dma_chans[chan], >> + last_buf->cookie[chan], >> + NULL, &last_issued); >> + if (camera_status & overrun && >> + last_status != DMA_COMPLETE) { >> + dev_dbg(dev, "FIFO overrun! CISR: %x\n", >> + camera_status); >> + pxa_camera_stop_capture(pcdev); >> + list_for_each_entry(buf, &pcdev->capture, vb.queue) >> + pxa_dma_add_tail_buf(pcdev, buf); > > Why have you added this loop? Is it a bug in the current implementation or > is it only needed with the switch to dmaengine? It's a consequence of the switch.
With dmaengine, a dmaengine_terminate_all() removes all queued txs. It is therefore necessary to requeue them. In the previous implementation, the chaining was still good, and it was "enough" to just queue the first videobuffer : the other buffers would follow by chaining.
Cheers.
-- Robert
| |