Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1215968
| From | Robert Jarzmik <robert.jarzmik@free.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 4/4] media: pxa_camera: conversion to dmaengine |
| Date | 2015-08-30 21:40 +0200 |
| Message-ID | <q3gCo-1FJ-43@gated-at.bofh.it> (permalink) |
| References | <pRFwt-Xh-5@gated-at.bofh.it> <pRFwt-Xh-11@gated-at.bofh.it> <q3anf-11w-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH v3 4/4] media: pxa_camera: conversion to dmaengine Guennadi Liakhovetski <g.liakhovetski@gmx.de> - 2015-08-30 15:00 +0200 Re: [PATCH v3 4/4] media: pxa_camera: conversion to dmaengine Robert Jarzmik <robert.jarzmik@free.fr> - 2015-08-30 21:40 +0200
csiph-web