From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Takashi Iwai <tiwai@suse.de>,
linux-arch@vger.kernel.org,
Gerhard Pircher <gerhard_pircher@gmx.net>,
Parisc List <linux-parisc@vger.kernel.org>
Subject: Re: [PATCH 3/8] parisc: implement dma_mmap_coherent()
Date: Fri, 10 Jul 2009 18:30:50 +0000 [thread overview]
Message-ID: <1247250650.3936.48.camel@mulgrave.site> (raw)
In-Reply-To: <20090710181620.GA1019@flint.arm.linux.org.uk>
On Fri, 2009-07-10 at 19:16 +0100, Russell King wrote:
> On Fri, Jul 10, 2009 at 03:11:29PM +0000, James Bottomley wrote:
> > The design of coherent memory was for memory based device mailboxes
> > managed by the kernel ... trying to give userspace coherent access to
> > the same mailbox is problematic because it gives a direct way for the
> > process to interfere with a device function ... shouldn't whatever
> > you're trying to do be better accomplished by using an API to control
> > the device and keeping the coherent mailbox fully in the kernel address
> > space?
>
> As far as sound DMA goes, it's not about mailboxes. It's about a circular
> buffer which you want the device to DMA from direct to/from the DAC/ADC
> and have the application write/read data directly to/from that same
> buffer.
But that makes it sound like ordinary streaming DMA from a device to
user space ... that's what the dma_map_xx APIs are already designed to
handle: I don't understand why you need coherent memory for this (which
can be a scarce resource on some platforms).
> Without this, you end up having to copy the sound data - at something
> around 200KB/s from applications into a driver managed buffer, which is
> quite an unnecessary overhead for the CPU.
Why? The dma_map_xx API is designed to be zero copy.
James
next prev parent reply other threads:[~2009-07-10 18:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <s5hprc8n0od.wl%tiwai@suse.de>
[not found] ` <s5hljmwn0iw.wl%tiwai@suse.de>
2009-07-10 15:11 ` [PATCH 3/8] parisc: implement dma_mmap_coherent() James Bottomley
2009-07-10 18:16 ` Russell King
2009-07-10 18:30 ` James Bottomley [this message]
2009-07-10 18:39 ` Russell King
2009-07-10 18:59 ` James Bottomley
2009-07-17 14:13 ` Takashi Iwai
2009-07-17 19:16 ` James Bottomley
2009-07-19 12:23 ` Takashi Iwai
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=1247250650.3936.48.camel@mulgrave.site \
--to=james.bottomley@hansenpartnership.com \
--cc=gerhard_pircher@gmx.net \
--cc=linux-arch@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
--cc=tiwai@suse.de \
/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