linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: Viresh Kumar <viresh.kumar@st.com>,
	Stephen Warren <swarren@nvidia.com>,
	Linus Walleij <linus.walleij@stericsson.com>,
	Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>,
	Vinod Koul <vinod.koul@intel.com>, Zhang Wei <zw@zh-kernel.org>,
	Barry Song <baohua.song@csr.com>,
	Dan Williams <dan.j.williams@intel.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 6/9] dmaengine: consolidate tx_status functions
Date: Tue, 6 Mar 2012 08:59:39 +0000	[thread overview]
Message-ID: <20120306085939.GC17370@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <ADE657CA350FB648AAC2C43247A983F001F41FF555BD@AUSP01VMBX24.collaborationhost.net>

On Mon, Mar 05, 2012 at 06:12:50PM -0600, H Hartley Sweeten wrote:
> On Monday, March 05, 2012 1:17 PM, Russell King wrote:
> > diff --git a/drivers/dma/dmaengine.h b/drivers/dma/dmaengine.h
> > index 47e0997..244a2c5 100644
> > --- a/drivers/dma/dmaengine.h
> > +++ b/drivers/dma/dmaengine.h
> > @@ -45,4 +45,35 @@ static inline void dma_cookie_complete(struct dma_async_tx_descriptor *tx)
> >  	tx->cookie = 0;
> >  }
> >  
> > +/**
> > + * dma_cookie_status - report cookie status
> > + * @chan: dma channel
> > + * @cookie: cookie we are interested in
> > + * @state: dma_tx_state structure to return last/used cookies
> > + *
> > + * Report the status of the cookie, filling in the state structure if
> > + * non-NULL.  No locking is required.
> > + */
> > +static inline enum dma_status dma_cookie_status(struct dma_chan *chan,
> > +	dma_cookie_t cookie, struct dma_tx_state *state)
> > +{
> > +	dma_cookie_t used, complete;
> > +
> > +	used = chan->cookie;
> > +	complete = chan->complete;
> > +	barrier();
> > +	if (state) {
> > +		state->last = complete;
> > +		state->used = used;
> > +		state->residue = 0;
> > +	}
> 
> Isn't this dma_set_tx_state()?

It's more than dma_set_tx_state().  It is my intention to get rid of
dma_set_tx_state() in favour of these implementations.

> > +	return dma_async_is_complete(cookie, complete, used);
> > +}
> 
> Regards,
> Hartley
> 

  reply	other threads:[~2012-03-06  9:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-05 20:14 [PATCH 0/9] DMA engine cookie handling cleanups Russell King - ARM Linux
2012-03-05 20:15 ` [PATCH 2/9] dmaengine: move last completed cookie into generic dma_chan structure Russell King - ARM Linux
2012-03-05 20:15 ` [PATCH 3/9] dmaengine: add private header file Russell King - ARM Linux
2012-03-05 23:28   ` H Hartley Sweeten
2012-03-05 20:16 ` [PATCH 4/9] dmaengine: consolidate assignment of DMA cookies Russell King - ARM Linux
2012-03-05 20:16 ` [PATCH 5/9] dmaengine: provide a common function for completing a dma descriptor Russell King - ARM Linux
2012-03-05 20:16 ` [PATCH 6/9] dmaengine: consolidate tx_status functions Russell King - ARM Linux
2012-03-05 23:35   ` H Hartley Sweeten
2012-03-06  0:12   ` H Hartley Sweeten
2012-03-06  8:59     ` Russell King - ARM Linux [this message]
2012-03-05 20:17 ` [PATCH 9/9] dmaengine: ensure all DMA engine drivers initialize their cookies Russell King - ARM Linux
2012-03-05 20:50 ` [PATCH 0/9] DMA engine cookie handling cleanups Linus Walleij
2012-03-05 20:58   ` Russell King - ARM Linux
2012-03-05 23:44   ` H Hartley Sweeten
2012-03-05 23:54 ` Russell King - ARM Linux
  -- strict thread matches above, loose matches on Subject: below --
2012-03-06 22:33 [PATCH v2 " Russell King - ARM Linux
2012-03-06 22:35 ` [PATCH 6/9] dmaengine: consolidate tx_status functions Russell King - ARM Linux
2012-03-07  1:04   ` H Hartley Sweeten

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=20120306085939.GC17370@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=baohua.song@csr.com \
    --cc=dan.j.williams@intel.com \
    --cc=hartleys@visionengravers.com \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=srinidhi.kasagar@stericsson.com \
    --cc=swarren@nvidia.com \
    --cc=vinod.koul@intel.com \
    --cc=viresh.kumar@st.com \
    --cc=zw@zh-kernel.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).