Re: [PATCH v9 05/23] gpu: nova-core: gsp: Expose total physical VRAM end from FB region info
From: Joel Fernandes
Date: Mon Mar 16 2026 - 13:07:01 EST
On Mon, 16 Mar 2026, Alexandre Courbot wrote:
> This is basically a repeat of the code of the previous patch. Let's
> implement an iterator over the FB memory regions (that filters out
> invalid regions) that we can leverage in both places so we don't need
> to repeat ourselves.
Good catch. Added `fb_regions()` to create an iterator which both this and
previous patch use. Nice simplification:
/// Compute the end of physical VRAM from all FB regions.
pub(crate) fn total_fb_end(&self) -> Option<u64> {
self.fb_regions().map(|reg| reg.limit.saturating_add(1)).max()
}
--
Joel Fernandes