[PATCH v2 05/14] arm: common: edma: Select event queue 1 as default when booted with DT
peter.ujfalusi at ti.com
Thu Apr 24 02:07:09 PDT 2014
On 04/16/2014 07:05 PM, Joel Fernandes wrote:
> On 04/16/2014 07:59 AM, Peter Ujfalusi wrote:
>>>>>> If the dma-priority is missing we should assume lowest priority (0).
>>>>>> The highest priority depends on the platform. For eDMA3 in AM335x it is three
>>>>>> level. For designware controller you might have the range 0-8 as valid.
>>>>>> The question is how to get this information into use?
>>>>>> We can take the priority number in the core when the dma channel is requested
>>>>>> and add field to "struct dma_chan" in order to store it and the DMA drivers
>>>>>> could have access to it.
>>> How about Vinod's idea of extending dma_slave_config? Priority is
>>> similar to rest of the runtime setup dmaengine_slave_config() is meant
>>> to do.
>> The dma_slave_config is prepared by the client drivers, so they would need to
>> be updated to handle the priority for the DMA. This would lead to duplicated
>> code - unless we have a small function in dmaengine core to fetch this
>> information, but still all dmaengine clients would need to call that.
>> IMHO it would be better to let the dmaengine core to take the priority for the
>> channel when it has been asked so client drivers does not need to know about it.
> I still feel it is much cleaner to keep this out of DT and have audio
> driver configure the channel manually for higher priority. Because,
> AFAIK audio is the only device that uses slave DMA and needs higher
> priority. I'd imagine everyone else who needs high priority, have their
> own dedicated DMAC, so from that sense I don't see the priority
> mechanism being used a lot anywhere else but audio, so atleast we can
> rule out things like code duplication in other drivers. Priority can be
> set to a default of low for those drivers that don't configure the
> channel for priority. I'm also OK with EDMA driver configuring channel
> for higher priority manually for the Cyclic case like you did initially.
So how should we go about this?
I'm fine to select higher priority in the eDMA driver for now when a cyclic
channel is configured and later when we have (if we ever have) generic way to
handle DMA channel/transaction priority we can switch eDMA as well to use it.
More information about the linux-arm-kernel