[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210201163726.GA8279@lst.de>
Date: Mon, 1 Feb 2021 17:37:26 +0100
From: Christoph Hellwig <hch@....de>
To: Ricardo Ribalda <ribalda@...omium.org>
Cc: Christoph Hellwig <hch@....de>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Tomasz Figa <tfiga@...omium.org>,
Sergey Senozhatsky <senozhatsky@...gle.com>,
"list@....net:IOMMU DRIVERS <iommu@...ts.linux-foundation.org>, Joerg
Roedel <joro@...tes.org>," <iommu@...ts.linux-foundation.org>,
Linux Media Mailing List <linux-media@...r.kernel.org>,
Robin Murphy <robin.murphy@....com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Doc Mailing List <linux-doc@...r.kernel.org>
Subject: Re: [PATCH 6/6] media: uvcvideo: Use dma_alloc_noncontiguos API
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_vmap_range() ?
>
> something like ?
> else {
> dma_sync_sgtable_for_cpu(dma_dev, uvc_urb->sgt, DMA_FROM_DEVICE);
> invalidate_kernel_vmap_range(uvc_urb->buffer,
> uvc_urb->stream->urb_size );
> }
Yes. Right now we don't have a proper state machine for the
*_kernel_vmap_range, but we should probably add one once usage of this
grows. Until then I need to respin my API patch to document how callers
need to use *_kernel_vmap_range, as well as adding the so far missing
dma-debug support.
As we're getting toward the end of the merge window I'll try to get this
done ASAP.
How should we plan to merge this code? Do you have a tree you'd like
to pick up the whole thing for? Or should I create a dma-mapping
tree branch that can be pulled in?
Powered by blists - more mailing lists