• Alexandru Ardelean's avatar
    dmaengine: axi-dmac: Don't check the number of frames for alignment · 648865a7
    Alexandru Ardelean authored
    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: 0e3b67b3 ("dmaengine: Add support for the Analog Devices AXI-DMAC DMA controller")
    Signed-off-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
    Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
    648865a7
dma-axi-dmac.c 20.2 KB