linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: vinod.koul@intel.com (Vinod Koul)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] DMAEngine: sirf: let the users be able to pause and resume specific buffer
Date: Mon, 29 Jul 2013 11:38:19 +0530	[thread overview]
Message-ID: <20130729060819.GE29095@intel.com> (raw)
In-Reply-To: <CAGsJ_4wOdDMku-pNWiH-DoS_v39PfFwNYcU4T1Thsd-+L9A8AQ@mail.gmail.com>

On Mon, Jul 29, 2013 at 10:14:24AM +0800, Barry Song wrote:
> 2013/7/4 Barry Song <Baohua.Song@csr.com>
well the submitter didn't cc me. So this wasnt in my INBOX!

> >
> > From: Qipan Li <Qipan.Li@csr.com>
> >
> > this patch adds a buffer_index in pause and resume entries, then users
> > can pause and resume a buffer they want, but don't pause the whole dma.
> >
> > a typical application scenerios is Ping-Pang in two buffers:
typo, pong	          		^^^^^^^^^
> > at the beginning, we enable buf1 and buf2 to receive dma data, after
> > buf1 is full, we pause buf1 and handle the data in this buffer to avoid
> > overflow in buf1. but at the same time, dma is still tranferring in buf2.
> > once we have finished data process in buf1, we enable buf1 again.
> > this will maximize the chance of dma transferring. users pause buf1 by:
> > dmaengine_device_control(sirfport->rx_dma_chan, DMA_PAUSE, 1);
> > users pause buf2 by:
> > dmaengine_device_control(sirfport->rx_dma_chan, DMA_PAUSE, 2);
> > users can still pause the whole dma transferring by dmaengine_pause().
Well this is odd, the second arg is not supposed to be valid for PAUSE op. And
PAUSE means you pause the whole channel.

The above can be done by 
a) have two buffers:
	- prepare first and submit, and start
	- while first is ongoing, prepare second and start
	- first is completed, so you start processing that while second is
	  getting DMAed
	- when processing is completed, submit first again
	- when second is completed, start processing that and submit that once
	  proocessed

b) have multiple buffers, A, B, C & D and redo above schema.

Since patch is not the right approach and doesnt use API correctly NAK from me on that

~Vinod

  reply	other threads:[~2013-07-29  6:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-04  8:42 [PATCH] DMAEngine: sirf: let the users be able to pause and resume specific buffer Barry Song
2013-07-29  2:14 ` Barry Song
2013-07-29  6:08   ` Vinod Koul [this message]
2013-07-29  7:20     ` Barry Song
2013-07-29 12:17       ` Russell King - ARM Linux
2013-07-29 12:46         ` Barry Song
2013-07-29 12:08   ` Russell King - ARM Linux
2013-07-29 11:35     ` Vinod Koul
2013-07-29 12:49       ` Barry Song

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=20130729060819.GE29095@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 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).