* [V3] dmaengine: axi-dmac: Don't check the number of frames for alignment
@ 2019-03-26 14:05 Alexandru Ardelean
2019-04-24 5:38 ` Vinod Koul
0 siblings, 1 reply; 3+ messages in thread
From: Alexandru Ardelean @ 2019-03-26 14:05 UTC (permalink / raw)
To: dmaengine; +Cc: Alexandru Ardelean
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>
---
Changelog v2->v3:
* Fixed typo in `Fixes` commit
drivers/dma/dma-axi-dmac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c
index 0fe3a931d8d5..0e0c457a7b27 100644
--- a/drivers/dma/dma-axi-dmac.c
+++ b/drivers/dma/dma-axi-dmac.c
@@ -526,7 +526,7 @@ static struct dma_async_tx_descriptor *axi_dmac_prep_interleaved(
if (chan->hw_2d) {
if (!axi_dmac_check_len(chan, xt->sgl[0].size) ||
- !axi_dmac_check_len(chan, xt->numf))
+ xt->numf == 0)
return NULL;
if (xt->sgl[0].size + dst_icg > chan->max_length ||
xt->sgl[0].size + src_icg > chan->max_length)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [V3] dmaengine: axi-dmac: Don't check the number of frames for alignment
@ 2019-04-24 5:38 ` Vinod Koul
2019-04-24 5:38 ` [PATCH V3] " Vinod Koul
0 siblings, 1 reply; 3+ messages in thread
From: Vinod Koul @ 2019-04-24 5:38 UTC (permalink / raw)
To: Alexandru Ardelean; +Cc: dmaengine
On 26-03-19, 16:05, Alexandru Ardelean wrote:
> 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.
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V3] dmaengine: axi-dmac: Don't check the number of frames for alignment
2019-04-24 5:38 ` Vinod Koul
@ 2019-04-24 5:38 ` Vinod Koul
0 siblings, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2019-04-24 5:38 UTC (permalink / raw)
To: Alexandru Ardelean; +Cc: dmaengine
On 26-03-19, 16:05, Alexandru Ardelean wrote:
> 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.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-24 5:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-26 14:05 [V3] dmaengine: axi-dmac: Don't check the number of frames for alignment Alexandru Ardelean
2019-04-24 5:38 ` Vinod Koul
2019-04-24 5:38 ` [PATCH V3] " Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox