]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commit
dma-coherent: Add alloc_shift to dma_coherent_mem
authorSri Krishna chowdary <schowdary@nvidia.com>
Fri, 30 Dec 2016 10:09:34 +0000 (15:39 +0530)
committerSri Krishna Chowdary <schowdary@nvidia.com>
Fri, 6 Jan 2017 10:50:05 +0000 (02:50 -0800)
commitb05525f5bf8ea8fe43b12017d4ceababcd200140
treeec4972d96b4098a8e9a928c633f9966c9643c70c
parent7ec5a325e8e1c39850423d5fe1f7bb3d171a3e61
dma-coherent: Add alloc_shift to dma_coherent_mem

Allow clients to set allocation chunk size so that they can
use it and fix the lowest unit of allocation. For example,
vpr need not really need small chunks like 4KB, it can use
bigger chunks like 64KB or even higher.

Currently allow only power of 2 allocation chunk size as it
is suffices our requirements and it is faster to multiply
power of 2 numbers by using shift operations.

JIRA TMM-101

Change-Id: I15f34667b3767e0828e35e11504ed42b64a57144
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/1278661
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
drivers/base/dma-coherent.c
include/asm-generic/dma-coherent.h