linux-stable/drivers/dma/dw
Serge Semin 0ed725d1f5 dmaengine: dw: Discard dlen from the dev-to-mem xfer width calculation
Indeed in case of the DMA_DEV_TO_MEM DMA transfers it's enough to take the
destination memory address and the destination master data width into
account to calculate the CTLx.DST_TR_WIDTH setting of the memory
peripheral. According to the DW DMAC IP-core Databook 2.18b (page 66,
Example 5) at the and of a DMA transfer when the DMA-channel internal FIFO
is left with data less than for a single destination burst transaction,
the destination peripheral will enter the Single Transaction Region where
the DW DMA controller can complete a block transfer to the destination
using single transactions (non-burst transaction of CTLx.DST_TR_WIDTH
bytes). If there is no enough data in the DMA-channel internal FIFO for
even a single non-burst transaction of CTLx.DST_TR_WIDTH bytes, then the
channel enters "FIFO flush mode". That mode is activated to empty the FIFO
and flush the leftovers out to the memory peripheral. The flushing
procedure is simple.  The data is sent to the memory by means of a set of
single transaction of CTLx.SRC_TR_WIDTH bytes. To sum up it's redundant to
use the LLPs length to find out the CTLx.DST_TR_WIDTH parameter value,
since each DMA transfer will be completed with the CTLx.SRC_TR_WIDTH bytes
transaction if it is required.

We suggest to remove the LLP entry length from the statement which
calculates the memory peripheral DMA transaction width since it's
redundant due to the feature described above. By doing so we'll improve
the memory bus utilization and speed up the DMA-channel performance for
DMA_DEV_TO_MEM DMA-transfers.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200731200826.9292-4-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-08-17 11:58:31 +05:30
..
acpi.c dmaengine: dw: Register ACPI DMA controller for PCI that has companion 2020-06-16 21:54:47 +05:30
core.c dmaengine: dw: Discard dlen from the dev-to-mem xfer width calculation 2020-08-17 11:58:31 +05:30
dw.c dmaengine: dw: Activate FIFO-mode for memory peripherals only 2020-08-17 11:58:31 +05:30
idma32.c dmaengine: dw: Don't pollute CTL_LO on iDMA 32-bit 2019-01-07 17:57:13 +05:30
internal.h dmaengine: dw: platform: Split OF helpers to separate module 2019-08-21 09:41:28 +05:30
Kconfig dmaengine: dw: convert to SPDX identifiers 2019-01-07 17:57:13 +05:30
Makefile dmaengine: dw: Replace 'objs' by 'y' 2020-06-16 21:54:47 +05:30
of.c dmaengine: dw: Introduce max burst length hw config 2020-07-27 14:30:55 +05:30
pci.c dmaengine: dw: Register ACPI DMA controller for PCI that has companion 2020-06-16 21:54:47 +05:30
platform.c dmaengine: dw: platform: Mark 'hclk' clock optional 2019-10-14 13:51:44 +05:30
regs.h dmaengine: dw: Introduce max burst length hw config 2020-07-27 14:30:55 +05:30