Re: [PATCH 1/4] media: venus: use dma_iova_size() to check the reserved IOVA size

From: Jason Gunthorpe

Date: Wed Dec 02 2026 - 12:00:30 EST


On Wed, Dec 02, 2026 at 05:47:25PM +0100, Marek Szyprowski wrote:
> > And what is the special meaning anyhow?
> Commit 953439251b59 ("media: venus: Fix iova allocation from restrict region")
> gives very cryptic explanation:
>
>  +-----------------------------------------------------------+
>  | non-pixel stream addressable range (600 MB - 3.5 GB)      |
>  | 0x25800000 - 0xe0000000                                   |
>  +-----------------------------------------------------------+
>  | pixel stream addressable range (0 - 3.5 GB)               |
>  | 0x00000000 - 0xe0000000                                   |
>  +-----------------------------------------------------------+
>
> Whatever the 'non-pixel stream' means. BTW, this also shows that the upper 0.5GB
> of IOVA space is also not supported by this device. What if the buffer lands
> there?
>
> IMHO allowing the drivers to mark some IOVA space as reserved (for whatever reasons)
> would let us cleanly support such weird cases (it would also cover my case of legacy
> Exynos drivers, which have very limited IOVA address space; it must not start
> at 0, so it was not possible to limit it via dma_mask).

Well, is it "reserved"

Or

I need IOVA from this range because I need it to have the special
meaning which matches the DMA the driver is setting up?

I gather this driver is willing to throw away its low 600 MB, but does
it ever want to setup "pixel stream addressible" DMA someday?

More information would help design something appropraite here, I
think.

Jason