From: robert.jarzmik@free.fr (Robert Jarzmik)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 1/4] dma: mmp_pdma: only complete one transaction from dma_do_tasklet()
Date: Sun, 25 Aug 2013 03:15:09 +0200 [thread overview]
Message-ID: <878uzqr2oy.fsf@free.fr> (raw)
In-Reply-To: <52131E40.5040304@gmail.com> (Daniel Mack's message of "Tue, 20 Aug 2013 09:44:00 +0200")
Daniel Mack <zonque@gmail.com> writes:
> Hi Xiang,
>
> On 20.08.2013 04:27, Xiang Wang wrote:
>> I think we would not run into the situation that there is a descriptor
>> with ENDIRQEN set in the middle of the running chain.
>>
>> in mmp_pdma.c:
>> mmp_pdma_tx_submit() -> append_pending_queue() ->
>> tail->desc.dcmd &= ~DCMD_ENDIRQEN;
>>
>> So in the pending list (same for running list), only the last descriptor
>> will have ENDIRQEN set.
>
> Right, thanks for noting that.
>
> But is that what we want? I think that clearing of the ENDIRQEN bit
> needs to be removed then, because if we really have multiple
> transactions running, then we want to get an interrupt whenever _any_ of
> it is completed.
At least that's something pxa_camera.c needs, ie. have the dma interrupt handler
called as soon as the _first_ of many transactions queued on the same channel is
finished.
This is necessary to declare the video capture buffer as "done", which is
signaled by a terminated DMA transaction. And of course, in video recording,
another one is beginning on the channel, while the finished video buffer can be
safely unmapped and handed over to userland.
> Hence, would you agree that we should remove that "tail->desc.dcmd &=
> ~DCMD_ENDIRQEN;" modification in order to make the above logic work?
Same question on my side.
My understanding is that the current bebaviour violates the dmaengine
specification (Documentation/dmaengine.txt, chapter 5, "On completion of each
DMA operation, the next in queue is started and a tasklet triggered. The tasklet
will then call the client driver completion callback routine for notification,
if set.)
Cheers.
--
Robert
next prev parent reply other threads:[~2013-08-25 1:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-16 17:05 [PATCH v4 0/4] dma: pdma: cyclic, residue, DMA_PRIVATE Daniel Mack
2013-08-16 17:05 ` [PATCH v4 1/4] dma: mmp_pdma: only complete one transaction from dma_do_tasklet() Daniel Mack
2013-08-20 2:27 ` Xiang Wang
2013-08-20 7:44 ` Daniel Mack
2013-08-25 1:15 ` Robert Jarzmik [this message]
2013-08-16 17:05 ` [PATCH v4 2/4] dma: mmp_pdma: add support for cyclic DMA descriptors Daniel Mack
2013-08-16 17:05 ` [PATCH v4 3/4] dma: mmp_pdma: add support for residue reporting Daniel Mack
2013-08-21 11:35 ` Xiang Wang
2013-08-21 11:52 ` Andy Shevchenko
2013-08-21 12:03 ` Daniel Mack
2013-08-21 12:08 ` Andy Shevchenko
2013-08-25 16:11 ` Vinod Koul
2013-08-25 17:01 ` Russell King - ARM Linux
2013-08-25 16:48 ` Vinod Koul
2013-08-25 18:06 ` Russell King - ARM Linux
2013-08-26 6:07 ` Robert Jarzmik
2013-08-21 11:55 ` Daniel Mack
2013-08-16 17:05 ` [PATCH v4 4/4] dma: mmp_pdma: set DMA_PRIVATE Daniel Mack
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878uzqr2oy.fsf@free.fr \
--to=robert.jarzmik@free.fr \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.