Skip to content

Add and implement gen_pool_dma_alloc()

Nicolin Chen alsa-devel linux-arm-kernel linux-media lkml 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 2/28 patches 5 repliesIn review
  2. v1 posting 1/28 patches 0 repliesSuperseded

Patches in v1 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8lib/genalloc: add a helper function for DMA buffer allocationinclude/linux/genalloc.h lib/genalloc.c+30 -00 replies
2/8ARM: davinci: use gen_pool_dma_alloc() to sram.carch/arm/mach-davinci/sram.c+1 -80 replies
3/8dma: mmp_tdma: use gen_pool_dma_alloc() to allocate descriptordrivers/dma/mmp_tdma.c+1 -61 reply
4/8coda: use gen_pool_dma_alloc() to allocate iram bufferdrivers/media/platform/coda.c+2 -30 replies
5/8uio: uio_pruss: use gen_pool_dma_alloc() to allocate sram memorydrivers/uio/uio_pruss.c+2 -41 reply
6/8ALSA: memalloc: use gen_pool_dma_alloc() to allocate iram buffersound/core/memalloc.c+1 -51 reply
7/8ASoC: davinci: use gen_pool_dma_alloc() in davinci-pcm.csound/soc/davinci/davinci-pcm.c+1 -21 reply
8/8ASoC: pxa: use gen_pool_dma_alloc() to allocate dma buffersound/soc/pxa/mmp-pcm.c+1 -21 reply

Reviews trailers per patch

5 of 8 patches have a Reviewed-by or Acked-by.

PatchMark BrownTakashi IwaiVinod KoulGreg Kroah-Hartman
1/8
2/8
3/8A-b
4/8
5/8A-b
6/8A-b
7/8A-b
8/8A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH][RESEND 0/8] Add and implement gen_pool_dma_alloc()

Previously, we don't have a specific gen_pool_alloc() for DMA usage; Instead, we need to use gen_pool_virt_to_phys() to convert the addr returned from gen_pool_alloc(). So each implementation of this has duplicated code. Thus add new helper function -- gen_pool_dma_alloc().

After gen_pool_dma_alloc() is introduced, we can replace the original combination of gen_pool_alloc()+gen_pool_virt_to_phys() with this new helper function. Thus this patch implement the helper function to all the current drivers which use gen_pool_virt_to_phys().

!!-------------------important------------------!!

The later 7 patches need all related driver owner to test. We can here define a simple rule:
1, If one driver owner or maintainer doesn't like the mofication
to his/her driver, just let me know. I would drop that patch.
2, If there's a bug and issue found after patch-testing, please
reply the mail so that I can fix and refine the patch.
3, If one driver owner or maintainer is too busy and doesn't have
bandwidth to test the patch, I would drop that patch from this series. We can reimplement it till there's someone test it.

!!-------------------current progress-----------!!

lib/genalloc: [Okay]
ARM: davinci: [Untested]
dma: mmp_tdma: [Untested]
[media] coda: [Untested]
uio: uio_pruss: [Untested]
ALSA: memalloc: [Tested] by Nicolin Chen with i.MX6Q SabreSD
ASoC: davinci: [Untested]
ASoC: pxa: use [Untested]

Nicolin Chen (8):
lib/genalloc: add a helper function for DMA buffer allocation
ARM: davinci: use gen_pool_dma_alloc() to sram.c
dma: mmp_tdma: use gen_pool_dma_alloc() to allocate descriptor [media] coda: use gen_pool_dma_alloc() to allocate iram buffer
uio: uio_pruss: use gen_pool_dma_alloc() to allocate sram memory
ALSA: memalloc: use gen_pool_dma_alloc() to allocate iram buffer
ASoC: davinci: use gen_pool_dma_alloc() in davinci-pcm.c
ASoC: pxa: use gen_pool_dma_alloc() to allocate dma buffer

 arch/arm/mach-davinci/sram.c    |  9 +--------
 drivers/dma/mmp_tdma.c          |  7 +------
 drivers/media/platform/coda.c   |  5 ++---
 drivers/uio/uio_pruss.c         |  6 ++----
 include/linux/genalloc.h        |  2 ++
 lib/genalloc.c                  | 28 ++++++++++++++++++++++++++++
 sound/core/memalloc.c           |  6 +-----
 sound/soc/davinci/davinci-pcm.c |  3 +--
 sound/soc/pxa/mmp-pcm.c         |  3 +--
 9 files changed, 39 insertions(+), 30 deletions(-)
Signature · 1 line
1.8.4