Messages in this thread |  | | | Date | Wed, 01 Jul 2009 15:58:40 +0200 | | From | Nicolas Ferre <> | | Subject | Re: [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
|  |