Re: [PATCH] drm/tyr: clamp va_bits to available bits

From: Alice Ryhl

Date: Wed Nov 25 2026 - 16:56:44 EST


On Wed, Nov 25, 2026 at 01:28:20PM -0700, Deborah Brouwer wrote:
> Tyr creates a virtual memory space using the number of bits supported in
> virtual addresses as reported by the gpu. But the page table mapping
> operations limit the width of the input virtual addresses to unsigned
> long. This can result in tyr creating a virtual memory space that is
> larger than a 32-bit system can support.
>
> Check if the virtual address space bits supported by the gpu are larger
> than the width of unsigned long, and if so, clamp the virtual address
> space bits to this smaller size.
>
> This reproduces the clamping that already occurs in panthor_mmu_init().

Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>

Alice