mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "John Hubbard" <jhubbard@nvidia.com>,
	"Danilo Krummrich" <dakr@kernel.org>
Cc: "Alexandre Courbot" <acourbot@nvidia.com>,
	"Joel Fernandes" <joelagnelf@nvidia.com>,
	"Timur Tabi" <ttabi@nvidia.com>,
	"Alistair Popple" <apopple@nvidia.com>,
	"Edwin Peer" <epeer@nvidia.com>, "Zhi Wang" <zhiw@nvidia.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	nouveau@lists.freedesktop.org, rust-for-linux@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Nouveau <nouveau-bounces@lists.freedesktop.org>
Subject: Re: [PATCH v9 3/4] gpu: nova-core: add boot42 support for next-gen GPUs
Date: Sat, 15 Nov 2025 23:13:53 +0900	[thread overview]
Message-ID: <DE9BX3JU2CXF.2TOJUW5WCLENA@nvidia.com> (raw)
In-Reply-To: <20251115010923.1192144-4-jhubbard@nvidia.com>

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@nvidia.com>
> Cc: Danilo Krummrich <dakr@kernel.org>
> Cc: Timur Tabi <ttabi@nvidia.com>
> Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
> Signed-off-by: John Hubbard <jhubbard@nvidia.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.


  reply	other threads:[~2025-11-15 14:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-15  1:09 [PATCH v9 0/4] gpu: nova: " John Hubbard
2025-11-15  1:09 ` [PATCH v9 1/4] gpu: nova-core: prepare Spec and Revision types for boot0/boot42 John Hubbard
2025-11-15  1:09 ` [PATCH v9 2/4] gpu: nova-core: make Architecture behave as a u8 type John Hubbard
2025-11-15  1:09 ` [PATCH v9 3/4] gpu: nova-core: add boot42 support for next-gen GPUs John Hubbard
2025-11-15 14:13   ` Alexandre Courbot [this message]
2025-11-15 20:59     ` John Hubbard
2025-11-15  1:09 ` [PATCH v9 4/4] gpu: nova-core: provide a clear error report for unsupported GPUs John Hubbard
2025-11-15  1:12   ` John Hubbard
2025-11-15 14:13     ` Alexandre Courbot
2025-11-15 14:25 ` [PATCH v9 0/4] gpu: nova: add boot42 support for next-gen GPUs Alexandre Courbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DE9BX3JU2CXF.2TOJUW5WCLENA@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=a.hindborg@kernel.org \
    --cc=airlied@gmail.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=apopple@nvidia.com \
    --cc=bhelgaas@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=epeer@nvidia.com \
    --cc=gary@garyguo.net \
    --cc=jhubbard@nvidia.com \
    --cc=joelagnelf@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=nouveau-bounces@lists.freedesktop.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tmgross@umich.edu \
    --cc=ttabi@nvidia.com \
    --cc=zhiw@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®