On 9/22/25 1:30 PM, Alistair Popple wrote:
> + // SAFETY: No DMA allocations have been made yet
It's not really about DMA allocations that have been made previously, there is
no unsafe behavior in that.
It's about the method must not be called concurrently with any DMA allocation or
mapping primitives.
Can you please adjust the comment correspondingly?
> + unsafe { pdev.dma_set_mask_and_coherent(DmaMask::new::<47>())? };
As Boqun mentioned, we shouldn't have a magic number for this. I don't know if
it will change for future chips, but maybe we should move this to gpu::Spec to
be safe.
At least, create a constant for it (also in gpu::Spec?); in Nouveau I named this
NOUVEAU_VA_SPACE_BITS back then. Not a great name, if you have a better idea,
please go for it. :)