From: Matt Porter <mporter@ti.com>
To: Vinod Koul <vinod.koul@intel.com>
Cc: Dan Williams <djbw@fb.com>, Chris Ball <cjb@laptop.org>,
Grant Likely <grant.likely@secretlab.ca>,
Linux DaVinci Kernel List
<davinci-linux-open-source@linux.davincidsp.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux MMC List <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH v2 0/3] dmaengine: add per channel capabilities api
Date: Sun, 20 Jan 2013 11:37:35 -0500 [thread overview]
Message-ID: <20130120163735.GC21407@beef> (raw)
In-Reply-To: <abcd725c6216491da2b1054e5e11ad82@DFLE72.ent.ti.com>
On Sun, Jan 20, 2013 at 12:37:34PM +0000, Vinod Koul wrote:
> On Thu, Jan 10, 2013 at 02:07:03PM -0500, Matt Porter wrote:
> > The call is implemented as follows:
> >
> > struct dmaengine_chan_caps
> > *dma_get_channel_caps(struct dma_chan *chan,
> > enum dma_transfer_direction dir);
> >
> > The dma transfer direction parameter may appear a bit out of place
> > but it is necessary since the direction field in struct
> > dma_slave_config was deprecated. In some cases, EDMA for one, it
> > is necessary for the dmaengine driver to have the burst and address
> > width slave configuration parameters available in order to compute
> > the maximum segment size that can be handle. Due to this requirement,
> > the calling order of this api is as follows:
> Well you are passing direction as argument so even in EDMA it doesn't seem to
> help you as you seem to need burst and width!. So why do you even need the
> direction to compute the capablities
Yes, I need burst and width, but they are dependent on direction (dst vs
src, as stored in the slave channel config). Ok, so I think I know where
this is leading...the problem is probably that I made an implicit
dependency on burst and width here. The expectation in this
implementation is that dmaengine_slave_config() has already been called
and as a result, the dmaengine driver has either src_* or dst_*
attributes populated depending on the direction of the channel. Given
that, the call to dma_get_channel_caps() needs to provide the direction
in order for the driver to know which of src_*/dst_* attributes are
valid in order to do the max segment size calculation.
An alternative, since the slave driver is the one that provided the
info in the first place is:
struct dmaengine_chan_caps
*dma_get_channel_caps(struct dma_chan *chan,
enum dma_slave_buswidth addr_width,
u32 maxburst);
where the attributes required by the edma driver to find the max
segment size are now explicitly provided. This approach also removes
the ordering requirement of calling dmaengine_slave_config() first. Is
this what you had in mind?
-Matt
next prev parent reply other threads:[~2013-01-20 16:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-10 19:07 [PATCH v2 0/3] dmaengine: add per channel capabilities api Matt Porter
2013-01-10 19:07 ` [PATCH v2 1/3] dmaengine: add dma_get_channel_caps() Matt Porter
2013-01-20 12:52 ` Vinod Koul
[not found] ` <a5337a28bf454c3ca73e28ffb530ac40@DLEE74.ent.ti.com>
2013-01-20 16:41 ` Matt Porter
2013-01-10 19:07 ` [PATCH v2 2/3] dma: edma: add device_channel_caps() support Matt Porter
2013-01-20 13:03 ` Vinod Koul
[not found] ` <7bca07cce8884261b9828946dff5a076@DFLE72.ent.ti.com>
2013-01-20 16:51 ` Matt Porter
2013-01-21 3:16 ` Vinod Koul
[not found] ` <bfaa71fba6ed468cbfd2d79604729b77@DFLE72.ent.ti.com>
2013-01-21 18:29 ` Matt Porter
2013-01-10 19:07 ` [PATCH v2 3/3] mmc: davinci: get SG segment limits with dma_get_channel_caps() Matt Porter
2013-01-20 12:37 ` [PATCH v2 0/3] dmaengine: add per channel capabilities api Vinod Koul
[not found] ` <abcd725c6216491da2b1054e5e11ad82@DFLE72.ent.ti.com>
2013-01-20 16:37 ` Matt Porter [this message]
2013-01-21 3:15 ` Vinod Koul
[not found] ` <c4113bae604945b586e9613814be737a@DLEE74.ent.ti.com>
2013-01-21 18:19 ` Matt Porter
2013-01-28 10:06 ` Vinod Koul
[not found] ` <f97c0fe89e4643069c177f549a2e5628@DLEE74.ent.ti.com>
2013-01-31 22:25 ` Matt Porter
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=20130120163735.GC21407@beef \
--to=mporter@ti.com \
--cc=cjb@laptop.org \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=djbw@fb.com \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--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 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.