Re: [PATCH 2/2] dma-buf: add helpers for attacher dma-parms

2012-08-06 Thread Tomasz Stanislawski
On 08/06/2012 01:58 PM, Michal Nazarewicz wrote: > > Tomasz Stanislawski writes: >> I recommend to change the semantics for unlimited number of segments >> from 'value 0' to: >> >> #define DMA_SEGMENTS_COUNT_UNLIMITED ((unsigned long)INT_MAX) Sorry. It should be: #define DMA_SEGMENTS_COUNT_UNLIM

Re: [PATCH 2/2] dma-buf: add helpers for attacher dma-parms

2012-08-06 Thread Michal Nazarewicz
Tomasz Stanislawski writes: > I recommend to change the semantics for unlimited number of segments > from 'value 0' to: > > #define DMA_SEGMENTS_COUNT_UNLIMITED ((unsigned long)INT_MAX) > > Using INT_MAX will allow using safe conversions between signed and > unsigned integers. LONG_MAX seems cle

Re: [PATCH 2/2] dma-buf: add helpers for attacher dma-parms

2012-08-06 Thread Tomasz Stanislawski
Hi Rob, On 07/19/2012 06:23 PM, Rob Clark wrote: > From: Rob Clark > > Add some helpers to iterate through all attachers and get the most > restrictive segment size/count/boundary. > > Signed-off-by: Rob Clark > --- > drivers/base/dma-buf.c | 63 > +

Re: [PATCH 2/2] dma-buf: add helpers for attacher dma-parms

2012-08-05 Thread Semwal, Sumit
On Fri, Jul 20, 2012 at 10:09 PM, Rob Clark wrote: > Fyi, Daniel Vetter had suggested on IRC that it would be cleaner to > have a single helper fxn that most-restrictive union of all attached > device's dma_parms. Really this should include dma_mask and > coherent_dma_mask, I think. But that tou

Re: [PATCH 2/2] dma-buf: add helpers for attacher dma-parms

2012-07-20 Thread Rob Clark
Fyi, Daniel Vetter had suggested on IRC that it would be cleaner to have a single helper fxn that most-restrictive union of all attached device's dma_parms. Really this should include dma_mask and coherent_dma_mask, I think. But that touches a lot of other places in the code. If no one objects t

[PATCH 2/2] dma-buf: add helpers for attacher dma-parms

2012-07-19 Thread Rob Clark
From: Rob Clark Add some helpers to iterate through all attachers and get the most restrictive segment size/count/boundary. Signed-off-by: Rob Clark --- drivers/base/dma-buf.c | 63 +++ include/linux/dma-buf.h | 19 ++ 2 files change