dmaengine: ti: k3-udma: Add support for burst_size configuration for mem2mem
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Wed, 13 Jan 2021 11:49:22 +0000 (13:49 +0200)
committerVinod Koul <vkoul@kernel.org>
Wed, 13 Jan 2021 16:30:37 +0000 (22:00 +0530)
commit046d679b5b8194184efb9f0fe6e6e3f9e06d2c90
tree9e28511ed0e5fdf805bfabcf32924c0bc1340abc
parent660343d063f7b7151a8c679d91ebe13cf40ad866
dmaengine: ti: k3-udma: Add support for burst_size configuration for mem2mem

The UDMA and BCDMA can provide higher throughput if the burst_size of the
channel is changed from it's default (which is 64 bytes) for Ultra-high
and high capacity channels.

This performance benefit is even more visible when the buffers are aligned
with the burst_size configuration.

The am654 does not have a way to change the burst size, but it is using
64 bytes burst, so increasing the copy_align from 8 bytes to 64 (and
clients taking that into account) can increase the throughput as well.

Numbers gathered on j721e:
echo 8000000 > /sys/module/dmatest/parameters/test_buf_size
echo 2000 > /sys/module/dmatest/parameters/timeout
echo 50 > /sys/module/dmatest/parameters/iterations
echo 1 > /sys/module/dmatest/parameters/max_channels

Prior this patch:       ~1.3 GB/s
After this patch:       ~1.8 GB/s
 with 1 byte alignment: ~1.7 GB/s

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Tested-by: Kishon Vijay Abraham I <kishon@ti.com>
Link: https://lore.kernel.org/r/20210113114923.9231-3-peter.ujfalusi@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/ti/k3-udma.c