On Thu Dec 3, 2026 at 9:09 PM JST, Alexandre Courbot wrote: > From: John Hubbard <[email protected]> > > The r000 GSP firmware requires larger framebuffer reservations on > Blackwell than r570: > > * On GB10x and GB20x, the PMU backing store grows from 8 MiB to > 0x950000 bytes and the PMU surfaces grow by 256 KiB. > * On GB20x, the non-WPR heap grows from 2 MiB + 128 KiB to 3 MiB. > > Reserve the larger regions ahead of the r000 switch, as the r570 > firmware also accepts larger carveouts. > > Signed-off-by: John Hubbard <[email protected]> > Signed-off-by: Alexandre Courbot <[email protected]> > --- > drivers/gpu/nova-core/fb/hal/gb100.rs | 23 +++++++++++++++++++++-- > drivers/gpu/nova-core/fb/hal/gb202.rs | 4 ++-- > 2 files changed, 23 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/nova-core/fb/hal/gb100.rs > b/drivers/gpu/nova-core/fb/hal/gb100.rs > index 37b2ae762df4..34e9f08581fc 100644 > --- a/drivers/gpu/nova-core/fb/hal/gb100.rs > +++ b/drivers/gpu/nova-core/fb/hal/gb100.rs > @@ -78,9 +78,28 @@ fn write_sysmem_flush_page_gb100(hshub0: Mmio<'_, > regs::Hshub0Registers>, addr: > > hshub0.write_reg(regs::NV_PFB_HSHUB_EG_PCIE_FLUSH_SYSMEM_ADDR_LO::zeroed().with_adr(addr_lo)); > } > > -// This PMU reservation size is r570-specific. > +/// Size of the PMU backing store (9 MiB + 320 KiB). > +const PMU_BACKING_STORE_SIZE: usize = (SZ_1M * 9) + SZ_64K * 5; > + > +/// Size of the PMU surfaces. > +const PMU_SURFACES_SIZE: usize = SZ_16M + SZ_256K; > + > +/// Miscellaneous PMU memory. > +const PMU_MISC_SIZE: usize = SZ_4K; > + > +/// Alignment of the PMU reserved region. > +const PMU_RESERVED_MEMORY_ALIGNMENT: Alignment = Alignment::SZ_128K; > + > +/// PMU region above FRTS: the backing store, the surfaces and the > miscellaneous memory, aligned to > +/// [`PMU_RESERVED_MEMORY_ALIGNMENT`]. > +const PMU_RESERVED_SIZE: usize = const_align_up( > + PMU_BACKING_STORE_SIZE + PMU_SURFACES_SIZE + PMU_MISC_SIZE, > + PMU_RESERVED_MEMORY_ALIGNMENT, > +) > +.unwrap(); > + > pub(super) const fn pmu_reserved_size_gb100() -> u32 { > - cv!(const_align_up(SZ_8M + SZ_16M + SZ_4K, Alignment::SZ_128K).unwrap()) > + cv!(PMU_RESERVED_SIZE) > } > > impl FbHal for Gb100 { > diff --git a/drivers/gpu/nova-core/fb/hal/gb202.rs > b/drivers/gpu/nova-core/fb/hal/gb202.rs > index 4341ecf36188..40ea8e6b8a7d 100644 > --- a/drivers/gpu/nova-core/fb/hal/gb202.rs > +++ b/drivers/gpu/nova-core/fb/hal/gb202.rs > @@ -73,8 +73,8 @@ fn pmu_reserved_size(&self) -> u32 { > > fn non_wpr_heap_size(&self) -> u64 { > // Non-WPR heap for GB20x (see Open RM: kgspGetNonWprHeapSize, > GB202+). > - // This size is r570-specific. > - u64::SZ_2M + u64::SZ_128K > + // This size is r000-specific. > + 3 * u64::SZ_1M > } > > fn frts_size(&self) -> u64 {
I guess that Timur's series [1] will come after the switch to r000 so we still need this patch? If so, Reviewed-by: Eliot Courtney <[email protected]> [1]: https://lore.kernel.org/all/[email protected]/
