All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/2] dmaengine: Introduce Scheduled DMA sub-framework
@ 2015-03-21 19:42 Maxime Ripard
  2015-03-21 19:42 ` [PATCH RFC 1/2] dmaengine: Introduce scheduled DMA framework Maxime Ripard
  2015-03-21 19:42 ` [PATCH RFC 2/2] dmaengine: sun6i: Convert to scheduled DMA Maxime Ripard
  0 siblings, 2 replies; 11+ messages in thread
From: Maxime Ripard @ 2015-03-21 19:42 UTC (permalink / raw)
  To: Vinod Koul
  Cc: dmaengine, linux-kernel, Laurent Pinchart, Ludovic Desroches,
	Maxime Ripard

Hi everyone,

This patch set aims at introducing a new sub-framework to DMAengine to
ease the dmaengine development, while factorising most of the
"administrative" code each drivers have to duplicate.

Most of the same issues are always seen for new drivers, and are
pointed out at each review. Among the major point of errors, we can
find how to dispatch new descriptors to a new idle channel
efficiently, how to schedule requests when you have more requests than
channels, how to allocate new descriptors, etc.

All of this code is currently duplicated by each and every drivers,
with some variations. Of course, this code is rather error prone, and
most of the drivers will face the same issues.

It's exactly the point of the Scheduled DMA framework to abstract this
away from the drivers, only requiring from the drivers the
hardware-specific behaviour (how to start, stop, pause a channel, how
to start the transfer of a descriptor on a given channel, etc.), LLI
operations (iterators, queuing, accessors, etc.) and an optionnal
scheduling hints function to prevent the core to schedule the transfer
of a descriptor on a channel that wouldn't be able to transfer it.

Please not that this is still at an RFC stage, and that there's still
a few bugs hanging around (resources leaked, the memcpy of the A31 can
only work once, etc.) but this RFC is more headed toward wether we are
on the right path or not, and reviews of the general approach.

Thanks!
Maxime

Maxime Ripard (2):
  dmaengine: Introduce scheduled DMA framework
  dmaengine: sun6i: Convert to scheduled DMA

 drivers/dma/Kconfig         |   4 +
 drivers/dma/Makefile        |   1 +
 drivers/dma/scheduled-dma.c | 571 +++++++++++++++++++++++++++++
 drivers/dma/scheduled-dma.h | 140 ++++++++
 drivers/dma/sun6i-dma.c     | 853 ++++++++++----------------------------------
 5 files changed, 897 insertions(+), 672 deletions(-)
 create mode 100644 drivers/dma/scheduled-dma.c
 create mode 100644 drivers/dma/scheduled-dma.h

-- 
2.3.3


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

end of thread, other threads:[~2015-03-25  0:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-21 19:42 [PATCH RFC 0/2] dmaengine: Introduce Scheduled DMA sub-framework Maxime Ripard
2015-03-21 19:42 ` [PATCH RFC 1/2] dmaengine: Introduce scheduled DMA framework Maxime Ripard
2015-03-23  9:15   ` Ludovic Desroches
2015-03-23 16:55     ` Maxime Ripard
2015-03-23 13:25   ` Ludovic Desroches
2015-03-23 19:07     ` Maxime Ripard
2015-03-23 16:38   ` Vinod Koul
2015-03-23 21:51     ` Maxime Ripard
2015-03-24 16:20       ` Vinod Koul
2015-03-25  0:30         ` Maxime Ripard
2015-03-21 19:42 ` [PATCH RFC 2/2] dmaengine: sun6i: Convert to scheduled DMA Maxime Ripard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.