[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DE9BX3JU2CXF.2TOJUW5WCLENA@nvidia.com>
Date: Sat, 15 Nov 2025 23:13:53 +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 v9 3/4] gpu: nova-core: add boot42 support for next-gen
GPUs
On Sat Nov 15, 2025 at 10:09 AM JST, John Hubbard wrote:
> NVIDIA GPUs are moving away from using NV_PMC_BOOT_0 to contain
> architecture and revision details, and will instead use NV_PMC_BOOT_42
> in the future. NV_PMC_BOOT_0 will contain a specific set of values
> that will mean "go read NV_PMC_BOOT_42 instead".
>
> Change the selection logic in Nova so that it will claim Turing and
> later GPUs. This will work for the foreseeable future, without any
> further code changes here, because all NVIDIA GPUs are considered, from
> the oldest supported on Linux (NV04), through the future GPUs.
>
> Add some comment documentation to explain, chronologically, how boot0
> and boot42 change with the GPU eras, and how that affects the selection
> logic.
>
> Cc: Alexandre Courbot <acourbot@...dia.com>
> Cc: Danilo Krummrich <dakr@...nel.org>
> Cc: Timur Tabi <ttabi@...dia.com>
> Reviewed-by: Joel Fernandes <joelagnelf@...dia.com>
> Signed-off-by: John Hubbard <jhubbard@...dia.com>
> ---
> drivers/gpu/nova-core/gpu.rs | 41 ++++++++++++++++++++++++++++++-----
> drivers/gpu/nova-core/regs.rs | 21 +++++++++++++-----
> 2 files changed, 52 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs
> index 88a6d7af9f37..8e04628ca3d9 100644
> --- a/drivers/gpu/nova-core/gpu.rs
> +++ b/drivers/gpu/nova-core/gpu.rs
> @@ -169,6 +169,15 @@ fn from(boot0: regs::NV_PMC_BOOT_0) -> Self {
> }
> }
>
> +impl From<regs::NV_PMC_BOOT_42> for Revision {
> + fn from(boot0: regs::NV_PMC_BOOT_42) -> Self {
> + Self {
> + major: boot0.major_revision(),
> + minor: boot0.minor_revision(),
> + }
> + }
> +}
Just one nit: similarly to how we are converting the `TryFrom<BOOT_0>
for Spec` into a `TryFrom<BOOT_42>`, I think we don't need to keep
`From<BOOT_0> for Revision`. Actually we don't even want it, as using it
would mean we are relying on BOOT_0 instead of BOOT_42, which this
patchset nicely makes our only source of truth.
I'll thus remove the `From<BOOT_0>` implementation before applying.
Powered by blists - more mailing lists