linux-stable/drivers/dma
Martin Povišer 5f1541666a dmaengine: apple-admac: Allocate cache SRAM to channels
[ Upstream commit 568aa6dd64 ]

There's a previously unknown part of the controller interface: We have
to assign SRAM carveouts to channels to store their in-flight samples
in. So, obtain the size of the SRAM from a read-only register and divide
it into 2K blocks for allocation to channels. The FIFO depths we
configure will always fit into 2K.

(This fixes audio artifacts during simultaneous playback/capture on
multiple channels -- which looking back is fully accounted for by having
had the caches in the DMA controller overlap in memory.)

Fixes: b127315d9a ("dmaengine: apple-admac: Add Apple ADMAC driver")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20221019132324.8585-2-povik+lin@cutebit.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:26:31 +01:00
..
bestcomm treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 2) 2022-06-10 14:51:35 +02:00
dw dmaengine updates for v6.0-rc1 2022-08-04 18:44:38 -07:00
dw-axi-dmac dmaengine updates for v6.0-rc1 2022-08-04 18:44:38 -07:00
dw-edma dmaengine: dw-edma: Remove runtime PM support 2022-10-21 12:39:26 +02:00
fsl-dpaa2-qdma
hsu
idxd dmaengine: idxd: Do not enable user type Work Queue without Shared Virtual Addressing 2022-11-16 10:04:10 +01:00
ioat dmaengine: ioat: stop mod_timer from resurrecting deleted timer in __cleanup() 2022-10-21 12:38:53 +02:00
ipu
lgm dmaengine: lgm: Fix an error handling path in intel_ldma_probe() 2022-07-06 10:53:25 +05:30
mediatek dmaengine: mediatek: mtk-hsdma: Fix typo 'the the' in comment 2022-07-26 22:06:05 +05:30
ppc4xx treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_406.RULE 2022-06-10 14:51:37 +02:00
ptdma
qcom dmaengine: qcom-adm: fix wrong calling convention for prep_slave_sg 2022-10-21 12:37:41 +02:00
sf-pdma dmaengine: sf-pdma: Add multithread support for a DMA channel 2022-07-06 18:10:34 +05:30
sh dmaengine: sh: rz-dmac: Add device_synchronize callback 2022-07-26 18:27:50 +05:30
ti dmaengine: ti: k3-udma-glue: fix memory leak when register device fail 2022-11-16 10:03:57 +01:00
xilinx dmaengine: zynqmp_dma: Typecast with enum to fix the coverity warning 2022-09-05 11:54:50 +05:30
acpi-dma.c
altera-msgdma.c dmaengine: altera-msgdma: Fixed some inconsistent function name descriptions 2022-07-06 22:00:06 +05:30
amba-pl08x.c dmaengine: fix typos in comments 2022-07-06 10:50:43 +05:30
apple-admac.c dmaengine: apple-admac: Allocate cache SRAM to channels 2022-12-31 13:26:31 +01:00
at_hdmac.c dmaengine: at_hdmac: Check return code of dma_async_device_register 2022-11-16 10:04:14 +01:00
at_hdmac_regs.h dmaengine: at_hdmac: Fix at_lli struct definition 2022-11-16 10:04:12 +01:00
at_xdmac.c dmaengine updates for v6.0-rc1 2022-08-04 18:44:38 -07:00
bcm-sba-raid.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 2) 2022-06-10 14:51:35 +02:00
bcm2835-dma.c
dma-axi-dmac.c dmaengine: axi-dmac: check cache coherency register 2022-07-26 22:05:20 +05:30
dma-jz4780.c dmaengine: jz4780: fix typo in comment 2022-07-06 10:51:43 +05:30
dmaengine.c dmaengine: remove DMA_MEMCPY_SG once again 2022-06-27 12:01:40 +05:30
dmaengine.h
dmatest.c dmaengine updates for v6.0-rc1 2022-08-04 18:44:38 -07:00
ep93xx_dma.c dmaengine: ep93xx: Fix typo in comments 2022-07-01 21:50:23 +05:30
fsl-edma-common.c dmaengine: fsl-edma: remove redundant assignment to pointer last_sg 2022-07-01 22:09:16 +05:30
fsl-edma-common.h
fsl-edma.c
fsl-qdma.c
fsl_raid.c
fsl_raid.h
fsldma.c
fsldma.h
hisi_dma.c dmaengine: hisilicon: Add multi-thread support for a DMA channel 2022-10-21 12:38:43 +02:00
idma64.c
idma64.h
img-mdc-dma.c
imx-dma.c dmaengine: imx-dma: Cast of_device_get_match_data() with (uintptr_t) 2022-07-21 18:08:35 +05:30
imx-sdma.c dmaengine updates for v6.0-rc1 2022-08-04 18:44:38 -07:00
iop-adma.c
iop-adma.h
k3dma.c
Kconfig dmaengine: apple-admac: Add Apple ADMAC driver 2022-06-09 12:20:20 +05:30
lpc18xx-dmamux.c
Makefile dmaengine: apple-admac: Add Apple ADMAC driver 2022-06-09 12:20:20 +05:30
mcf-edma.c
milbeaut-hdmac.c
milbeaut-xdmac.c
mmp_pdma.c
mmp_tdma.c
moxart-dma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 2) 2022-06-10 14:51:35 +02:00
mpc512x_dma.c
mv_xor.c
mv_xor.h
mv_xor_v2.c dmaengine: mv_xor_v2: Fix a resource leak in mv_xor_v2_remove() 2022-11-16 10:03:57 +01:00
mxs-dma.c dmaengine: mxs: use platform_driver_register 2022-10-21 12:37:40 +02:00
nbpfaxi.c
of-dma.c
owl-dma.c dmaengine: owl: fix typo in comment 2022-07-06 10:50:43 +05:30
pch_dma.c
pl330.c dmaengine: pl330: Fix lockdep warning about non-static key 2022-07-06 10:49:28 +05:30
plx_dma.c
pxa_dma.c dmaengine: pxa_dma: use platform_get_irq_optional 2022-11-16 10:03:57 +01:00
s3c24xx-dma.c dmaengine: s3c24xx: fix typo in comment 2022-07-06 10:51:12 +05:30
sa11x0-dma.c
sprd-dma.c dmaengine: sprd: Cleanup in .remove() after pm_runtime_get_sync() failed 2022-07-26 18:20:49 +05:30
st_fdma.c
st_fdma.h
ste_dma40.c dmaengine: ste_dma40: fix typo in comment 2022-07-06 10:54:08 +05:30
ste_dma40_ll.c
ste_dma40_ll.h
stm32-dma.c dmaengine: stm32-dma: fix potential race between pause and resume 2022-11-16 10:03:58 +01:00
stm32-dmamux.c
stm32-mdma.c dmaengine: stm32-mdma: Remove dead code in stm32_mdma_irq_handler() 2022-06-16 09:04:09 -07:00
sun4i-dma.c dmaengine: sun4i: Set the maximum segment size 2022-07-05 18:34:26 +05:30
sun6i-dma.c
tegra20-apb-dma.c
tegra186-gpc-dma.c dmaengine: tegra: Add terminate() for Tegra234 2022-07-26 18:12:21 +05:30
tegra210-adma.c
timb_dma.c
TODO
txx9dmac.c
txx9dmac.h
uniphier-mdmac.c
uniphier-xdmac.c
virt-dma.c
virt-dma.h
xgene-dma.c