[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DDTXFK7JE59S.19TLPYTWTFHSU@nvidia.com>
Date: Tue, 28 Oct 2025 20:42:44 +0900
From: "Alexandre Courbot" <acourbot@...dia.com>
To: "John Hubbard" <jhubbard@...dia.com>, "Danilo Krummrich"
<dakr@...nel.org>
Cc: "Alexandre Courbot" <acourbot@...dia.com>, "Joel Fernandes"
<joelagnelf@...dia.com>, "Timur Tabi" <ttabi@...dia.com>, "Alistair Popple"
<apopple@...dia.com>, "Edwin Peer" <epeer@...dia.com>, "Zhi Wang"
<zhiw@...dia.com>, "David Airlie" <airlied@...il.com>, "Simona Vetter"
<simona@...ll.ch>, "Bjorn Helgaas" <bhelgaas@...gle.com>, "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>,
<nouveau@...ts.freedesktop.org>, <rust-for-linux@...r.kernel.org>, "LKML"
<linux-kernel@...r.kernel.org>, "Nouveau"
<nouveau-bounces@...ts.freedesktop.org>
Subject: Re: [PATCH v2 2/2] gpu: nova-core: add boot42 support for next-gen
GPUs
On Tue Oct 28, 2025 at 11:39 AM JST, John Hubbard wrote:
<snip>
> + // Now that we know it is something more recent than NV04, use boot42 if we
> + // previously determined that boot42 was both valid and relevant, and boot0
> + // otherwise.
> + let (chipset, major_revision, minor_revision) = if let Some(boot42) = boot42 {
> + (
> + boot42.chipset()?,
> + boot42.major_revision(),
> + boot42.minor_revision(),
> + )
> + } else {
> + // Current/older GPU: use BOOT0
> + (
> + boot0.chipset()?,
> + boot0.major_revision(),
> + boot0.minor_revision(),
> + )
> + };
> +
> Ok(Self {
> - chipset: boot0.chipset()?,
> - major_revision: boot0.major_revision(),
> - minor_revision: boot0.minor_revision(),
> + chipset,
> + major_revision,
> + minor_revision,
> })
Can we implement `TryFrom<NV_PMC_BOOT_0> for Spec` (and same for
`NV_PMC_BOOT_42`)? That way this code can become:
boot42.map(Spec::try_from).unwrap_or_else(|| Spec::try_from(boot0))
(untested ; but hopefully not too incorrect)
Powered by blists - more mailing lists