From: Vinod Koul <vkoul@kernel.org>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: dan.j.williams@intel.com, dmaengine@vger.kernel.org,
andriy.shevchenko@linux.intel.com
Subject: Re: [PATCH] dmaengine: dmatest: Add support for completion polling
Date: Tue, 4 Jun 2019 18:15:27 +0530 [thread overview]
Message-ID: <20190604124527.GG15118@vkoul-mobl> (raw)
In-Reply-To: <793f9f48-0609-4aa5-2688-bf30525e229c@ti.com>
On 03-06-19, 10:05, Peter Ujfalusi wrote:
> > I think the main question is how polling for completion should be
> > handled when client does not request for completion interrupt, thus we
> > will have no callback in the DMA driver when the transfer is completed.
> >
> > If DMA_PREP_INTERRUPT is set for the tx_descriptor then the polling will
> > wait until the DMA driver internally receives the interrupt that the
> > transfer is done and sets the cookie to completed state.
> >
> > However if DMA_PREP_INTERRUPT is not set, the DMA driver will not get
> > notification from the HW that is the transfer is done, the only way to
> > know is to check the tx_status and based on the residue (if it is 0 then
> > it is done) decide what to tell the client.
> >
> > Should the client call dmaengine_terminate_* after the polling returned
> > unconditionally to free up the descriptor?
>
> This is how omap-dma is handling the polled memcpy support.
Yes that is a good question. Even if the client does not set
DMA_PREP_INTERRUPT would there be no interrupt generated by controller
on txn completion? If not how will next txn be submitted to the
hardware.
I think we should view DMA_PREP_INTERRUPT from client pov, but
controller cannot get away with disabling interrupts IMO.
Assuming I had enough caffeine before I thought process, then client would
poll descriptor status using cookie and should free up once the cookie
is freed, makes sense?
--
~Vinod
next prev parent reply other threads:[~2019-06-04 12:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 8:37 [PATCH] dmaengine: dmatest: Add support for completion polling Peter Ujfalusi
2019-05-31 6:54 ` Peter Ujfalusi
2019-06-03 7:05 ` Peter Ujfalusi
2019-06-04 12:45 ` Vinod Koul [this message]
2019-06-04 13:35 ` Peter Ujfalusi
2019-06-10 7:04 ` Vinod Koul
2019-06-10 11:12 ` Peter Ujfalusi
2019-06-11 4:47 ` Vinod Koul
2019-06-11 13:41 ` Peter Ujfalusi
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=20190604124527.GG15118@vkoul-mobl \
--to=vkoul@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=peter.ujfalusi@ti.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).