All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Dylan Reid <dgreid@chromium.org>
Cc: Chanho Park <chanho61.park@samsung.com>,
	Padmavathi Venna <padma.v@samsung.com>,
	linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Padma Venkat <padma.kvr@gmail.com>,
	kgene.kim@samsung.com, Arnd Bergmann <arnd@arndb.de>,
	Sangbeom Kim <sbkim73@samsung.com>,
	Mark Brown <broonie@kernel.org>,
	Olof Johansson <olofj@chromium.org>
Subject: Re: [PATCH 1/3] dmaengine: pl330: Set residue in tx_status callback.
Date: Thu, 10 Oct 2013 21:28:55 +0530	[thread overview]
Message-ID: <20131010155855.GA2954@intel.com> (raw)
In-Reply-To: <CAEUnVG7Xn8+Xhnr2y5-RM6FJTQsjRrJ9g1JWf4o+6B-BtWHbPA@mail.gmail.com>

On Wed, Oct 09, 2013 at 01:37:56PM -0700, Dylan Reid wrote:
> On Sun, Oct 6, 2013 at 8:48 PM, Vinod Koul <vinod.koul@intel.com> wrote:
> > On Mon, Oct 07, 2013 at 10:39:34AM +0900, Chanho Park wrote:
> >> > > Why didn't you use a cookie value to track the request?
> >> > > The cookie is assigned when each transfer is submitted.
> >> > > If you save the value in the desc, we can find the request easily.
> >> >
> >> > If there are several cyclic desc in the work list, is there a better way
> >> > to find the "current" one?  The chan struct tracks the last completed and
> >> > last submitted cookies, but these will be the first and last
> >> > respectively as long as the cyclic transfer is active.  Is there an
> >> > "active" cookie stored somewhere that I missed?
> >>
> >> Assume there are three cookies. If you want to get the second cookie not
> >> latest cookie, your way can be also correct in such case?
> >> I think tx_status API is to get dma status of the given cookie.
> >> You are only considering a cyclic case.
> > For cyclic case you would have possible same descriptor running till you
> > terminate.
> 
> The cyclic case that makes this interesting is when there are multiple
> cyclic descriptors in the list. The cookie and completed_cookie
> markers don't help to determine which of the descriptors in the list
> is currently active.  dma_cookie_complete isn't called for a cyclic
> desc, the desc is just pushed to the end of the list.
Yes the cyclic is a very different case. I think driver can still return for
cyclic case which was txstate->last and that will give clue to client which is
getting processed now!

> > For non cyclic, if you have 3 descriptors submitted, the cookie value can be, say
> > 7, 8 and 9. If you query the status of any descriptor and pass the last optional
> > txstate arg then you will know the last cookie completed. so if txstate->last is
> > 7, then 7th was completed and 8 should be running and 9 in queue!
> 
> Got it, but the correct desc for cookie 8 will still have to be
> searched for, correct?
Yes

-- 
~Vinod

WARNING: multiple messages have this Message-ID (diff)
From: vinod.koul@intel.com (Vinod Koul)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] dmaengine: pl330: Set residue in tx_status callback.
Date: Thu, 10 Oct 2013 21:28:55 +0530	[thread overview]
Message-ID: <20131010155855.GA2954@intel.com> (raw)
In-Reply-To: <CAEUnVG7Xn8+Xhnr2y5-RM6FJTQsjRrJ9g1JWf4o+6B-BtWHbPA@mail.gmail.com>

On Wed, Oct 09, 2013 at 01:37:56PM -0700, Dylan Reid wrote:
> On Sun, Oct 6, 2013 at 8:48 PM, Vinod Koul <vinod.koul@intel.com> wrote:
> > On Mon, Oct 07, 2013 at 10:39:34AM +0900, Chanho Park wrote:
> >> > > Why didn't you use a cookie value to track the request?
> >> > > The cookie is assigned when each transfer is submitted.
> >> > > If you save the value in the desc, we can find the request easily.
> >> >
> >> > If there are several cyclic desc in the work list, is there a better way
> >> > to find the "current" one?  The chan struct tracks the last completed and
> >> > last submitted cookies, but these will be the first and last
> >> > respectively as long as the cyclic transfer is active.  Is there an
> >> > "active" cookie stored somewhere that I missed?
> >>
> >> Assume there are three cookies. If you want to get the second cookie not
> >> latest cookie, your way can be also correct in such case?
> >> I think tx_status API is to get dma status of the given cookie.
> >> You are only considering a cyclic case.
> > For cyclic case you would have possible same descriptor running till you
> > terminate.
> 
> The cyclic case that makes this interesting is when there are multiple
> cyclic descriptors in the list. The cookie and completed_cookie
> markers don't help to determine which of the descriptors in the list
> is currently active.  dma_cookie_complete isn't called for a cyclic
> desc, the desc is just pushed to the end of the list.
Yes the cyclic is a very different case. I think driver can still return for
cyclic case which was txstate->last and that will give clue to client which is
getting processed now!

> > For non cyclic, if you have 3 descriptors submitted, the cookie value can be, say
> > 7, 8 and 9. If you query the status of any descriptor and pass the last optional
> > txstate arg then you will know the last cookie completed. so if txstate->last is
> > 7, then 7th was completed and 8 should be running and 9 in queue!
> 
> Got it, but the correct desc for cookie 8 will still have to be
> searched for, correct?
Yes

-- 
~Vinod

  reply	other threads:[~2013-10-10 16:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-11  6:08 [PATCH 0/3] Add pl330 residue support Padmavathi Venna
2013-09-11  6:08 ` Padmavathi Venna
2013-09-11  6:08 ` [PATCH 1/3] dmaengine: pl330: Set residue in tx_status callback Padmavathi Venna
2013-09-11  6:08   ` Padmavathi Venna
2013-09-12 11:40   ` Chanho Park
2013-09-12 11:40     ` Chanho Park
2013-09-13  3:03     ` Padma Venkat
2013-09-13  3:03       ` Padma Venkat
2013-10-02  4:33     ` Dylan Reid
2013-10-02  4:33       ` Dylan Reid
2013-10-07  1:39       ` Chanho Park
2013-10-07  1:39         ` Chanho Park
2013-10-07  3:48         ` Vinod Koul
2013-10-07  3:48           ` Vinod Koul
2013-10-09 20:37           ` Dylan Reid
2013-10-09 20:37             ` Dylan Reid
2013-10-10 15:58             ` Vinod Koul [this message]
2013-10-10 15:58               ` Vinod Koul
2013-12-03 23:56       ` Alban Browaeys
2013-12-03 23:56         ` Alban Browaeys
2013-09-17  7:01   ` Vinod Koul
2013-09-17  7:01     ` Vinod Koul
2013-09-11  6:08 ` [PATCH 2/3] ARM: SAMSUNG: Add residue DMA operation Padmavathi Venna
2013-09-11  6:08   ` Padmavathi Venna
2013-09-11  6:08 ` [PATCH 3/3] ASoC: Update pointer to account for pending dma transfers Padmavathi Venna
2013-09-11  6:08   ` Padmavathi Venna

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=20131010155855.GA2954@intel.com \
    --to=vinod.koul@intel.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=chanho61.park@samsung.com \
    --cc=dgreid@chromium.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=olofj@chromium.org \
    --cc=padma.kvr@gmail.com \
    --cc=padma.v@samsung.com \
    --cc=sbkim73@samsung.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.