Re: [PATCH] media: uvcvideo: Use streaming DMA APIs to transfer buffers

2019-10-01 Thread Christoph Hellwig
On Mon, Sep 30, 2019 at 01:23:10AM -0700, Christoph Hellwig wrote: > And drivers really have no business looking at the dma mask. I have > a plan for dma_alloc_pages API that could replace that cruft, but > until then please use GFP_KERNEL and let the dma subsystem bounce > buffer if needed. Can

Re: [PATCH] media: uvcvideo: Use streaming DMA APIs to transfer buffers

2019-09-30 Thread Christoph Hellwig
On Sat, Sep 28, 2019 at 11:33:16AM +0800, Nicolas Boichat wrote: > > +static gfp_t uvc_alloc_gfp_flags(struct device *dev) > > +{ > > + u64 mask = dma_get_mask(dev); > > + > > + if (dev->bus_dma_mask) > > + mask &= dev->bus_dma_mask; > > + > > + if (mask <

Re: [PATCH] media: uvcvideo: Use streaming DMA APIs to transfer buffers

2019-09-27 Thread Nicolas Boichat
On Fri, Aug 2, 2019 at 9:13 PM Shik Chen wrote: > > Similar to the commit 1161db6776bd ("media: usb: pwc: Don't use coherent > DMA buffers for ISO transfer") [1] for the pwc driver. Use streaming DMA > APIs to transfer buffers and sync them explicitly, because accessing > buffers allocated by

Re: [PATCH] media: uvcvideo: Use streaming DMA APIs to transfer buffers

2019-08-26 Thread Tomasz Figa
On Fri, Aug 2, 2019 at 10:12 PM Shik Chen wrote: > > Similar to the commit 1161db6776bd ("media: usb: pwc: Don't use coherent > DMA buffers for ISO transfer") [1] for the pwc driver. Use streaming DMA > APIs to transfer buffers and sync them explicitly, because accessing > buffers allocated by

[PATCH] media: uvcvideo: Use streaming DMA APIs to transfer buffers

2019-08-02 Thread Shik Chen
Similar to the commit 1161db6776bd ("media: usb: pwc: Don't use coherent DMA buffers for ISO transfer") [1] for the pwc driver. Use streaming DMA APIs to transfer buffers and sync them explicitly, because accessing buffers allocated by usb_alloc_coherent() is slow on platforms without hardware