If buf unmap is executed without successful kernel unmap
the vmap counter mismatches. Check for error scenarios in
kernel unmap function and ignore buf unmap if not necessary.
Change-Id: I3c5835dcdfe05db4baaa5cf904995ed8f89e9cfe
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
While allocating and importing ION buffers, make sure to check
for probe complete flag before proceeding instead of checking for
the flag AND smmu_enabled flag. This way the restriction will be
centralized for either types of targets with and without SMMU.
Change-Id: I558e19724d1002a602377a636e274bc90ca8262d
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Device pointer needs to be stored during probe of msm_audio_ion
platform driver so that the same can be used later for mapping
dma_buff allocated for different clients. Store device pointer
for both cases where SMMU may be present or absent on a particular
platform.
Change-Id: I3d3d4ad254d41ac9490ff0dc98b95ffbc3e5042d
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
ION memory allocator is used for audio use cases even on targets
without SMMU. Add support for ION on those targets where ADSP
might not have an SMMU in front of it.
Change-Id: Iaacbd66edb32c8ee7c14a5ab291abe54960725b8
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Update logic for pointer meant to hold virtual address of ION
buffers allocated, so that the pointer is available across
function boundary.
Change-Id: I7849498b9ccf0cbd7c357fa926eea6c4b65a194f
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Use the newly added dma_buf_vmap API for mapping a dma_buf
to kernel address space.
Change-Id: Idacada71eb827b4af96a793a180456ae910e30e8
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Update the API call sequence for cache operation for dma_buf.
Change-Id: I79ee36d083460b47c792120a857e92f26d9e3fe2
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Add support for querying ION flags for dma_buf and for cache ops
on dma_buf with CACHED Flag on.
Change-Id: I219e564c477af8ba3b8676db1c9555a2b5b9ebab
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Between Linux-4.9 and Linux-4.14, upstream has updated the
ION APIs significantly to make ION ready to bring out of
staging folder. This has changed the way ION and dma_buf
APIs used to work together for allocating, mapping and
deallocating ION buffers.
Update MSM Audio ION wrapper functions used by audio drivers
to reflect these ION API changes as per upstream ION.
Change-Id: I63097e147a397aa3a538f69ac88b6fb10871c3dc
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Based on where the code is synced the driver should allow
both static and dynamic linked compilation.
Also remove __exit for modules loaded from another common
init/exit functions.
Change-Id: Ib58f152002aba3af4446f9bbd9b82c279212bd0a
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Variable 'vm_page_prot' has different types in different
ARM platforms. Using macro "pgprot_val" to handle it to
fix compilation issue for sdxpoorwills targets.
Change-Id: Ic7b8de9860759cc56812e7a3ffb1aaea2b6779f9
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
Switch to DLKM for all audio kernel modules.
Change-Id: I6a96023a21f655f873531af9ace81f2b01eb0f58
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>