aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoy Zou <joy.zou@nxp.com>2022-08-10 14:56:57 +0800
committerBruce Ashfield <bruce.ashfield@gmail.com>2022-08-11 23:09:14 -0400
commitd8e44601fed4348ba333ac7999ef373159030ac9 (patch)
treeb22f7e37cb10e80a17379c32b990d78a1c3693c8
parent6e8f35be495a80585cac01e0552f6cee28b1840b (diff)
downloadlinux-yocto-v5.15/standard/preempt-rt/nxp-sdk-5.15/nxp-soc.tar.gz
linux-yocto-v5.15/standard/preempt-rt/nxp-sdk-5.15/nxp-soc.tar.bz2
linux-yocto-v5.15/standard/preempt-rt/nxp-sdk-5.15/nxp-soc.zip
LF-5479: dmaengine: imx-sdma: sdma memcpy test failv5.15/standard/preempt-rt/nxp-sdk-5.15/nxp-soc
commit 8f1bdf630736fccb27bb01f7c94721e272dd512d from https://source.codeaurora.org/external/imx/linux-imx The sdma memcpy test fail due to the channel priority not configured. The sdma_config_write-> sdma_config_channel-> sdma_set_channel_priority didn't be called in memcpy, So there are only memcpy test fail. The test fail log : root@imx8mnevk:~# echo 2000 > /sys/module/dmatest/parameters/timeout root@imx8mnevk:~# echo 1 > /sys/module/dmatest/parameters/iterations root@imx8mnevk:~# echo dma0chan1 > /sys/module/dmatest/parameters/channel [ 248.264090] dmatest: Added 1 threads using dma0chan1 root@imx8mnevk:~# echo 1 > /sys/module/dmatest/parameters/run [ 253.961791] dmatest: Started 1 threads using dma0chan1 root@imx8mnevk:~# [ 255.967043] dmatest: dma0chan1-copy0: result #1: 'test timed out' with src_off=0xc4 dst_off=0x3c len=0x3ec0 (0) [ 255.977236] dmatest: dma0chan1-copy0: summary 1 tests, 1 failures 0.49 iops 7 KB/s (0) This patch adds sdma_set_channel_priority for memcpy in transfer_init. Fixes: 111097595c1c ("MLK-25465-1 dmaengine: imx-sdma: move runtime behind to transfer phase") Signed-off-by: Joy Zou <joy.zou@nxp.com> Reviewed by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--drivers/dma/imx-sdma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 7fd32907cc4f..02a0aa072364 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1832,8 +1832,10 @@ static struct sdma_desc *sdma_transfer_init(struct sdma_channel *sdmac,
goto err_desc_out;
/* No slave_config called in MEMCPY case, so do here */
- if (direction == DMA_MEM_TO_MEM)
+ if (direction == DMA_MEM_TO_MEM) {
sdma_config_ownership(sdmac, false, true, false);
+ sdma_set_channel_priority(sdmac, sdmac->prio);
+ }
if (sdma_load_context(sdmac))
goto err_desc_out;