[PATCH] Sam440ep support
Takashi Iwai
tiwai at suse.de
Tue May 6 21:14:22 EST 2008
At Tue, 06 May 2008 20:12:27 +1000,
Benjamin Herrenschmidt wrote:
>
>
> On Tue, 2008-05-06 at 11:16 +0200, Gerhard Pircher wrote:
> > I can't answer this question. *ducked* :-) Takashi?
> >
> > FYI: I posted the results of the test with Takashi's dma_mmap_coherent
> > patch here:
> > http://ozlabs.org/pipermail/linuxppc-dev/2006-June/024078.html
> >
> > On the other side it looks like this problem does not only affect
> > ALSA.
> > As far as I can tell also some V4L(2) drivers have a problem with
> > mmaping
> > non coherent DMA allocations, but I'm not sure (it's a long time since
> > I
> > did some tests with video cards on my AmigaOne).
> >
> > Naturally I can do some tests, if you or Takashi come up with a new
> > patch.
>
> Time that we sort that stuff out once for all..
>
> sg allocations are usually lists of page, so virt_to_page shouldn't be a
> problem in the first place, though we still need some way to get the
> right prot attributes.
The problem is that ALSA SG buffer is composed from pages allocated
via dma_alloc_coherent(), and the pages are retrieved via virt_to_page
for DMA pages, as found in sound/core/sgbuf.c.
I didn't care about SG-buffer cases in my initial patch, and it's a
bit messy. The current code requires page lists becasue it calls
vmap() to get a virtually linear buffer.
Takashi
More information about the Linuxppc-dev
mailing list