Re: [PATCH v3 0/6] add virt-dma support for imx-sdma

From: Lucas Stach
Date: Mon Jun 11 2018 - 07:01:36 EST


Hi Robin,

this series breaks serial DMA for me. I wasn't able to dig in deeper
yet. Please let me know if you can test/reproduce at your side, if not
I'll try to find some time to collect some more debug info.

Regards,
Lucas

Am Montag, den 11.06.2018, 22:59 +0800 schrieb Robin Gong:
> The legacy sdma driver has below limitations or drawbacks:
> Â 1. Hardcode the max BDs number as "PAGE_SIZE / sizeof(*)", and alloc
> ÂÂÂÂÂone page size for one channel regardless of only few BDs needed
> ÂÂÂÂÂmost time. But in few cases, the max PAGE_SIZE maybe not enough.
> Â 2. One SDMA channel can't stop immediatley once channel disabled which
> ÂÂÂÂÂmeans SDMA interrupt may come in after this channel terminated.There
> ÂÂÂÂÂare some patches for this corner case such as commit "2746e2c389f9",
> ÂÂÂÂÂbut not cover non-cyclic.
>
> The common virt-dma overcomes the above limitations. It can alloc bd
> dynamically and free bd once this tx transfer done. No memory wasted or
> maximum limititation here, only depends on how many memory can be requested
> from kernel. For No.2, such issue can be workaround by checking if there
> is available descript("sdmac->desc") now once the unwanted interrupt
> coming. At last the common virt-dma is easier for sdma driver maintain.
>
> Change from v2:
> Â 1. include Sascha's patch to make the main patch easier to review.
> ÂÂÂÂÂThanks Sacha.
> Â 2. remove useless 'desc'/'chan' in struct sdma_channe.
>
> Change from v1:
> Â 1. split v1 patch into 5 patches.
> Â 2. remove some unnecessary condition check.
> Â 3. remove unnecessary 'pending' list.
>
> Robin Gong (5):
> Â dmaengine: imx-sdma: add virt-dma support
> Â Revert "dmaengine: imx-sdma: fix pagefault when channel is disabled
> ÂÂÂÂduring interrupt"
> Â dmaengine: imx-sdma: remove usless lock
> Â dmaengine: imx-sdma: remove the maximum limation for bd numbers
> Â dmaengine: imx-sdma: add sdma_transfer_init to decrease code overlap
>
> Âdrivers/dma/KconfigÂÂÂÂ|ÂÂÂ1 +
> Âdrivers/dma/imx-sdma.c | 392 ++++++++++++++++++++++++++++---------------------
> Â2 files changed, 227 insertions(+), 166 deletions(-)
>
> --Â
> 2.7.4
>
> Robin Gong (5):
> Â dmaengine: imx-sdma: add virt-dma support
> Â Revert "dmaengine: imx-sdma: fix pagefault when channel is disabled
> ÂÂÂÂduring interrupt"
> Â dmaengine: imx-sdma: remove usless lock
> Â dmaengine: imx-sdma: remove the maximum limation for bd numbers
> Â dmaengine: imx-sdma: add sdma_transfer_init to decrease code overlap
>
> Sascha Hauer (1):
> Â dmaengine: imx-sdma: factor out a struct sdma_desc from struct
> ÂÂÂÂsdma_channel
>
> Âdrivers/dma/KconfigÂÂÂÂ|ÂÂÂ1 +
> Âdrivers/dma/imx-sdma.c | 391 ++++++++++++++++++++++++++++---------------------
> Â2 files changed, 226 insertions(+), 166 deletions(-)
>