From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Vinod Koul <vinod.koul@intel.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Ludovic Desroches <ludovic.desroches@atmel.com>,
Maxime Ripard <maxime.ripard@free-electrons.com>
Subject: [PATCH RFC 0/2] dmaengine: Introduce Scheduled DMA sub-framework
Date: Sat, 21 Mar 2015 12:42:05 -0700 [thread overview]
Message-ID: <1426966927-30833-1-git-send-email-maxime.ripard@free-electrons.com> (raw)
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
next reply other threads:[~2015-03-22 15:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-21 19:42 Maxime Ripard [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426966927-30833-1-git-send-email-maxime.ripard@free-electrons.com \
--to=maxime.ripard@free-electrons.com \
--cc=dmaengine@vger.kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.desroches@atmel.com \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®