Re: [PATCH v2 14/22] media: rockchip: rga: support external iommus
From: Nicolas Dufresne
Date: Wed Jan 07 2026 - 09:24:28 EST
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
Attachment:
signature.asc
Description: This is a digitally signed message part