All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qiao Zhou <zhouqiao@marvell.com>
To: Mark Brown <broonie@kernel.org>
Cc: Vinod Koul <vinod.koul@intel.com>,
	"tiwai@suse.de" <tiwai@suse.de>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	"zhangfei.gao@gmail.com" <zhangfei.gao@gmail.com>
Subject: Re: [PATCH] ASoC: dmaengine: add runtime status checking in dmaengine_pcm_dma_complete
Date: Fri, 14 Jun 2013 17:10:07 +0800	[thread overview]
Message-ID: <51BADDEF.6080501@marvell.com> (raw)
In-Reply-To: <20130612143944.GF1403@sirena.org.uk>

On 06/12/2013 10:39 PM, Mark Brown wrote:
> On Wed, Jun 12, 2013 at 02:15:24PM +0200, Lars-Peter Clausen wrote:
>> On 06/12/2013 09:43 AM, Vinod Koul wrote:
>
>>> Yes you need to call dmaengine_terminate_all(). But even then we might have
>>> trasaction in flight or some dma controllers cant abort immediately (need to
>>> wait till FIFOs are flushed etc). In general it is a good practice to call
>>> dma_sync_wait() before you tear down the client.
>>> If you still see an issue, then it a buggy driver :)
>
>> Even though if the driver can't abort the transfer immediately, I'd still
>> expect to not see any calls to the descriptors callback after
>> dmaengine_terminate_all() has been called.
>
> It'd certainly be much less surprising - if something's terminated it
> really oughtn't to be generating callbacks.
>
>> We should probably still call dma_sync_wait() though before we free any of
>> the DMA transfer buffers. But I guess this will open a whole new can of
>> bugs, since none of the drivers actually seem to mark a descriptor as
>> completed if the transfer is aborted using dmaengine_terminate_all()
>
> Oh joy.
>
Mark, Lars, Vinod

Indeed it's a DMA handling issue, and I'm preparing to implement a 
proper handling in DMA driver. thanks a lot for these suggestions.
-- 

Best Regards
Qiao

  reply	other threads:[~2013-06-14  9:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1370606249-19955-1-git-send-email-zhouqiao@marvell.com>
2013-06-07 14:34 ` [PATCH] ASoC: dmaengine: add runtime status checking in dmaengine_pcm_dma_complete Mark Brown
2013-06-09 13:37   ` Lars-Peter Clausen
2013-06-09 13:51     ` Lars-Peter Clausen
2013-06-10  9:31       ` Mark Brown
2013-06-10 10:46         ` Lars-Peter Clausen
2013-06-12  7:43           ` Vinod Koul
2013-06-12 12:15             ` Lars-Peter Clausen
2013-06-12 14:39               ` Mark Brown
2013-06-14  9:10                 ` Qiao Zhou [this message]
     [not found]   ` <51B2EC7A.8090309@marvell.com>
2013-06-10  9:30     ` Mark Brown

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=51BADDEF.6080501@marvell.com \
    --to=zhouqiao@marvell.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lars@metafoo.de \
    --cc=tiwai@suse.de \
    --cc=vinod.koul@intel.com \
    --cc=zhangfei.gao@gmail.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 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.