]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
dmaengine: axi-dmac: Don't check the number of frames for alignment
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Tue, 26 Mar 2019 14:05:20 +0000 (16:05 +0200)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commitc6004eec8c54a4d0576170d41720d71dd6fac44e
treeeb315785b83dabd1df9bfaf44e2d0a088e9516ad
parente51899706dcfe89b8790e9071108d2b08cb89823
dmaengine: axi-dmac: Don't check the number of frames for alignment

BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit 648865a79d8ee3d1aa64aab5eb2a9d12eeed14f9 ]

In 2D transfers (for the AXI DMAC), the number of frames (numf) represents
Y_LENGTH, and the length of a frame is X_LENGTH. 2D transfers are useful
for video transfers where screen resolutions ( X * Y ) are typically
aligned for X, but not for Y.

There is no requirement for Y_LENGTH to be aligned to the bus-width (or
anything), and this is also true for AXI DMAC.

Checking the Y_LENGTH for alignment causes false errors when initiating DMA
transfers. This change fixes this by checking only that the Y_LENGTH is
non-zero.

Fixes: 0e3b67b348b8 ("dmaengine: Add support for the Analog Devices AXI-DMAC DMA controller")
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/dma/dma-axi-dmac.c