linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] add virt-dma support for imx-sdma
@ 2018-06-08 13:44 Robin Gong
  2018-06-08  8:43 ` Sascha Hauer
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Robin Gong @ 2018-06-08 13:44 UTC (permalink / raw)
  To: vkoul, s.hauer, dan.j.williams
  Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-imx

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 v1:
  1. split v1 patch into 5 patches.
  2. remove some unnecessary condition check.
  3. remove unneccessary '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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-06-08  9:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-08 13:44 [PATCH v2 0/5] add virt-dma support for imx-sdma Robin Gong
2018-06-08  8:43 ` Sascha Hauer
2018-06-08  9:43   ` Robin Gong
2018-06-08 13:44 ` [PATCH v2 1/5] dmaengine: imx-sdma: add virt-dma support Robin Gong
2018-06-08  8:43   ` Sascha Hauer
2018-06-08 13:44 ` [PATCH v2 2/5] Revert "dmaengine: imx-sdma: fix pagefault when channel is disabled during interrupt" Robin Gong
2018-06-08 13:44 ` [PATCH v2 3/5] dmaengine: imx-sdma: remove usless lock Robin Gong
2018-06-08 13:44 ` [PATCH v2 4/5] dmaengine: imx-sdma: remove the maximum limation for bd numbers Robin Gong
2018-06-08 13:44 ` [PATCH v2 5/5] dmaengine: imx-sdma: add sdma_transfer_init to decrease code overlap Robin Gong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).