From: Linus Walleij <linus.walleij@linaro.org>
To: "Raju, Sundaram" <sundaram@ti.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
"Koul, Vinod" <vinod.koul@intel.com>,
Dan <dan.j.williams@intel.com>,
"davinci-linux-open-source@linux.davincidsp.com"
<davinci-linux-open-source@linux.davincidsp.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC] dmaengine: add new api for preparing simple slave transfer
Date: Mon, 13 Jun 2011 16:13:15 +0200 [thread overview]
Message-ID: <BANLkTimZ=v4W1hFJ7hvZRmyHMSU_3MmZEA@mail.gmail.com> (raw)
In-Reply-To: <20110610133338.GD24636@n2100.arm.linux.org.uk>
On Fri, Jun 10, 2011 at 3:33 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Fri, Jun 10, 2011 at 05:18:46PM +0530, Raju, Sundaram wrote:
>> Now DMACs capable of 3D transfer, do transfer of the whole 1D
>> buffer per sync received or even whole 2D buffer per sync received
>> (based on the sync rate programmed in the DMAC).
>
> The only issue which I see that we don't cover is the case where you want
> to describe a single buffer which is organised as N bytes to be transferred,
> M following bytes to be skipped, N bytes to be transferred, M bytes to be
> skipped. I doubt there are many controllers which can be programmed with
> both 'N' and 'M' parameters directly.
Sundaram is this how your controller works?
I mean the hardware can skip over sequences like this?
When we added the config interface to DMAengine I originally included
a "custom config" call, but Dan wanted me to keep it out until we
had some specific usecase for it. FSLDMA recently started
to use it.
Notice how dmaengine_slave_config() is implemented:
static inline int dmaengine_slave_config(struct dma_chan *chan,
struct dma_slave_config *config)
{
return dmaengine_device_control(chan, DMA_SLAVE_CONFIG,
(unsigned long)config);
}
So what is passed to the driver is just an unsigned long.
This is actually modeled to be ioctl()-like so you can pass in a
custom config to the same callback on the device driver,
just use some other enumerator than DMA_SLAVE_CONFIG,
say like FSLDMA already does with FSLDMA_EXTERNAL_START.
Just put some enumerator in enum dma_ctrl_cmd in
dmaengine.h such as SDMA_TEXAS_STRIDE_CONFIG and call
like this:
/* However that config struct needs to look, basically */
static struct sdma_ti_stride_cgf = {
take = M,
skip = N,
};
ret = chan->device->device_control(chan, SDMA_TEXAS_STRIDE_CONFIG,
&sdma_ti_stride_cfg);
Or something like this.
Thanks,
Linus Walleij
next prev parent reply other threads:[~2011-06-13 14:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 12:39 [RFC] dmaengine: add new api for preparing simple slave transfer Raju, Sundaram
2011-06-09 12:47 ` Russell King - ARM Linux
2011-06-09 16:01 ` Raju, Sundaram
2011-06-09 16:32 ` Russell King - ARM Linux
2011-06-10 6:13 ` Koul, Vinod
2011-06-10 10:21 ` Raju, Sundaram
2011-06-10 10:43 ` Russell King - ARM Linux
2011-06-10 11:48 ` Raju, Sundaram
2011-06-10 13:33 ` Russell King - ARM Linux
2011-06-13 14:13 ` Linus Walleij [this message]
2011-06-14 5:38 ` Raju, Sundaram
2011-06-14 5:59 ` Linus Walleij
2011-06-10 6:09 ` Koul, Vinod
2011-06-10 11:13 ` Raju, Sundaram
2011-06-10 16:47 ` Koul, Vinod
2011-06-14 6:42 ` Raju, Sundaram
2011-06-16 5:45 ` Koul, Vinod
2011-07-07 12:15 ` Raju, Sundaram
2011-07-07 19:37 ` Linus Walleij
2011-06-09 18:58 ` Jassi Brar
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='BANLkTimZ=v4W1hFJ7hvZRmyHMSU_3MmZEA@mail.gmail.com' \
--to=linus.walleij@linaro.org \
--cc=dan.j.williams@intel.com \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=sundaram@ti.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;
as well as URLs for NNTP newsgroup(s).