From: vinod.koul@intel.com (Vinod Koul)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] Documentation: dmaengine: Add a documentation for the dma controller API
Date: Wed, 8 Oct 2014 17:49:02 +0530 [thread overview]
Message-ID: <20141008121902.GU1638@intel.com> (raw)
In-Reply-To: <2491176.7TIClHxUkE@avalon>
On Tue, Oct 07, 2014 at 06:05:15PM +0300, Laurent Pinchart wrote:
> > >
> > > Beware, it can be confusing when mixing "descriptors" and "hardware
> > > descriptors". The ones used by the DMA controller itself to describe the
> > > chunks of data (hardware descriptors) and the ones that would represent
> > > them in the driver (tx descriptors). However, it's true that both must
> > > be prepared by this set of functions.
> >
> > There's a few "hardware" missing indeed, but we can't really avoid the
> > confusion here, since it does rely also on a dma_async_tx_descriptor.
>
> How about always specifying whether we refer to a "hardware descriptor" or a
> "transaction descriptor" ?
>
> > > >> + - You'll also need to set two fields in this structure:
> > > >> + + flags:
> > > >> + TODO: Can it be modified by the driver itself, or
> > > >> + should it be always the flags passed in the arguments
> > > >> +
> > > >> + + tx_submit: A pointer to a function you have to implement,
> > > >> + that is supposed to push the current descriptor
> > > >> + to a pending queue, waiting for issue_pending to
> > > >> + be called.
> > >
> > > The question remains: why wait when all the information is already
> > > prepared and available for the DMA controller to start the job?
> > > Actually, we don't wait in at_hdmac, just to be more efficient, but I
> > > known that we kind of break this "requirement"... But sorry, it is
> > > another discussion which should be lead elsewhere.
>
> From my recollection of a discussion I've had with Russell King, I believe the
> main reason to separate transaction submission (queueing) issue (start) is to
> let DMA engine drivers issuing several queued requests in one go when hardware
> supports chaining requests only when none of them are running. It's thus just
> an optimization. Russell, could you confirm (or infirm) that ?
There are few reasons
- Allow the dmaengine driver to collect and issue all pending txns in shot
(which is not happening today with drivers)
- Allow clients to prepare the txns ahead of time and send them when ready
--
~Vinod
>
> > It's just a guess, but maybe you might not be able to schedule the
> > transfer right away? Think about a very dumb 1-channel (or a more
> > realistic more-DRQ-than-channel) device. You might have all the
> > channels busy doing some other transfers, and it's not really part of
> > the client driver job to address that kind of contention: it just
> > wants to queue some work for a later transfer.
>
> --
> Regards,
>
> Laurent Pinchart
>
> --
> To unsubscribe from this list: send the line "unsubscribe dmaengine" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
WARNING: multiple messages have this Message-ID (diff)
From: Vinod Koul <vinod.koul@intel.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: "Maxime Ripard" <maxime.ripard@free-electrons.com>,
"Russell King" <linux@arm.linux.org.uk>,
"Nicolas Ferre" <nicolas.ferre@atmel.com>,
"Dan Williams" <dan.j.williams@intel.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org,
"Arnd Bergmann" <arnd@arndb.de>,
"Antoine Ténart" <antoine@free-electrons.com>,
"Thomas Petazzoni" <thomas@free-electrons.com>,
"Alexandre Belloni" <alexandre.belloni@free-electrons.com>,
"Boris Brezillon" <boris@free-electrons.com>,
"Matt Porter" <matt.porter@linaro.org>,
"Gregory Clement" <gregory.clement@free-electrons.com>
Subject: Re: [PATCH v2 2/2] Documentation: dmaengine: Add a documentation for the dma controller API
Date: Wed, 8 Oct 2014 17:49:02 +0530 [thread overview]
Message-ID: <20141008121902.GU1638@intel.com> (raw)
In-Reply-To: <2491176.7TIClHxUkE@avalon>
On Tue, Oct 07, 2014 at 06:05:15PM +0300, Laurent Pinchart wrote:
> > >
> > > Beware, it can be confusing when mixing "descriptors" and "hardware
> > > descriptors". The ones used by the DMA controller itself to describe the
> > > chunks of data (hardware descriptors) and the ones that would represent
> > > them in the driver (tx descriptors). However, it's true that both must
> > > be prepared by this set of functions.
> >
> > There's a few "hardware" missing indeed, but we can't really avoid the
> > confusion here, since it does rely also on a dma_async_tx_descriptor.
>
> How about always specifying whether we refer to a "hardware descriptor" or a
> "transaction descriptor" ?
>
> > > >> + - You'll also need to set two fields in this structure:
> > > >> + + flags:
> > > >> + TODO: Can it be modified by the driver itself, or
> > > >> + should it be always the flags passed in the arguments
> > > >> +
> > > >> + + tx_submit: A pointer to a function you have to implement,
> > > >> + that is supposed to push the current descriptor
> > > >> + to a pending queue, waiting for issue_pending to
> > > >> + be called.
> > >
> > > The question remains: why wait when all the information is already
> > > prepared and available for the DMA controller to start the job?
> > > Actually, we don't wait in at_hdmac, just to be more efficient, but I
> > > known that we kind of break this "requirement"... But sorry, it is
> > > another discussion which should be lead elsewhere.
>
> From my recollection of a discussion I've had with Russell King, I believe the
> main reason to separate transaction submission (queueing) issue (start) is to
> let DMA engine drivers issuing several queued requests in one go when hardware
> supports chaining requests only when none of them are running. It's thus just
> an optimization. Russell, could you confirm (or infirm) that ?
There are few reasons
- Allow the dmaengine driver to collect and issue all pending txns in shot
(which is not happening today with drivers)
- Allow clients to prepare the txns ahead of time and send them when ready
--
~Vinod
>
> > It's just a guess, but maybe you might not be able to schedule the
> > transfer right away? Think about a very dumb 1-channel (or a more
> > realistic more-DRQ-than-channel) device. You might have all the
> > channels busy doing some other transfers, and it's not really part of
> > the client driver job to address that kind of contention: it just
> > wants to queue some work for a later transfer.
>
> --
> Regards,
>
> Laurent Pinchart
>
> --
> To unsubscribe from this list: send the line "unsubscribe dmaengine" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
next prev parent reply other threads:[~2014-10-08 12:19 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 15:40 [PATCH v2 1/2] Documentation: dmaengine: Move the current doc to a folder of its own Maxime Ripard
2014-09-26 15:40 ` Maxime Ripard
2014-09-26 15:40 ` [PATCH v2 2/2] Documentation: dmaengine: Add a documentation for the dma controller API Maxime Ripard
2014-09-26 15:40 ` Maxime Ripard
2014-09-26 18:04 ` Randy Dunlap
2014-09-26 18:04 ` Randy Dunlap
2014-10-07 16:48 ` Maxime Ripard
2014-10-07 16:48 ` Maxime Ripard
2014-10-06 12:09 ` Laurent Pinchart
2014-10-06 12:09 ` Laurent Pinchart
2014-10-07 12:16 ` Nicolas Ferre
2014-10-07 12:16 ` Nicolas Ferre
2014-10-07 14:52 ` Maxime Ripard
2014-10-07 14:52 ` Maxime Ripard
2014-10-07 15:05 ` Laurent Pinchart
2014-10-07 15:05 ` Laurent Pinchart
2014-10-08 12:19 ` Vinod Koul [this message]
2014-10-08 12:19 ` Vinod Koul
2014-10-09 8:56 ` Laurent Pinchart
2014-10-09 8:56 ` Laurent Pinchart
2014-10-08 12:07 ` Vinod Koul
2014-10-08 12:07 ` Vinod Koul
2014-10-09 13:39 ` Geert Uytterhoeven
2014-10-09 13:39 ` Geert Uytterhoeven
2014-10-09 14:04 ` Nicolas Ferre
2014-10-09 14:04 ` Nicolas Ferre
2014-10-17 11:23 ` Maxime Ripard
2014-10-17 11:23 ` Maxime Ripard
2014-10-22 20:08 ` Laurent Pinchart
2014-10-22 20:08 ` Laurent Pinchart
2014-09-28 15:57 ` [PATCH v2 1/2] Documentation: dmaengine: Move the current doc to a folder of its own Vinod Koul
2014-09-28 15:57 ` Vinod Koul
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=20141008121902.GU1638@intel.com \
--to=vinod.koul@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 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.