]> git.baikalelectronics.ru Git - kernel.git/commit
staging: android: ion: Use CMA APIs directly
authorLaura Abbott <labbott@redhat.com>
Tue, 18 Apr 2017 18:27:05 +0000 (11:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Apr 2017 18:41:12 +0000 (20:41 +0200)
commit93ecdbb33c671df89b4a1caa115ac8c6e195fcb3
tree038f782b7abb1290f34fad60659e9dede9d681ad
parentbab9a9cb7bc2b560ee00ba8f9feb25209353b5d0
staging: android: ion: Use CMA APIs directly

When CMA was first introduced, its primary use was for DMA allocation
and the only way to get CMA memory was to call dma_alloc_coherent. This
put Ion in an awkward position since there was no device structure
readily available and setting one up messed up the coherency model.
These days, CMA can be allocated directly from the APIs. Switch to using
this model to avoid needing a dummy device. This also mitigates some of
the caching problems (e.g. dma_alloc_coherent only returning uncached
memory).

Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/Kconfig
drivers/staging/android/ion/Makefile
drivers/staging/android/ion/ion_cma_heap.c
drivers/staging/android/ion/ion_heap.c