Re: [PATCH 6/6] media: uvcvideo: Use dma_alloc_noncontiguos API

2021-03-11 Thread Laurent Pinchart
And I forgot to mention: On Fri, Mar 12, 2021 at 03:42:14AM +0200, Laurent Pinchart wrote: > Hi Christoph and Ricardo, > > Thank you for the patch. > > On Mon, Mar 01, 2021 at 09:52:36AM +0100, Christoph Hellwig wrote: > > From: Ricardo Ribalda > > > > On architectures where the is no coherent

Re: [PATCH 6/6] media: uvcvideo: Use dma_alloc_noncontiguos API

2021-03-11 Thread Laurent Pinchart
Hi Christoph and Ricardo, Thank you for the patch. On Mon, Mar 01, 2021 at 09:52:36AM +0100, Christoph Hellwig wrote: > From: Ricardo Ribalda > > On architectures where the is no coherent caching such as ARM use the s/the is/there is/ > dma_alloc_noncontiguos API and handle manually the cache

[PATCH 6/6] media: uvcvideo: Use dma_alloc_noncontiguos API

2021-03-01 Thread Christoph Hellwig
From: Ricardo Ribalda On architectures where the is no coherent caching such as ARM use the dma_alloc_noncontiguos API and handle manually the cache flushing using dma_sync_sgtable(). With this patch on the affected architectures we can measure up to 20x performance improvement in uvc_video_copy

Re: [PATCH 6/6] media: uvcvideo: Use dma_alloc_noncontiguos API

2021-02-01 Thread Christoph Hellwig
On Thu, Jan 28, 2021 at 06:00:57PM +0100, Ricardo Ribalda wrote: > > Given that we vmap the addresses this also needs > > flush_kernel_vmap_range / invalidate_kernel_vmap_range calls for > > VIVT architectures. > > We only read from the device to the cpu. Then can we run only > invalidate_kernel_v

Re: [PATCH 6/6] media: uvcvideo: Use dma_alloc_noncontiguos API

2021-01-28 Thread Ricardo Ribalda
HI Christoph Thanks for your comments On Thu, Jan 28, 2021 at 4:09 PM Christoph Hellwig wrote: > > I just included this patch as-is, but here are a few comments: > > On Thu, Jan 28, 2021 at 03:58:37PM +0100, Christoph Hellwig wrote: > > +static void uvc_urb_dma_sync(struct uvc_urb *uvc_urb, bool

Re: [PATCH 6/6] media: uvcvideo: Use dma_alloc_noncontiguos API

2021-01-28 Thread Ricardo Ribalda
On Thu, Jan 28, 2021 at 4:03 PM Christoph Hellwig wrote: > > From: Ricardo Ribalda > > On architectures where the is no coherent caching such as ARM use the > dma_alloc_noncontiguos API and handle manually the cache flushing using > dma_sync_sgtable(). > > With this patch on the affected architec

Re: [PATCH 6/6] media: uvcvideo: Use dma_alloc_noncontiguos API

2021-01-28 Thread Christoph Hellwig
I just included this patch as-is, but here are a few comments: On Thu, Jan 28, 2021 at 03:58:37PM +0100, Christoph Hellwig wrote: > +static void uvc_urb_dma_sync(struct uvc_urb *uvc_urb, bool for_device) > +{ > + struct device *dma_dev = dma_dev = stream_to_dmadev(uvc_urb->stream); > + > +

[PATCH 6/6] media: uvcvideo: Use dma_alloc_noncontiguos API

2021-01-28 Thread Christoph Hellwig
From: Ricardo Ribalda On architectures where the is no coherent caching such as ARM use the dma_alloc_noncontiguos API and handle manually the cache flushing using dma_sync_sgtable(). With this patch on the affected architectures we can measure up to 20x performance improvement in uvc_video_copy