linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pratyush Anand <pratyush.anand@st.com>
To: Viresh KUMAR <viresh.kumar@st.com>
Cc: Vinod Koul <vinod.koul@intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Shiraz HASHIM <shiraz.hashim@st.com>,
	Armando VISCONTI <armando.visconti@st.com>,
	Deepak SIKRI <deepak.sikri@st.com>,
	Vipin KUMAR <vipin.kumar@st.com>,
	Vipul Kumar SAMAR <vipulkumar.samar@st.com>,
	Vincenzo FRASCINO <Vincenzo.FRASCINO@st.com>,
	Mirko GARDI <mirko.gardi@st.com>,
	Rajeev KUMAR <rajeev-dlh.kumar@st.com>,
	Amit VIRDI <Amit.VIRDI@st.com>,
	Bhupesh SHARMA <bhupesh.sharma@st.com>,
	<linus.walleij@linaro.org>
Subject: Re: dmaengine/Query: What about scatter/gather for mem to mem transfers.
Date: Wed, 14 Dec 2011 12:17:55 +0530	[thread overview]
Message-ID: <4EE8469B.8050201@st.com> (raw)
In-Reply-To: <4EE06C3C.8080003@st.com>

Hello Vinod/Dan,

In continuation to the scatter/gather requirement:
We might need some generic transfer where source and destination address 
may be overlapped and also gap between two chunk of source and 
destination might not be same.

For examaple,
Transfer size is - -0x4000
Our Src is something like this:
0x1000 -- 0x2000
0x3000 -- 0x5000
0x6000 -- 0x7000

and dst is something like this:
0x6000 -- 0x8000
0x9000 -- 0xB000

It seems that device_prep_interleaved_dma would not be able to handle 
such transfer.

So, what I was thinking that to add following flags in enum dma_ctrl_flags.

DMA_SRC_INC = (1 << 10),
DMA_SRC_DEC = (2 << 10),
DMA_SRC_FIX = (3 << 10),
DMA_DST_INC = (1 << 12),
DMA_DST_DEC = (2 << 12),
DMA_DST_FIX = (3 << 12),

Now we can use these flag in device_prep_dma_sg and this function can be 
implemented for generic cases.

I think, the above modifications will not affect other's platform and 
should be acceptable.

Whats your opinion?

Regards
Pratyush

On 12/8/2011 1:20 PM, Viresh KUMAR wrote:
> On 12/8/2011 1:07 PM, Vinod Koul wrote:
>> You mean something like:
>>         struct dma_async_tx_descriptor *(*device_prep_dma_sg)(
>>                  struct dma_chan *chan,
>>                  struct scatterlist *dst_sg, unsigned int dst_nents,
>>                  struct scatterlist *src_sg, unsigned int src_nents,
>>                  unsigned long flags);
>>
>> Its already there, you need to implement in your driver :)
>
> Ok. I didn't knew it. :(
>


  reply	other threads:[~2011-12-14  6:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-08  4:10 dmaengine/Query: What about scatter/gather for mem to mem transfers Viresh Kumar
2011-12-08  7:37 ` Vinod Koul
2011-12-08  7:50   ` Viresh Kumar
2011-12-14  6:47     ` Pratyush Anand [this message]
2011-12-15  4:58       ` Pratyush Anand
2011-12-15  5:06         ` Koul, Vinod
2011-12-15  5:24           ` Pratyush Anand
2011-12-15  6:56             ` Pratyush Anand
2011-12-20  9:21               ` Vinod Koul
2011-12-20 10:15                 ` Pratyush Anand
2012-01-02 11:35                   ` Vinod Koul
2012-01-02 11:50                     ` Pratyush Anand

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=4EE8469B.8050201@st.com \
    --to=pratyush.anand@st.com \
    --cc=Amit.VIRDI@st.com \
    --cc=Vincenzo.FRASCINO@st.com \
    --cc=armando.visconti@st.com \
    --cc=bhupesh.sharma@st.com \
    --cc=dan.j.williams@intel.com \
    --cc=deepak.sikri@st.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mirko.gardi@st.com \
    --cc=rajeev-dlh.kumar@st.com \
    --cc=shiraz.hashim@st.com \
    --cc=vinod.koul@intel.com \
    --cc=vipin.kumar@st.com \
    --cc=vipulkumar.samar@st.com \
    --cc=viresh.kumar@st.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).