* Re: [PATCH v4 0/3] Apple M1 DART IOMMU driver [not found] ` <7261df01-34a9-4e53-37cd-ae1aa15b1fb4@arm.com> @ 2021-07-16 6:24 ` Christoph Hellwig 2021-07-16 15:32 ` Robin Murphy 0 siblings, 1 reply; 2+ messages in thread From: Christoph Hellwig @ 2021-07-16 6:24 UTC (permalink / raw) To: Robin Murphy Cc: Sven Peter, Will Deacon, Joerg Roedel, Arnd Bergmann, devicetree, Hector Martin, linux-kernel, Marc Zyngier, Mohamed Mediouni, Stan Skowronek, linux-arm-kernel, Mark Kettenis, iommu, Alexander Graf, Alyssa Rosenzweig, Rob Herring, r.czerwinski, Mauro Carvalho Chehab, linux-media On Wed, Jul 14, 2021 at 07:19:50PM +0100, Robin Murphy wrote: > Even at the DMA API level you could hide *some* of it (at the cost of > effectively only having 1/4 of the usable address space), but there are > still cases like where v4l2 has a hard requirement that a page-aligned > scatterlist can be mapped into a contiguous region of DMA addresses. Where does v4l2 make that broken assumption? Plenty of dma mapping implementations including dma-direct do not support that. Drivers need to call dma_get_merge_boundary() to check for that kind of behavior. ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v4 0/3] Apple M1 DART IOMMU driver 2021-07-16 6:24 ` [PATCH v4 0/3] Apple M1 DART IOMMU driver Christoph Hellwig @ 2021-07-16 15:32 ` Robin Murphy 0 siblings, 0 replies; 2+ messages in thread From: Robin Murphy @ 2021-07-16 15:32 UTC (permalink / raw) To: Christoph Hellwig Cc: Sven Peter, Will Deacon, Joerg Roedel, Arnd Bergmann, devicetree, Hector Martin, linux-kernel, Marc Zyngier, Mohamed Mediouni, Stan Skowronek, linux-arm-kernel, Mark Kettenis, iommu, Alexander Graf, Alyssa Rosenzweig, Rob Herring, r.czerwinski, Mauro Carvalho Chehab, linux-media On 2021-07-16 07:24, Christoph Hellwig wrote: > On Wed, Jul 14, 2021 at 07:19:50PM +0100, Robin Murphy wrote: >> Even at the DMA API level you could hide *some* of it (at the cost of >> effectively only having 1/4 of the usable address space), but there are >> still cases like where v4l2 has a hard requirement that a page-aligned >> scatterlist can be mapped into a contiguous region of DMA addresses. > > Where does v4l2 make that broken assumption? Plenty of dma mapping > implementations including dma-direct do not support that. See vb2_dc_get_contiguous_size() and its callers. I still remember spending an entire work day on writing one email at the culmination of this discussion: https://lore.kernel.org/linux-iommu/56409B6D.5090903@arm.com/ 809eac54cdd6 was framed as an efficiency improvement because it technically was one (and something I had wanted to implement anyway), but it was also very much to save myself from any further email debates or customer calls about "regressing" code ported from 32-bit platforms... Robin. ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-16 15:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20210627143405.77298-1-sven@svenpeter.dev>
[not found] ` <7261df01-34a9-4e53-37cd-ae1aa15b1fb4@arm.com>
2021-07-16 6:24 ` [PATCH v4 0/3] Apple M1 DART IOMMU driver Christoph Hellwig
2021-07-16 15:32 ` Robin Murphy
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox