[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAFQd5BcH-_S=WDvqYvSPxMvQuN5atO8q=xktbMaPS-DOCAYbw@mail.gmail.com>
Date: Thu, 20 Aug 2020 19:41:03 +0200
From: Tomasz Figa <tfiga@...omium.org>
To: Christoph Hellwig <hch@....de>
Cc: Robin Murphy <robin.murphy@....com>, alsa-devel@...a-project.org,
linux-ia64@...r.kernel.org,
Linux Doc Mailing List <linux-doc@...r.kernel.org>,
nouveau@...ts.freedesktop.org, linux-nvme@...ts.infradead.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
linux-mm@...ck.org, Marek Szyprowski <m.szyprowski@...sung.com>,
linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
Joonyoung Shim <jy0922.shim@...sung.com>,
linux-scsi@...r.kernel.org,
Kyungmin Park <kyungmin.park@...sung.com>,
Ben Skeggs <bskeggs@...hat.com>,
Matt Porter <mporter@...nel.crashing.org>,
Linux Media Mailing List <linux-media@...r.kernel.org>,
Tom Lendacky <thomas.lendacky@....com>,
Pawel Osciak <pawel@...iak.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
"list@....net:IOMMU DRIVERS" <iommu@...ts.linux-foundation.org>,
Joerg Roedel <joro@...tes.org>,
"list@....net:IOMMU DRIVERS <iommu@...ts.linux-foundation.org>, Joerg
Roedel <joro@...tes.org>," <linux-arm-kernel@...ts.infradead.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
linux-parisc@...r.kernel.org, netdev@...r.kernel.org,
Seung-Woo Kim <sw0312.kim@...sung.com>,
linux-mips@...r.kernel.org
Subject: Re: [PATCH 05/28] media/v4l2: remove V4L2-FLAG-MEMORY-NON-CONSISTENT
On Thu, Aug 20, 2020 at 6:52 PM Christoph Hellwig <hch@....de> wrote:
>
> 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.
That would be really great. Let me know if we can help by testing with
V4L2/vb2 or in any other way.
Best regards,
Tomasz
Powered by blists - more mailing lists