[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b2710a3d-a1f5-449f-b0c7-be0f7c8b2be3@nvidia.com>
Date: Wed, 3 Dec 2025 23:36:26 -0800
From: John Hubbard <jhubbard@...dia.com>
To: Timur Tabi <ttabi@...dia.com>, "dakr@...nel.org" <dakr@...nel.org>
Cc: Alexandre Courbot <acourbot@...dia.com>,
"lossin@...nel.org" <lossin@...nel.org>,
"a.hindborg@...nel.org" <a.hindborg@...nel.org>,
"boqun.feng@...il.com" <boqun.feng@...il.com>,
"aliceryhl@...gle.com" <aliceryhl@...gle.com>, Zhi Wang <zhiw@...dia.com>,
"simona@...ll.ch" <simona@...ll.ch>,
"alex.gaynor@...il.com" <alex.gaynor@...il.com>,
"ojeda@...nel.org" <ojeda@...nel.org>, "tmgross@...ch.edu"
<tmgross@...ch.edu>,
"nouveau@...ts.freedesktop.org" <nouveau@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"rust-for-linux@...r.kernel.org" <rust-for-linux@...r.kernel.org>,
"bjorn3_gh@...tonmail.com" <bjorn3_gh@...tonmail.com>,
Edwin Peer <epeer@...dia.com>, "airlied@...il.com" <airlied@...il.com>,
Joel Fernandes <joelagnelf@...dia.com>,
"bhelgaas@...gle.com" <bhelgaas@...gle.com>,
"gary@...yguo.net" <gary@...yguo.net>, Alistair Popple <apopple@...dia.com>
Subject: Re: [PATCH 18/31] gpu: nova-core: Hopper/Blackwell: add
needs_large_reserved_mem()
On 12/3/25 12:51 PM, Timur Tabi wrote:
> 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?
>
Good idea, it does look like a HAL function now that you mention it.
I'll do that.
thanks,
--
John Hubbard
Powered by blists - more mailing lists