From: Ravi Kumar V <kumarrav@codeaurora.org>
To: Vinod Koul <vinod.koul@intel.com>
Cc: linux-arch@vger.kernel.org, linux@arm.linux.org.uk,
arnd@arndb.de, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, bryanh@codeaurora.org,
tsoni@codeaurora.org, Daniel Walker <dwalker@fifo99.com>,
dan.j.williams@intel.com, davidb@codeaurora.org,
linux-arm-kernel@lists.infradead.org, johlstei@codeaurora.org
Subject: Re: [PATCH v2 0/2] Add Qualcomm MSM ADM DMAEngine driver
Date: Mon, 23 Jan 2012 16:41:14 +0530 [thread overview]
Message-ID: <4F1D4052.3070701@codeaurora.org> (raw)
In-Reply-To: <1327066287.517.4.camel@vkoul-udesk3>
On 1/20/2012 7:01 PM, Vinod Koul wrote:
> On Fri, 2012-01-20 at 18:00 +0530, Ravi Kumar V wrote:
>> On 1/17/2012 7:15 PM, Vinod Koul wrote:
>>> On Fri, 2012-01-06 at 18:17 +0530, Ravi Kumar V wrote:
>>> <sorry for delayed review, was on vacation and now traveling>
>>>>
>>>> As our ADM Scatter-gather hardware needs
>>>> -32-bit command configuration parameter
>>>> apart from
>>>> -32-bit source address
>>>> -32-bit destination address
>>>> -16-bit length
>>>>
>>>> So,we have added new parameter in struct scatterlist to support xfer
>>>> descriptor
>>>> specific private data, and for supporting ADM Box mode DMA we added
>>>> new
>>>> API and data structure.
>>> what do you mean by "ADM Box mode"?
>>>
>>
>> ADM Box mode is a interleaved type of DMA where data from rows of equal
>> length and equal distance(bytes) between each other are transferred to
>> similar pattern of rows.
>> Each row length and distance between each row in destination pattern may
>> not be equal to source pattern.
>> Distance between beginning of any two rows are always greater than row
>> length.
>> Example:
>> If 4 rows of 16 bytes each are arranged such that distance between
>> beginning of any two rows are 32 bytes.
>> Now they can be transferred using BOX mode to destination pattern
>> arranged in 2 rows of 32 bytes each and distance between them can be any
>> lets say 128 bytes.
>>
>> Source pattern:
>> 4 data rows starts address 0th byte.
>>
>> 0-----16-bytes-data-----15
>> 16 16 bytes void 31
>> 32---------data---------47
>> 48 void 63
>> 64---------data---------79
>> 80 void 95
>> 96---------data--------111
>>
>> Transferred to destination
>> Destination pattern:
>> 2 rows
>> 0----------32-bytes-data----------31
>> 32 96 bytes void 127
>> 128-------------data-------------159
>>
> Sounds like you should be using interleaved API
>
> Please see this and read the patch history, which has nice details about
> this
>
> /**
> * struct dma_interleaved_template - Template to convey DMAC the
> transfer pattern
> * and attributes.
> * @src_start: Bus address of source for the first chunk.
> * @dst_start: Bus address of destination for the first chunk.
> * @dir: Specifies the type of Source and Destination.
> * @src_inc: If the source address increments after reading from it.
> * @dst_inc: If the destination address increments after writing to it.
> * @src_sgl: If the 'icg' of sgl[] applies to Source (scattered read).
> * Otherwise, source is read contiguously (icg ignored).
> * Ignored if src_inc is false.
> * @dst_sgl: If the 'icg' of sgl[] applies to Destination (scattered write).
> * Otherwise, destination is filled contiguously (icg ignored).
> * Ignored if dst_inc is false.
> * @numf: Number of frames in this template.
> * @frame_size: Number of chunks in a frame i.e, size of sgl[].
> * @sgl: Array of {chunk,icg} pairs that make up a frame.
> */
> struct dma_interleaved_template {
> dma_addr_t src_start;
> dma_addr_t dst_start;
> enum dma_transfer_direction dir;
> bool src_inc;
> bool dst_inc;
> bool src_sgl;
> bool dst_sgl;
> size_t numf;
> size_t frame_size;
> struct data_chunk sgl[0];
> };
> using the interleaved API:
> struct dma_async_tx_descriptor *(*device_prep_interleaved_dma)(
> struct dma_chan *chan, struct dma_interleaved_template *xt,
> unsigned long flags);
>
>
If some changes are made in interleave API then it can support our BOX
mode. Here in interleaved template he is assuming destination pattern as
can be contiguous or same as source pattern, but in our case destination
pattern is different from source pattern.
So if a new parameter destination data chunk is added in "struct
dma_interleaved_template" structure then it can support different
destination pattern.
Also it will good if you can provide another parameter for passing
private data to dma driver.
Please can you review my other patches also where we replied to some of
your questions about passing private data for SG mode.
Thanks
Ravi Kumar
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2012-01-23 11:11 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-06 12:47 [PATCH v2 0/2] Add Qualcomm MSM ADM DMAEngine driver Ravi Kumar V
2012-01-06 12:47 ` [PATCH v2 1/2] dmaengine: Add support for per xfer specific privatedata & box dma Ravi Kumar V
2012-01-07 0:02 ` David Brown
2012-01-17 13:53 ` Vinod Koul
2012-01-20 12:33 ` Ravi Kumar V
2012-01-06 12:47 ` [PATCH v2 2/2] msm: DMAEngine: Add DMAEngine driver based on old MSM DMA APIs Ravi Kumar V
2012-01-07 1:59 ` Daniel Walker
2012-01-07 18:54 ` David Brown
2012-01-07 19:21 ` Russell King - ARM Linux
2012-01-08 0:13 ` Daniel Walker
2012-01-08 0:21 ` Russell King - ARM Linux
2012-01-09 11:11 ` Ravi Kumar V
2012-01-17 6:26 ` Ravi Kumar V
2012-01-17 6:32 ` Ravi Kumar V
2012-01-17 14:35 ` Vinod Koul
2012-01-20 12:47 ` Ravi Kumar V
2012-01-17 14:31 ` Vinod Koul
2012-01-20 12:46 ` Ravi Kumar V
2012-01-17 13:45 ` [PATCH v2 0/2] Add Qualcomm MSM ADM DMAEngine driver Vinod Koul
2012-01-20 12:30 ` Ravi Kumar V
2012-01-20 13:31 ` Vinod Koul
2012-01-23 11:11 ` Ravi Kumar V [this message]
2012-01-23 13:51 ` Vinod Koul
2012-01-25 13:11 ` Ravi Kumar V
2012-01-30 7:53 ` Ravi Kumar V
2012-01-30 8:15 ` Vinod Koul
2012-01-31 5:59 ` Ravi Kumar V
2012-01-31 6:09 ` Vinod Koul
2012-02-01 6:16 ` Ravi Kumar V
2012-02-01 8:29 ` Vinod Koul
2012-02-01 8:38 ` Ravi Kumar V
[not found] ` <4F28F9D5.6020801@codeaurora.org>
[not found] ` <1328086017.1610.13.camel@vkoul-udesk3>
2012-02-01 9:08 ` Ravi Kumar V
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=4F1D4052.3070701@codeaurora.org \
--to=kumarrav@codeaurora.org \
--cc=arnd@arndb.de \
--cc=bryanh@codeaurora.org \
--cc=dan.j.williams@intel.com \
--cc=davidb@codeaurora.org \
--cc=dwalker@fifo99.com \
--cc=johlstei@codeaurora.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=tsoni@codeaurora.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 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).