From: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>
To: Vignesh Raghavendra <vigneshr@ti.com>, Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
Linux ARM Mailing List <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] dmaengine: ti: k3-udma: Avoid false error msg on chan teardown
Date: Sun, 20 Feb 2022 22:12:07 +0200 [thread overview]
Message-ID: <58fe0934-4853-714c-600d-9a2d86df5bc8@gmail.com> (raw)
In-Reply-To: <20220215044112.161634-1-vigneshr@ti.com>
Hi Vignesh,
On 15/02/2022 06:41, Vignesh Raghavendra wrote:
> In cyclic mode, there is no additional descriptor pushed to collect
> outstanding data on channel teardown. Therefore no need to wait for this
> descriptor to come back.
>
> Without this terminating aplay cmd outputs false error msg like:
> [ 116.402800] ti-bcdma 485c0100.dma-controller: chan1 teardown timeout!
are you sure it is aplay? It is MEM_TO_DEV, we only use the flush
descriptor for DEV_TO_MEM. MEM_TO_DEV can 'disconnect' from the
peripheral to flush out the FIFO.
I have not seen this on am654, j721e. I can not recall seeing this on
the capture side either.
The cyclic TR should be able to drain the DEV_TO_MEM by itself and the
TR should terminate.
> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
> ---
> drivers/dma/ti/k3-udma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
> index 9abb08d353ca0..c9a1b2f312603 100644
> --- a/drivers/dma/ti/k3-udma.c
> +++ b/drivers/dma/ti/k3-udma.c
> @@ -3924,7 +3924,7 @@ static void udma_synchronize(struct dma_chan *chan)
>
> vchan_synchronize(&uc->vc);
>
> - if (uc->state == UDMA_CHAN_IS_TERMINATING) {
> + if (uc->state == UDMA_CHAN_IS_TERMINATING && !uc->cyclic) {
> timeout = wait_for_completion_timeout(&uc->teardown_completed,
> timeout);
> if (!timeout) {
--
Péter
next prev parent reply other threads:[~2022-02-20 20:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-15 4:41 [PATCH] dmaengine: ti: k3-udma: Avoid false error msg on chan teardown Vignesh Raghavendra
2022-02-20 20:12 ` Péter Ujfalusi [this message]
2022-02-28 9:22 ` Vignesh Raghavendra
2022-02-28 11:18 ` Vignesh Raghavendra
2022-03-01 19:31 ` Péter Ujfalusi
2023-08-07 15:40 ` Francesco Dolcini
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=58fe0934-4853-714c-600d-9a2d86df5bc8@gmail.com \
--to=peter.ujfalusi@gmail.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vigneshr@ti.com \
--cc=vkoul@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox