linux-mips
[Top] [All Lists]

Re: [PATCH] mips: Add dma_mmap_coherent()

To: Grant Grundler <grundler@parisc-linux.org>
Subject: Re: [PATCH] mips: Add dma_mmap_coherent()
From: Takashi Iwai <tiwai@suse.de>
Date: Wed, 27 Aug 2008 07:42:06 +0200
Cc: Joel Soete <soete.joel@scarlet.be>, "James.Bottomley" <James.Bottomley@HansenPartnership.com>, linux-mips <linux-mips@linux-mips.org>, ralf <ralf@linux-mips.org>, linux-parisc <linux-parisc@vger.kernel.org>
In-reply-to: <20080826210118.GA26235@colo.lackof.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <K6047O$07C3A675C0E02FC7BE973C0D5DEF9AAA@scarlet.be> <s5hy72pmefh.wl%tiwai@suse.de> <48B0678E.9010208@scarlet.be> <s5hej4blrx7.wl%tiwai@suse.de> <20080826210118.GA26235@colo.lackof.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (Sanjō) APEL/10.6 Emacs/22.2 (x86_64-suse-linux-gnu) MULE/5.0 (SAKAKI)
At Tue, 26 Aug 2008 15:01:18 -0600,
Grant Grundler wrote:
> 
> On Tue, Aug 26, 2008 at 05:25:24PM +0200, Takashi Iwai wrote:
> ...
> > Now updated my git tree:
> >     
> > http://git.kernel.org/?p=linux/kernel/git/tiwai/sound-2.6.git;a=shortlog;h=topic/dma-fix
> > I'll post each patch again if preferred.
> 
> +#ifdef CONFIG_SND_COHERENT_DMA
>  #define SNDRV_DMA_TYPE_DEV_SG          3       /* generic device SG-buffer */
> +#else
> +#define SNDRV_DMA_TYPE_DEV_SG  SNDRV_DMA_TYPE_DEV /* no SG-buf support */
> +#endif
> 
> Hi Takashi,
> I had to look at a previous patch to figure out CONFIG_SND_COHERENT_DMA
> is an arch dependent flag:
> 
> +config SND_COHERENT_DMA
> +       def_bool y
> +       depends on !PPC32 || !NOT_COHERENT_CACHE
> +       depends on !ARM
> +       depends on !MIPS
> +       depends on !PARISC
> 
> In general, I don't expect this to be a compile time option.

Right now it has to be a compile-time option because
- dma_mmap_coherent() isn't implemented in every architecture (thus
  fails to build), and 
- pages allocated via dma_mmap_coherent() aren't always suitable for
  SG-mapping.

> I'm wondering if extending the DMA API to provide an
> interface for user space to also be DMA coherent.

Yes, this would be really nice.

> Maybe something to talk about at Linux Plumbers Conf
> or kernel summit...

Agreed.

> > Do you guys see any pending issues?  I'd love to merge these patches
> > into the upstream for 2.6.28.
> 
> SPARC/SPARC64 usually falls into the same category as parisc/mips.

Right.  I guess SH*, too.
But, a missing piece doesn't mean to stop pushing this :)
We can implement on other archs occasionally based on the existing
works.


thanks,

Takashi

<Prev in Thread] Current Thread [Next in Thread>