Guennadi Liakhovetski <g.liakhovet...@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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to