On 07/10/2015 07:01 PM, Vinod Koul wrote:
[...]
To handle the video case something else is needed. The current dmaengine
semantics are that once a descriptor is passed to dma_engine_submit() it is
owned by the DMAengine driver and the client must never ever touch it
again.
Commit b9855f03d560 overloaded DMA_CTRL_ACK to mean that the should be
re-usable by the client. But this breaks existing users of DMA_CTRL_ACK since
its a completely new and different meaning to the existing one. For marking a
descriptor as reusable for the client a new flag should probably be
introduced.
Lars,
IIRC the usage in sound/ was to ensure we dont clean up the descriptor once
the dma driver completes it so that we keep on using the same descriptor in
cyclic fashion, right?
No, this has nothing to do with cyclic DMA. The flag needs to be set
otherwise drivers with descriptor pools will consider the descriptor to be
in use, even if we are done using it and hence the it will run out of
descriptors eventually.
Maybe yes.
The problem will be to list the existing users of DMA_CTRL_ACK (dmaengine slave
API side), and see what is their expectation from this bit.
From the discussion we had with Vinod, there was no clear definition so far for
DMA_CTRL_ACK (still for dmaengine slave API). I might have overlooked something
here, so any input will be valuable.
I should have realised sound/ uses it and check this bit. Worst case we need
another flag
It's not just sound. The recommendation has always been set this flag unless
you know why you are not setting it. So pretty much every DMAengine client
driver sets it.
- Lars
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html