mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Danilo Krummrich <dakr@kernel.org>,
	Alexandre Courbot <acourbot@nvidia.com>
Cc: "Timur Tabi" <ttabi@nvidia.com>,
	"Alistair Popple" <apopple@nvidia.com>,
	"Eliot Courtney" <ecourtney@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>,
	nova-gpu@lists.linux.dev, LKML <linux-kernel@vger.kernel.org>,
	"John Hubbard" <jhubbard@nvidia.com>
Subject: [PATCH 1/4] gpu: nova-core: record the BOOT_42 implementation field in the GPU spec
Date: Thu, 17 Sep 2026 19:12:46 -0700	[thread overview]
Message-ID: <20260918021249.1187837-2-jhubbard@nvidia.com> (raw)
In-Reply-To: <20260918021249.1187837-1-jhubbard@nvidia.com>

NV_PMC_BOOT_42, the register that identifies the GPU, carries an
architecture field and an implementation field. Open RM keeps the two
fields as it reads them, and the GSP log headers that Open RM writes
name the GPU by both.

Nova-core combined the two fields into one chipset code at probe and
kept only that code, so the implementation number could be recovered
only by undoing the combination.

Record the implementation field in the GPU spec beside the chipset
code.

Assisted-by: LLM
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
---
 drivers/gpu/nova-core/gpu.rs | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs
index fd1a74913d7c..cecd8e79430d 100644
--- a/drivers/gpu/nova-core/gpu.rs
+++ b/drivers/gpu/nova-core/gpu.rs
@@ -213,10 +213,15 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
     }
 }
 
-/// Structure holding a basic description of the GPU: `Chipset` and `Revision`.
+/// Structure holding a basic description of the GPU: `Chipset`, the implementation field of
+/// `NV_PMC_BOOT_42`, and `Revision`.
 #[derive(Clone, Copy)]
 pub(crate) struct Spec {
     pub(crate) chipset: Chipset,
+    /// Implementation field of `NV_PMC_BOOT_42`, which distinguishes this chipset from the other
+    /// chipsets of its architecture.
+    #[expect(dead_code)]
+    pub(crate) implementation: u8,
     revision: Revision,
 }
 
@@ -259,6 +264,7 @@ impl TryFrom<regs::NV_PMC_BOOT_42> for Spec {
     fn try_from(boot42: regs::NV_PMC_BOOT_42) -> Result<Self> {
         Ok(Self {
             chipset: boot42.chipset()?,
+            implementation: boot42.implementation().into(),
             revision: boot42.into(),
         })
     }
-- 
2.55.0


  reply	other threads:[~2026-09-18  2:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18  2:12 [PATCH 0/4] gpu: nova-core: debug logging essentials for r000 John Hubbard
2026-09-18  2:12 ` John Hubbard [this message]
2026-09-18  2:12 ` [PATCH 2/4] gpu: nova-core: enable decoding of the GSP firmware logs John Hubbard
2026-09-18  2:12 ` [PATCH 3/4] gpu: nova-core: gsp: print GMC command names in debug logs John Hubbard
2026-09-18  2:12 ` [PATCH 4/4] gpu: nova-core: gsp: distinguish GMC events from responses " John Hubbard

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=20260918021249.1187837-2-jhubbard@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --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=ecourtney@nvidia.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=nova-gpu@lists.linux.dev \
    --cc=ojeda@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®