From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Zhao Subject: Re: [PATCH 01/11] dma: imx-sdma: make channel0 operations atomic Date: Fri, 27 Apr 2012 19:26:56 +0800 Message-ID: <20120427112655.GS28063@b20223-02.ap.freescale.net> References: <1335510185-7906-1-git-send-email-richard.zhao@freescale.com> <1335510185-7906-2-git-send-email-richard.zhao@freescale.com> <1335514900.31825.132.camel@vkoul-udesk3> <20120427084109.GO28063@b20223-02.ap.freescale.net> <1335522130.31825.135.camel@vkoul-udesk3> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: Content-Disposition: inline In-Reply-To: <1335522130.31825.135.camel@vkoul-udesk3> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Vinod Koul Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org, kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org, w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org, dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, lrg-l0cyMroinI0@public.gmane.org, Lothar =?iso-8859-1?Q?Wa=DFmann?= List-Id: linux-i2c@vger.kernel.org On Fri, Apr 27, 2012 at 03:52:10PM +0530, Vinod Koul wrote: > On Fri, 2012-04-27 at 16:41 +0800, Richard Zhao wrote: > > On Fri, Apr 27, 2012 at 01:51:40PM +0530, Vinod Koul wrote: > > > On Fri, 2012-04-27 at 15:02 +0800, Richard Zhao wrote: > > > > device_prep_dma_cyclic may be call in audio trigger function which is > > > > atomic context, so we make it atomic too. > > > No this is wrong behavior. You should not call dma prepare functions in > > > any of the sound trigger calls. It would make sense to move this in > > > sound prepare callback. > > Then, could you please doc it somewhere? I think I'm not the only one > > confused. > See the soc-dmaengine.c for correct behavior! Do you mean sound/soc/soc-dmaengine-pcm.c ? It's where it calls dma prepare in trigger function. snd_dmaengine_pcm_trigger --> dmaengine_pcm_prepare_and_submit --> dmaengine_prep_dma_cyclic > I can document only dmaengine behavior (which is already there) Sure, I mean, can you doc in include/linux/dmaengine.h that dmaengine_prep_xxx may sleep? > and not > how each subsystem should use this. People is subsystems need to see how > to use the dmaengine APIs sanely Thanks Richard > > > -- > ~Vinod > >