Re: [PATCH 05/28] media/v4l2: remove V4L2-FLAG-MEMORY-NON-CONSISTENT
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Tomasz Figa <tfiga@xxxxxxxxxxxx>
- Subject: Re: [PATCH 05/28] media/v4l2: remove V4L2-FLAG-MEMORY-NON-CONSISTENT
- From: Christoph Hellwig <hch@xxxxxx>
- Date: Thu, 20 Aug 2020 18:52:13 +0200
- Cc: Christoph Hellwig <hch@xxxxxx>, Robin Murphy <robin.murphy@xxxxxxx>, alsa-devel@xxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, Linux Doc Mailing List <linux-doc@xxxxxxxxxxxxxxx>, nouveau@xxxxxxxxxxxxxxxxxxxxx, linux-nvme@xxxxxxxxxxxxxxxxxxx, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, linux-mm@xxxxxxxxx, Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>, linux-samsung-soc <linux-samsung-soc@xxxxxxxxxxxxxxx>, Joonyoung Shim <jy0922.shim@xxxxxxxxxxx>, linux-scsi@xxxxxxxxxxxxxxx, Kyungmin Park <kyungmin.park@xxxxxxxxxxx>, Ben Skeggs <bskeggs@xxxxxxxxxx>, Matt Porter <mporter@xxxxxxxxxxxxxxxxxxx>, Linux Media Mailing List <linux-media@xxxxxxxxxxxxxxx>, Tom Lendacky <thomas.lendacky@xxxxxxx>, Pawel Osciak <pawel@xxxxxxxxxx>, Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>, "list@xxxxxxx:IOMMU DRIVERS" <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, "list@xxxxxxx:IOMMU DRIVERS <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>," <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>, linux-parisc@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, Seung-Woo Kim <sw0312.kim@xxxxxxxxxxx>, linux-mips@xxxxxxxxxxxxxxx
- In-reply-to: <CAAFQd5AknYpP5BamC=wJkEJyO-q47V6Gc+HT65h6B+HyT+-xjQ@mail.gmail.com>
- References: <20200819065555.1802761-1-hch@lst.de> <20200819065555.1802761-6-hch@lst.de> <CAAFQd5COLxjydDYrfx47ht8tj-aNPiaVnC+WyQA7nvpW4gs=ww@mail.gmail.com> <62e4f4fc-c8a5-3ee8-c576-fe7178cb4356@arm.com> <CAAFQd5AcCTDguB2C9KyDiutXWoEvBL8tL7+a==Uo8vj_8CLOJw@mail.gmail.com> <2b32f1d8-16f7-3352-40a5-420993d52fb5@arm.com> <20200820050214.GA4815@lst.de> <CAAFQd5AknYpP5BamC=wJkEJyO-q47V6Gc+HT65h6B+HyT+-xjQ@mail.gmail.com>
- User-agent: Mutt/1.5.17 (2007-11-01)
On Thu, Aug 20, 2020 at 12:24:31PM +0200, Tomasz Figa wrote:
> > Of course this still uses the scatterlist structure with its annoying
> > mix of input and output parametes, so I'd rather not expose it as
> > an official API at the DMA layer.
>
> The problem with the above open coded approach is that it requires
> explicit handling of the non-IOMMU and IOMMU cases and this is exactly
> what we don't want to have in vb2 and what was actually the job of the
> DMA API to hide. Is the plan to actually move the IOMMU handling out
> of the DMA API?
>
> Do you think we could instead turn it into a dma_alloc_noncoherent()
> helper, which has similar semantics as dma_alloc_attrs() and handles
> the various corner cases (e.g. invalidate_kernel_vmap_range and
> flush_kernel_vmap_range) to achieve the desired functionality without
> delegating the "hell", as you called it, to the users?
Yes, I guess I could do something in that direction. At least for
dma-iommu, which thanks to Robin should be all you'll need in the
foreseeable future.
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]