linux-stable/drivers/dma
Serge Semin 6d9459d040 dmaengine: dw: Activate FIFO-mode for memory peripherals only
CFGx.FIFO_MODE field controls a DMA-controller "FIFO readiness" criterion.
In other words it determines when to start pushing data out of a DW
DMAC channel FIFO to a destination peripheral or from a source
peripheral to the DW DMAC channel FIFO. Currently FIFO-mode is set to one
for all DW DMAC channels. It means they are tuned to flush data out of
FIFO (to a memory peripheral or by accepting the burst transaction
requests) when FIFO is at least half-full (except at the end of the block
transfer, when FIFO-flush mode is activated) and are configured to get
data to the FIFO when it's at least half-empty.

Such configuration is a good choice when there is no slave device involved
in the DMA transfers. In that case the number of bursts per block is less
than when CFGx.FIFO_MODE = 0 and, hence, the bus utilization will improve.
But the latency of DMA transfers may increase when CFGx.FIFO_MODE = 1,
since DW DMAC will wait for the channel FIFO contents to be either
half-full or half-empty depending on having the destination or the source
transfers. Such latencies might be dangerous in case if the DMA transfers
are expected to be performed from/to a slave device. Since normally
peripheral devices keep data in internal FIFOs, any latency at some
critical moment may cause one being overflown and consequently losing
data. This especially concerns a case when either a peripheral device is
relatively fast or the DW DMAC engine is relatively slow with respect to
the incoming data pace.

In order to solve problems, which might be caused by the latencies
described above, let's enable the FIFO half-full/half-empty "FIFO
readiness" criterion only for DMA transfers with no slave device involved.
Thanks to the commit 99ba8b9b0d ("dmaengine: dw: Initialize channel
before each transfer") we can freely do that in the generic
dw_dma_initialize_chan() method.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200731200826.9292-3-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-08-17 11:58:31 +05:30
..
bestcomm
dw dmaengine: dw: Activate FIFO-mode for memory peripherals only 2020-08-17 11:58:31 +05:30
dw-axi-dmac dmaengine: virt-dma: Add missing locking 2019-12-26 10:04:18 +05:30
dw-edma dmaengine: dw-edma: support local dma device transfer semantics 2020-05-04 14:24:27 +05:30
fsl-dpaa2-qdma dmaengine: fsl-dpaa2-qdma: remove set but not used variable 'dpaa2_qdma' 2020-03-06 19:04:55 +05:30
hsu
idxd dmaengine: idxd: clear misc interrupt cause after read 2020-08-17 10:49:11 +05:30
ioat pci-v5.9-changes 2020-08-07 18:48:15 -07:00
ipu
mediatek dmaengine: mediatek: mtk-hsdma: Fix formatting in 'struct mtk_hsdma_pdesc' doc block 2020-07-15 17:50:46 +05:30
ppc4xx dmaengine: ppc4xx: Use scnprintf() for avoiding potential buffer overflow 2020-03-11 15:10:45 +05:30
qcom treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
sf-pdma iov_iter: Move unnecessary inclusion of crypto/hash.h 2020-06-30 09:34:23 -04:00
sh dmaengine: sh: usb-dmac: set tx_result parameters 2020-06-24 11:34:53 +05:30
ti dmaengine: ti: k3-psil-j721e: Add entries for 2nd port of MCU SA2UL 2020-08-17 10:50:31 +05:30
xilinx dmaengine: xilinx: dpdma: Add debugfs support 2020-08-17 11:20:49 +05:30
acpi-dma.c dmaengine: acpi: Drop double check for ACPI companion device 2020-06-24 11:28:41 +05:30
altera-msgdma.c dmaengine: altera-msgdma: Fix struct documentation blocks 2020-07-15 17:50:46 +05:30
amba-pl08x.c
at_hdmac.c dmaengine: at_hdmac: Repair parameter misspelling and demote non-kerneldoc headers 2020-07-15 17:50:46 +05:30
at_hdmac_regs.h dmaengine: at_hdmac: Replace zero-length array with flexible-array 2020-05-13 20:25:16 +05:30
at_xdmac.c dmaengine: at_xdmac: Replace zero-length array with flexible-array 2020-05-13 20:25:41 +05:30
bcm-sba-raid.c dmaengine: bcm-sba-raid: Replace zero-length array with flexible-array member 2020-02-13 20:15:35 +05:30
bcm2835-dma.c dmaengine: bcm2835: do not call vchan_vdesc_fini() with lock held 2019-12-26 10:04:18 +05:30
coh901318.c dmaengine: coh901318: Fix a double lock bug in dma_tc_handle() 2020-02-24 21:59:45 +05:30
coh901318.h
coh901318_lli.c
dma-axi-dmac.c dmaengine: axi-dmac: add a check for devm_regmap_init_mmio 2019-12-11 16:11:50 +05:30
dma-jz4780.c dmaengine updates for v5.6-rc1 2020-01-27 10:55:50 -08:00
dmaengine.c dmaengine: Introduce DMA-device device_caps callback 2020-07-27 14:30:55 +05:30
dmaengine.h dmaengine: Create debug directories for DMA devices 2020-03-11 14:56:14 +05:30
dmatest.c Merge branch 'for-linus' into fixes 2020-08-05 19:02:07 +05:30
ep93xx_dma.c dmaengine: ep93xx_dma: Provide some missing struct attribute documentation 2020-07-15 17:50:46 +05:30
fsl-edma-common.c dmaengine: fsl-edma: fix wrong tcd endianness for big-endian cpu 2020-07-06 14:49:22 +05:30
fsl-edma-common.h dmaengine: fsl-edma-common: correct DSIZE_32BYTE 2020-07-06 10:24:49 +05:30
fsl-edma.c dmaengine: fsl-edma: Fix NULL pointer exception in fsl_edma_tx_handler 2020-06-24 13:05:01 +05:30
fsl-qdma.c dmaengine: Extend NXP QDMA driver to check transmission errors 2020-07-17 11:50:03 +05:30
fsl_raid.c
fsl_raid.h
fsldma.c dmaengine: fsldma: Mark expected switch fall-through 2019-08-20 19:42:34 -05:00
fsldma.h
hisi_dma.c dmaengine: hisilicon: Use struct_size() in devm_kzalloc() 2020-06-24 11:26:23 +05:30
idma64.c
idma64.h
img-mdc-dma.c
imx-dma.c
imx-sdma.c Merge branch 'for-linus' into fixes 2020-08-05 19:02:07 +05:30
iop-adma.c dmaengine: iop-adma: Function parameter documentation must adhere to correct formatting 2020-07-15 17:50:47 +05:30
iop-adma.h
k3dma.c dmaengine: k3dma: Avoid null pointer traversal 2019-12-23 13:21:14 +05:30
Kconfig Merge branch 'topic/xilinx' into fixes 2020-08-07 11:13:37 +05:30
lpc18xx-dmamux.c
Makefile dmaengine: uniphier-xdmac: Add UniPhier external DMA controller driver 2020-03-02 14:54:34 +05:30
mcf-edma.c dmaengine: mcf-edma: Fix NULL pointer exception in mcf_edma_tx_handler 2020-06-24 13:06:15 +05:30
mic_x100_dma.c
mic_x100_dma.h
milbeaut-hdmac.c dmaengine: Replace zero-length array with flexible-array 2020-06-15 23:08:30 -05:00
milbeaut-xdmac.c dmaengine: Replace zero-length array with flexible-array 2020-06-15 23:08:30 -05:00
mmp_pdma.c dmaengine: mmp_pdma: Demote obvious misuse of kerneldoc to standard comment blocks 2020-07-15 17:50:46 +05:30
mmp_tdma.c dmaengine: mmp_tdma: share the IRQ line 2020-06-16 21:59:01 +05:30
moxart-dma.c dmaengine: Replace zero-length array with flexible-array 2020-06-15 23:08:30 -05:00
mpc512x_dma.c
mv_xor.c
mv_xor.h
mv_xor_v2.c dmaengine: mv_xor_v2: Supply some missing 'struct mv_xor_v2_device' attribute docs 2020-07-15 17:50:47 +05:30
mxs-dma.c
nbpfaxi.c dmaengine: nbpfaxi: Provide some missing attribute docs and split out slave info 2020-07-15 17:50:47 +05:30
of-dma.c dmaengine: of-dma: Fix misspellings/formatting issues in some function headers 2020-07-15 17:50:46 +05:30
owl-dma.c dmaengine: Actions: Add support for S700 DMA engine 2020-07-27 14:43:08 +05:30
pch_dma.c dmaengine: pch_dma: use generic power management 2020-08-17 10:23:55 +05:30
pl330.c dmaengine: pl330: Demote obvious misuse of kerneldoc to standard comment block 2020-07-15 17:50:46 +05:30
plx_dma.c dmaengine: plx-dma: Implement descriptor submission 2020-01-15 19:40:51 +05:30
pxa_dma.c
s3c24xx-dma.c dmaengine: s3c24xx-dma: fix spelling mistake "to" -> "too" 2020-01-23 17:03:25 +05:30
sa11x0-dma.c dmaengine: sa11x0: Replace zero-length array with flexible-array member 2020-02-19 17:48:40 +05:30
sirf-dma.c
sprd-dma.c dmaengine: sprd: Set request pending flag when DMA controller is active 2020-03-23 11:38:24 +05:30
st_fdma.c iov_iter: Move unnecessary inclusion of crypto/hash.h 2020-06-30 09:34:23 -04:00
st_fdma.h
ste_dma40.c dmaengine: ste_dma40: Supply 2 missing struct attribute descriptions 2020-07-15 17:50:46 +05:30
ste_dma40_ll.c
ste_dma40_ll.h
stm32-dma.c dmaengine: stm32-dma: direct mode support through device tree 2020-04-27 21:40:12 +05:30
stm32-dmamux.c dmaengine: stm32-dmamux: driver defers probe for clock and reset 2020-02-24 22:22:44 +05:30
stm32-mdma.c dmaengine: stm32-mdma: use vchan_terminate_vdesc() in .terminate_all 2020-02-24 22:20:01 +05:30
sun4i-dma.c dmaengine: sun4i-dma: Demote obvious misuse of kerneldoc to standard comment blocks 2020-07-15 17:50:47 +05:30
sun6i-dma.c
tegra20-apb-dma.c dmaengine: tegra-apb: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00
tegra210-adma.c dmaengine: tegra210-adma: Fix runtime PM imbalance on error 2020-06-24 15:11:39 +05:30
timb_dma.c dmaengine: Replace zero-length array with flexible-array 2020-06-15 23:08:30 -05:00
TODO
txx9dmac.c
txx9dmac.h
uniphier-mdmac.c dmaengine: uniphier-mdmac: replace zero-length array with flexible-array member 2020-02-13 20:15:57 +05:30
uniphier-xdmac.c iov_iter: Move unnecessary inclusion of crypto/hash.h 2020-06-30 09:34:23 -04:00
virt-dma.c dmaengine updates for v5.6-rc1 2020-01-27 10:55:50 -08:00
virt-dma.h dmaengine: virt-dma: Add missing locking around list operations 2019-12-26 10:04:18 +05:30
xgene-dma.c dmaengine: xgene-dma: Provide descriptions for 'dev' and 'clk' in device's ddata 2020-07-15 17:50:47 +05:30
zx_dma.c dmaengine: zx: remove: removed dmam_pool_destroy 2019-11-14 12:16:53 +05:30