Re: [PATCH v3 03/24] dma-buf: Add the SGT DMA mapping type
From: Jason Gunthorpe
Date: Tue Nov 24 2026 - 14:46:37 EST
On Tue, Nov 24, 2026 at 05:02:31PM +0100, Christian König wrote:
> The whole conversion from phys_vec to DMA addresses is something
> some API should provide based on the data the exporter/importer have
> negotiated (e.g. p2pdma_provider for example).
Yeah, probably, and this is exactly why I think it will take some
time. Building a new something in lib/ like this is not a
straightforward task.
But also, this:
> > You need to negotiate the actual C data types too, especially if you
> > want to do that nasty idea where dmabuf populates an iommu domain.
>
> Yeah agree as well, but to be honest that task is negligible. We
> first need to figure out where to put the code.
Means you need to get the phys_addr_t into the dma-buf code so it can
do this conversion.
I'm still absolutely NAKity against allowing any DRM driver visibility
to an importer's iommu_domain if we do this hack.
I don't see how to meet all these concerns without making dma-buf into
a "converter" framework...
Regards,
Jason