John Hubbard
2025-Dec-03 05:59 UTC
[PATCH 18/31] gpu: nova-core: Hopper/Blackwell: add needs_large_reserved_mem()
Hopper, Blackwell and later need to reserve more memory than previous
GPUs did.
Signed-off-by: John Hubbard <jhubbard at nvidia.com>
---
drivers/gpu/nova-core/gpu.rs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs
index 624bbc2a54e8..c0473ef8ac47 100644
--- a/drivers/gpu/nova-core/gpu.rs
+++ b/drivers/gpu/nova-core/gpu.rs
@@ -123,6 +123,11 @@ pub(crate) const fn arch(&self) -> Architecture {
| Self::GB207 => Architecture::Blackwell,
}
}
+
+ #[expect(dead_code)]
+ pub(crate) fn needs_large_reserved_mem(&self) -> bool {
+ matches!(self.arch(), Architecture::Hopper | Architecture::Blackwell)
+ }
}
// TODO
--
2.52.0
Timur Tabi
2025-Dec-03 20:51 UTC
[PATCH 18/31] gpu: nova-core: Hopper/Blackwell: add needs_large_reserved_mem()
On Tue, 2025-12-02 at 21:59 -0800, John Hubbard wrote:> + > +??? #[expect(dead_code)] > +??? pub(crate) fn needs_large_reserved_mem(&self) -> bool { > +??????? matches!(self.arch(), Architecture::Hopper | Architecture::Blackwell) > +??? }Wouldn't it be cleaner to return the actual amount of memory needed, instead of just saying, "Hey, I need more, whatever more is"? let frts_offset = if !resume { let mut frts_reserved_size = if chipset.needs_large_reserved_mem() { - 0x220000 // heap_size_non_wpr for Hopper/Blackwell+ + crate::fb::calc_non_wpr_heap_size(chipset) } else { total_reserved_size }; Maybe have calc_non_wpr_heap_size() be a HAL function?