aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-10-17char: adsprpc: allow non iommu instancesfastrpcSrinivas Kandagatla
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
2018-10-17char: adsprc: add IOCTL_ALLOC/FREE_DMA_BUFF supportSrinivas Kandagatla
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
2018-10-17char: adsprc: make downstream code compilable on linuxSrinivas Kandagatla
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
2018-10-16char: adsprpc: add missing Kconfig and Makefile changesSrinivas Kandagatla
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
2018-10-16arm64: dts: msm8996: add fastrpc nodeSrinivas Kandagatla
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
2018-10-16msm: adsprpc: cache buffers only of small sizesTharun Kumar Merugu
Add buffers to cache list only if their size is less than the threshold. Larger buffers will be freed. Change-Id: I4eb1109679a4813ffd422b2d0c68f4dc2904bb98 Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: adsprpc: disable bind/unbind of fastrpc driver from userspaceTharun Kumar Merugu
Set attribute to disable binding and unbinding of fastrpc driver from userspace. Change-Id: I3f81850fd07e77251599907aa3b4bc93c1ee9224 Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: adsprpc: validate remote parameters pointerTharun Kumar Merugu
Verify that remote parameters pointer is not NULL in get_args. Change-Id: I0789e8ea875221de5809598419bc7f842aa3e22e Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: adsprpc: validate dma physical address after mappingTharun Kumar Merugu
Verify that buffer physical address is within the CMA heap range to ensure contiguous memory for remote subsystems without SMMU stage 1 enabled. Change-Id: Ia17fba6177ad9b2ebc8c7c38560d8f70025aaad9 Acked-by: Viswanatham Paduchuri <vpaduchu@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: adsprpc: skip CPU cache synchronization for non-coherent buffersTharun Kumar Merugu
Skip synchronization of CPU cache for fastrpc buffers registered as non-coherent, by DMA mapping them with the appropriate attribute as the fastrpc driver will take care of cache maintenance. Change-Id: I1e067270345eaa320ede76fc12ec450c341ca87a Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: adsprpc: allocate remote heap memory with no kernel mapTharun Kumar Merugu
Allocate memory for remote heap use case with NO_KERNEL_MAPPING attribute set. Change-Id: Ia2ef7862d6afa5b119240d40151fc812e4363643 Acked-by: Himateja Reddy <hmreddy@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: ADSPRPC: handle static PDR during daemon start and killTharun Kumar Merugu
Set the signal only if the msg.pid variable is not NULL. Change-Id: Iac70d2db43782985282d7fe00efb607fc7cd81b9 Acked-by: Krishnaiah Tadakamalla <ktadakam@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: adsprpc: make all RPMSG transcations thread-safeTharun Kumar Merugu
Protect RPMSG transcations from fastrpc to all remote subsystems, using a separate mutex for each channel. Change-Id: If6f0a1153112a77aca121542d27db3df1209700f Acked-by: Viswanatham Paduchuri <vpaduchu@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: adsprpc: grow remote user heap with kernel allocated memoryTharun Kumar Merugu
Allocate memory to grow the remote subsystem's user heap, in kernel instead of mapping memory from userspace. Change-Id: I0b260ea5e3175d5887761b425e312a8275a18a02 Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: adsprpc: donate memory to remote subsystem from kernelTharun Kumar Merugu
Allocate the initial memory donated to remote subsystem in the kernel instead of mapping memory allocated in userspace. Change-Id: I79c1f40d426e271403afa67514714fe6af26cf4e Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: ADSPRPC: Enable Sensors PDR supportTharun Kumar Merugu
Register for ADSP Sensors PDR notifications and handle Sensors PDR by notifying all the Sensor static PD clients. Change-Id: I17859f6b5c9ec8ae6a325172ddfab9860bf896f5 Acked-by: Himateja Reddy <hmreddy@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: adsprpc: remove debug message while getting device infoTharun Kumar Merugu
Remove printing of error message when getting device info fails, to avoid flooding of kernel logs Change-Id: If160c581159dff7c689207d5e62b885eef67e35d Acked-by: Amol Mahesh <amahesh@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16adsprpc: Do not print fastrpc channel opened messagesTharun Kumar Merugu
Adsprpc channel opened messages are flooding kernel log, so do not print channel openend messages. Change-Id: I862766d0ab9352d5718d9540a19f943050f772e5 Acked-by: Chenna Kesava Raju <chennak@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: adsprpc: DSP device node to provide restricted access to ADSP/SLPITharun Kumar Merugu
Support 2 sepearate device nodes with this change, one for ADSP/SLPI and another for CDSP. Change-Id: I2a09ebfdeccd9a092b1a3602c249b2727ec91c92 Acked-by: Amol Mahesh <amahesh@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: ADSPRPC: Fix array out of bounds issueShiraz Hashim
Array is being accessed out of bounds. Fix this. Change-Id: I2e108099bc7ac262050f76375169c37e2b663e21 Signed-off-by: Shiraz Hashim <shashim@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: ADSPRPC: Use right DMA APIs to flush userspace buffersTharun Kumar Merugu
Remove the use of dmac_flush_range for userspace buffers and use DMA buffer begin and end CPU access APIs for cleaning and invalidating the cache. Change-Id: Ice73eafac840bd1cabee0a2bfc8a641832a7d0c8 Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: ADSPRPC: Enable Audio PDR supportTharun Kumar Merugu
Register for ADSP Audio PDR notifications and handle Audio PDR by notifying all the Audio static PD clients. change-Id: I97f3d2ebb204a276c4266c0d300ff96935e3082e Acked-by: Himateja Reddy <hmreddy@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16adsprpc: Disable dynamic loading from HLOS_PHYSPOOL for qcs405Tharun Kumar Merugu
Disable dynamic loading of shared objects from HLOS_PHYSPOOL. Change-Id: I01f78dbd81de97482e6f32be30229ce4fda91496 Acked-by: Chenna Kesava Raju <chennak@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: adsprpc: use right DMA bit mask for 32 and 64 bit systemsTharun Kumar Merugu
Use right length of DMA bit mask for 32 and 64 bit systems by typecasting it to the appropriate data type Change-Id: Ie7346fe950408e510a6b529b25f0dc57eb3ee438 Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: ADSPRPC: Unmap remote heap buffer only for ADSP SSRTharun Kumar Merugu
Unmap remote heap buffer only for ADSP SSR, as remote heap feature is available only on ADSP. Change-Id: I9abff20cfdcc4588a3a377e73d38d3ea91316d25 Acked-by: Himateja Reddy <hmreddy@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: ADSPRPC: Restrict access to hyp_assign_phys callsTharun Kumar Merugu
Block hyp_assign_phys calls, if the restrict access flag is defined in the device specific file. Change-Id: Ie546e748169dda51af4ab5f017581bbda2cc7081 Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: ADSPRPC: handle 32 bit supportTharun Kumar Merugu
Handle 32 bit support without any truncation. Add IOCTL calls for map and unmap for 64 bit separately. Change-Id: I077a0b4345a6c21a88d7a500aa5c9faf7193f620 Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: adsprpc: Avoid race condition during map creation and freeTharun Kumar Merugu
Avoid race condition among concurrent fastrpc threads while creating and removing memory mappings. Change-Id: Ibf9ab0d4d19137804dbff4237a973895c410330c Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: ADSPRPC: FastRPC buffer attribute for no mapTharun Kumar Merugu
Add new FastRPC buffer attribute for dmahandle support without mapping. Change-Id: I6317c972d0881968ab01ecd40acf6908b381d801 Acked-by: Viswanatham Paduchuri <vpaduchu@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: adsprpc: decrease length of IOVA mask for SDSP devicesTharun Kumar Merugu
Two bits are sufficient to append all valid stream IDs for SDSP fastrpc context banks for sm8150 as a software workaround. This will eliminate the possibility of invalid IOVA generation. Change-Id: I66a23d291a40331c0693a8dd31013b8a1ea545c7 Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: adsprpc: duplicate session info for shared context banksTharun Kumar Merugu
Duplicate fastrpc session contexts for shared context banks depending on the maximum number of sessions allowed. Change-Id: I7028e70836e3ec32b789aefd0e9ef08dab87d881 Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: adsprpc: validate VMID before hyp assignTharun Kumar Merugu
Verify that VMID is not NULL before hyp assign call in init process and memory map on remote subsystem. Change-Id: I10a96b4efde61c5aa572748dda3596fb2301c6b2 Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: adsprpc: workaround to enable smmu stage 1 for slpiTharun Kumar Merugu
sm8150 has a hardware bug in the slpi-smmu interface where the stream ID is not removed from the IOVA. This software workaround modifies the start address of the IOVA address space for fastrpc slpi context banks. Change-Id: I5368749b6f21ee33bf0c93b77403f2d34520718b Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16adsprpc: validate VMID before hyp_assign during unmapTharun Kumar Merugu
Validate VMID before doing hyp_assign_phys during unmap on DSP. Change-Id: I9c41416c9df12bd993bff59378ea66d31cda3686 Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16adsprpc: optimize number of SGL entries during map createTharun Kumar Merugu
Set proper DMA segment size and boundary during mem map creation to reduce number of SGL entries to 1. Change-Id: I92392e62766c83ab49a4ec217e5762d5601af425 Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: ADSPRPC: Use ID in response to get context pointerTharun Kumar Merugu
Send context ID in rpc header instead of context pointer. Validate context ID received in response and get context pointer. Change-Id: I9cfd10d0c1b25c3085b8e15c7ca1c8ff214bf10d Acked-by: Viswanatham Paduchuri <vpaduchu@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16adsprpc: update mmap list nodes before mmap freeTharun Kumar Merugu
Update mmap list links before every mmap free. Change-Id: Icb612a329e8defd65414842bae20f459c02364b9 Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16adsprpc: hyp assign only for valid VMIDsTharun Kumar Merugu
During fastrpc process init, do hyp_assign_phys only if the VMID is valid Change-Id: Idf475916c869efd3c67cce1323d106236d460876 Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16adsprpc: Increment map size for each entry in SGLTharun Kumar Merugu
Incrementally update the memory map size from each entry in the DMA scatter-gather list. Change-Id: Ia44d5140df3de385ca0324b540c8ad715f5f087b Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16adsprpc: enable lazy mapping of DMA buffersTharun Kumar Merugu
Set delayed unmapping attribute while doing memory mapping for improved fastrpc latency. Change-Id: Icb86b4b5777b698081a71686c5b1ef484a085b91 Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16adsprpc: Compilation error fix fastrpc driverTharun Kumar Merugu
Remove unused variable. Change-Id: I1f0afec8e0576378e2f42478f09a23c0bd8af0af Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: ADSPRPC: unmap fd failure to find mapTharun Kumar Merugu
Handle error returned from finding map by fd and unmap. Change-Id: If5515f1a292c468c87481a2917642c920c43652b Acked-by: Viswanatham Paduchuri <vpaduchu@qti.qualcomm.com> Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16msm: ADSPRPC: Driver changes for ION upgradeTharun Kumar Merugu
ION has changed so that it is now just a memory allocator for memory intended for sharing with userspace. fastrpc driver will now use ION apis for allocation and DMABUF apis for operations like mapping and cache maintanance on the ION buffers. Change-Id: I2f5c8f274ec2eedf577e626a262eeabd88dd0950 Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16adsprpc: Enable RPMSG and remove GLINK ProtocolTharun Kumar Merugu
Replace glink with RPMSG interface and use RPMSG pulgin instead of the GLINK Protocol. Change-Id: Idbeda369907e94ae475493a7cfb02dc5991a724e Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16adsprpc: Enable fastrpc driverTharun Kumar Merugu
Add fastrpc driver files, which provide a communication mechanism that allows for clients to make remote method invocations across processor boundary to applications DSP processor. Change-Id: Ifd82dfd390634a8b57201aa255d9753818452188 Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org> Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2018-10-16iommu: armsmmu: set iommu ops for rpmsg busSrinivas Kandagatla
On Qualcomm SoCs, ADSP exposes many functions like audio and others. These services need iommu access to allocate any memory for the DSP. As these drivers are childeren of rpmsg bus, able to allocate memory from iommus is basic requirement. So set arm smmu iommu ops for this bus type. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
2018-10-16rpmsg: core: make rpmsg bus DMA capableSrinivas Kandagatla
Many of the rpmsg clients like audio drivers need to allocate dma memory. Make this bus DMA capable so that the child devices can use dma apis. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
2018-10-16rpmsg: core: export rpmsg bus typeSrinivas Kandagatla
Export rpmsg bus type so that iommu drivers iommu ops to rpmsg bus type. On Qualcomm SoCs ADSP exposes functions like audio and other which need iommu access, as these drivers are part of rpmsg bus, able to allocate memory from iommus is basic requirement. So expose this bus so that iommu drivers can add ops to this. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
2018-09-26ASoC: qdsp6: q6asm-dai: Add support to compress offloadSrinivas Kandagatla
This patch adds MP3 playback support in q6asm dais, adding other codec support should be pretty trivial. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
2018-09-26ASoC: qdsp6: q6asm: add support to MP3 formatSrinivas Kandagatla
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>