lkml.org 
[lkml]   [2009]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dmaengine: at_hdmac: add DMA slave transfers
Atsushi Nemoto wrote:
> On Mon, 27 Jul 2009 14:24:26 +0100, "Sosnowski, Maciej" <maciej.sosnowski@intel.com> wrote:
>>>> Your atc_chain_complete() calls dma_unmap_xxx unless
>>>> DMA_COMPL_SKIP_XXX_UNMAP specified. But atmel-mci driver does not set
>>>> the flag on dma_async_tx_descriptor. I suppose one of them should be
>>>> fixed.
>>> atmel-mci should definitely set that flag.
>>>
>>> Haavard
>> I agree with Haavard.
>
> Then, what should dma driver do when client driver did not set these
> flags? If it should call dma_unmap_sg(), the dma driver should keep
> sg and direction somewhere...
>
> Also, calling dma_map_sg() in its prep_slave_sg function will not fit
> for sound drivers, which use DMA buffers prepared in its framework.
>
> For slave DMA, doing all mapping/unmapping in DMA client is better,
> isn't it?
>

Yes it is. The whole point of the dma driver doing its own unmapping is
specifically for clients that use the async_tx api, i.e. where they do
not know if the transaction is carried out in hardware and have no way
of tracking the details necessary to perform the unmap. DMA-slave
clients request specific channels and know the hardware details at a low
level, so it should not be too high an expectation to push dma mapping
responsibility to the client.

--
Dan


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