lkml.org 
[lkml]   [2009]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2 v2] dmaengine: at_hdmac: new driver for the Atmel AHB DMA Controller
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



\
 
 \ /
  Last update: 2009-07-01 16:01    [W:0.174 / U:3.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site