public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: dan.j.williams@intel.com, maciej.sosnowski@intel.com
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>,
	avictor.za@gmail.com, linux-arm-kernel@lists.arm.linux.org.uk,
	patrice.vilchez@atmel.com, linux-kernel@vger.kernel.org,
	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: [PATCH 1/2 v2] dmaengine: at_hdmac: new driver for the Atmel AHB DMA Controller
Date: Wed, 01 Jul 2009 15:58:40 +0200	[thread overview]
Message-ID: <4A4B6B90.90006@atmel.com> (raw)
In-Reply-To: <1246012936-10812-1-git-send-email-nicolas.ferre@atmel.com>

Hi,

Just one question Dan (see below).

Nicolas Ferre :
> This AHB DMA Controller (aka HDMA or DMAC on AT91 systems) is availlable on
> at91sam9rl chip. It will be used on other products in the future.

[..]

> +/**
> + * atc_chain_complete - finish work for one transaction chain
> + * @atchan: channel we work on
> + * @desc: descriptor at the head of the chain we want do complete
> + *
> + * Called with atchan->lock held and bh disabled */
> +static void
> +atc_chain_complete(struct at_dma_chan *atchan, struct at_desc *desc)
> +{
> +	dma_async_tx_callback		callback;
> +	void				*param;
> +	struct dma_async_tx_descriptor	*txd = &desc->txd;
> +
> +	dev_vdbg(chan2dev(&atchan->chan_common),
> +		"descriptor %u complete\n", txd->cookie);
> +
> +	atchan->completed_cookie = txd->cookie;
> +	callback = txd->callback;
> +	param = txd->callback_param;
> +
> +	/* move children to free_list */
> +	list_splice_init(&txd->tx_list, &atchan->free_list);
> +	/* move myself to free_list */
> +	list_move(&desc->desc_node, &atchan->free_list);
> +
> +	/*
> +	 * We use dma_unmap_page() regardless of how the buffers were
> +	 * mapped before they were submitted...
> +	 */
> +	if (!(txd->flags & DMA_COMPL_SKIP_DEST_UNMAP))
> +		dma_unmap_page(chan2parent(&atchan->chan_common), desc->lli.daddr,
> +				desc->len, DMA_FROM_DEVICE);
> +	if (!(txd->flags & DMA_COMPL_SKIP_SRC_UNMAP))
> +		dma_unmap_page(chan2parent(&atchan->chan_common), desc->lli.saddr,
> +				desc->len, DMA_TO_DEVICE);
> +
> +	/*
> +	 * The API requires that no submissions are done from a
> +	 * callback, so we don't need to drop the lock here
> +	 */
> +	if (callback)
> +		callback(param);

Even if our dma controller does not seems to take advantage of
dependency requests...

...should I add the
dma_run_dependencies(txd);
call here to improve conformance to dmaengine standards ?

As you advice Atsushi Nemoto to do so, I was wondering if I have to do
the same.

Thanks for your help.
-- 
Nicolas Ferre


  parent reply	other threads:[~2009-07-01 13:59 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-26 10:42 [PATCH 1/2 v2] dmaengine: at_hdmac: new driver for the Atmel AHB DMA Controller Nicolas Ferre
2009-06-26 10:42 ` [PATCH 2/2 v2] at91/dmaengine: integration of at_hdmac driver in at91sam9rl Nicolas Ferre
2009-06-27 15:06 ` [PATCH 1/2 v2] dmaengine: at_hdmac: new driver for the Atmel AHB DMA Controller Atsushi Nemoto
2009-07-01 15:30   ` Nicolas Ferre
2009-07-03 15:12     ` Atsushi Nemoto
2009-07-01 13:58 ` Nicolas Ferre [this message]
2009-07-02  0:58   ` Dan Williams
2009-07-02  1:18 ` Dan Williams
2009-07-03 12:59 ` Sosnowski, Maciej
2009-07-03 13:03   ` Nicolas Ferre
     [not found] ` <0bb1aaf3fca441453fbb9296e1a35d7921d74467.1246641180.git.nicolas.ferre@atmel.com>
2009-07-03 17:24   ` [PATCH 1/2 v3] " Nicolas Ferre
2009-07-17 10:38     ` Nicolas Ferre
2009-07-18 16:01     ` Dan Williams
2009-07-21  8:33       ` Nicolas Ferre
2009-07-22 13:35         ` Sosnowski, Maciej
2009-07-22 18:04     ` [PATCH] dmaengine: at_hdmac: add DMA slave transfers Nicolas Ferre
2009-07-23 17:13       ` Dan Williams
2009-07-24  7:35         ` Nicolas Ferre
2009-07-24 13:29           ` Atsushi Nemoto
2009-07-24 14:10             ` Haavard Skinnemoen
2009-07-27 13:24               ` Sosnowski, Maciej
2009-07-28 15:13                 ` Atsushi Nemoto
2009-07-29 13:05                   ` Sosnowski, Maciej
2009-07-29 15:16                     ` Atsushi Nemoto
2009-07-29 14:27                   ` Dan Williams
2009-07-31  3:58                     ` Atsushi Nemoto
2009-07-27 13:22       ` Sosnowski, Maciej

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=4A4B6B90.90006@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=avictor.za@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maciej.sosnowski@intel.com \
    --cc=patrice.vilchez@atmel.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