lkml.org 
[lkml]   [2013]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] dmaengine: add dma_slave_get_caps api
On Mon, Jul 08, 2013 at 02:01:35PM +0200, Lars-Peter Clausen wrote:
> On 07/08/2013 10:54 AM, Vinod Koul wrote:
> > +/* struct dma_slave_caps - expose capabilities of a slave channel only
> > + *
> > + * @src_addr_widths: bit mask of src addr widths the channel supports
> > + * @dstn_addr_widths: bit mask of dstn addr widths the channel supports
> > + * @src_burst_lengths: bit mask of src slave burst lengths supported
> > + * @dstn_burst_lengths: bit mask of dstn slave burst lengths supported
>
> I'm not sure if we need the burst_lengths fields. For one we can only
> express a max burst length up 32. And usually it is fine if the dma
> controller does not support the burst length requested by the slave driver,
> since this only specifies the maximum and the dma controller driver can
> choose a value below this limit. E.g. if the max burst length is set to 16
> it is still fine if the controller only supports a burst length of 8.
well how are you picking up which one to use?
The idea is that you query and match that with system and client to get best
throughput. If you have IP block which over generations change capablities you
can runtime query and then program the channel smartly!

> > +static inline struct dma_slave_caps *dma_get_slave_caps(struct dma_chan *chan)
>
> Same comment as for Matt's patch. The caller of the dma_get_slave_caps()
> should pass in a pointer to a dma_slave_caps struct which the dma driver
> will then fill in. This makes it much clearer to the caller what the
> lifetime of the struct is.
Yup i agree, will update...

~Vinod
--


\
 
 \ /
  Last update: 2013-07-10 23:18    [W:0.106 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site