[PATCH v2 14/22] media: rockchip: rga: support external iommus

Nicolas Dufresne nicolas at ndufresne.ca
Wed Jan 7 06:24:25 PST 2026


Hi,

Le mercredi 07 janvier 2026 à 15:19 +0100, Sven Püschel a écrit :
> > > @@ -95,13 +96,16 @@ queue_init(void *priv, struct vb2_queue *src_vq,
> > > struct vb2_queue *dst_vq)
> > >    	src_vq->io_modes = VB2_MMAP | VB2_DMABUF;
> > >    	src_vq->drv_priv = ctx;
> > >    	src_vq->ops = &rga_qops;
> > > -	src_vq->mem_ops = &vb2_dma_sg_memops;
> > > +	src_vq->mem_ops = &vb2_dma_contig_memops;
> > That's a bit I'm less knowledgeable here, since I never used the sg_memops
> > in
> > any of my work, but what is the consequence ? (appart from gaining external
> > iommu support)
> 
> This is only for the external iommu support, which uses the 
> vb2_dma_contig_plane_dma_addr function to get a single linear address 
> (instead of vb2_dma_sg_plane_desc used for the manual iommu mapping).
> 
> Without an external iommu the value is overridden afterwards to 
> vb2_dma_sg_memops. I probably should move the if up to make clear that 
> this is only set for the external iommu case.
> 
> Or did I misunderstand your question?

That was it, I read quickly thinking it was always vb2_dma_contig_memops now,
regardless which iommu implementation is used. If you can make it clearer that
the ops depends on the context, that would be great.

Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260107/bf62bc41/attachment.sig>


More information about the linux-arm-kernel mailing list