[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <DC8Z7MLH1J7K.176ZEFST32FS4@nvidia.com>
Date: Fri, 22 Aug 2025 22:04:27 +0900
From: "Alexandre Courbot" <acourbot@...dia.com>
To: "Danilo Krummrich" <dakr@...nel.org>
Cc: "Miguel Ojeda" <ojeda@...nel.org>, "Alex Gaynor"
<alex.gaynor@...il.com>, "Boqun Feng" <boqun.feng@...il.com>, "Gary Guo"
<gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, "Benno Lossin" <lossin@...nel.org>, "Andreas
Hindborg" <a.hindborg@...nel.org>, "Alice Ryhl" <aliceryhl@...gle.com>,
"Trevor Gross" <tmgross@...ch.edu>, "David Airlie" <airlied@...il.com>,
"Simona Vetter" <simona@...ll.ch>, "Maarten Lankhorst"
<maarten.lankhorst@...ux.intel.com>, "Maxime Ripard" <mripard@...nel.org>,
"Thomas Zimmermann" <tzimmermann@...e.de>,
<rust-for-linux@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<nouveau@...ts.freedesktop.org>, <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH 5/5] gpu: nova-core: firmware: process and prepare the
GSP firmware
On Fri Aug 22, 2025 at 9:57 PM JST, Danilo Krummrich wrote:
> Hi Alex,
>
> not a full review yet, but a few ad-hoc comments from skimming over it.
>
> On Fri Aug 22, 2025 at 2:47 PM CEST, Alexandre Courbot wrote:
>> +/// A device-mapped firmware with a set of (also device-mapped) pages tables mapping the firmware
>> +/// to the start of their own address space.
>> +pub(crate) struct GspFirmware {
>> + /// The GSP firmware inside a [`VVec`], device-mapped via a SG table.
>> + #[expect(unused)]
>
> Do we expect this to change? Otherwise, just prefix the field name with an
> underscore.
Yes, all the fields marked unused are eventually used in incoming
patches.
>
>> + fw: Pin<KBox<SGTable<Owned<VVec<u8>>>>>,
>> + /// The level 2 page table, mapping [`Self::fw`] at its beginning.
>> + #[expect(unused)]
>> + lvl2: Pin<KBox<SGTable<Owned<VVec<u8>>>>>,
>> + /// The level 1 page table, mapping [`Self::lvl2`] at its beginning.
>> + #[expect(unused)]
>> + lvl1: Pin<KBox<SGTable<Owned<VVec<u8>>>>>,
>
> Instead of creating three allocations, just make struct GspFirmware pin_data by
> itself. This should even propagate down to struct Gpu, which is pin_data.
>
> So everything can be in one single allocation.
Ah, I was actually wondering - thanks, will try and do that.
Powered by blists - more mailing lists