nouveau.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Alice Ryhl <aliceryhl@google.com>
To: Timur Tabi <ttabi@nvidia.com>, Matthew Maurer <mmaurer@google.com>
Cc: Gary Guo <gary@garyguo.net>, Danilo Krummrich <dakr@kernel.org>,
	rust-for-linux@vger.kernel.org,
	Joel Fernandes <joelagnelf@nvidia.com>,
	Alexandre Courbot <acourbot@nvidia.com>,
	nouveau@lists.freedesktop.org
Subject: Re: [PATCH v3 0/9] gpu: nova-core: expose the logging buffers via debugfs
Date: Thu, 18 Dec 2025 08:07:01 +0000	[thread overview]
Message-ID: <aUO2JZR6soTBLtLQ@google.com> (raw)
In-Reply-To: <20251218013910.459045-1-ttabi@nvidia.com>

On Wed, Dec 17, 2025 at 07:39:01PM -0600, Timur Tabi wrote:
> GSP-RM writes its printf message to "logging buffers", which are blocks
> memory allocated by the driver.  The messages are encoded, so exposing
> the buffers as debugfs entries allows the buffers to be extracted and
> decoded by a special application.
> 
> When the driver loads, a /sys/kernel/debug/nova_core root entry is
> created.  To do this, the normal module_pci_driver! macro call is
> replaced with an explicit initialization function, as this allows
> that debugfs entry to be created once for all GPUs.
> 
> Then in each GPU's initialization, a subdirectory based on the PCI
> BDF name is created, and the logging buffer entries are created under
> that.
> 
> Note: the debugfs entry has a file size of 0, because debugfs defaults
> a 0 size and the Rust abstractions do not adjust it for the same of
> the object.  Nouveau makes this adjustment manually in the driver.
> 
> Based on Linus' repository, not drm-rust-next.
> 
> Summary of changes:
> 
> 1. Replace module_pci_driver! with explicit init function.
> 2. Creates root, per-gpu, and individual buffer debugfs entries.
> 3. Adds a pci::name() method to generate a PCI device name string.
> 4. Adds a lookup() method to debugfs, so that the root debugfs entry
>    doesn't need to be a global variable like it is in Nouveau.
> 5. Makes some updates to debugfs core code.
> 
> Alexandre Courbot (1):
>   gpu: nova-core: implement BinaryWriter for LogBuffer
> 
> Timur Tabi (8):
>   rust: pci: add PCI device name method
>   rust: debugfs: add lookup contructor
>   rust: debugfs: add Dir::empty() for no-op directory handle
>   rust: debugfs: fix Dir::scope() to not borrow self for returned
>     lifetime
>   gpu: nova-core: Replace module_pci_driver! with explicit module init
>   gpu: nova-core: create debugfs root when driver loads
>   gpu: nova-core: use pin projection in method boot()
>   gpu: nova-core: create GSP-RM logging buffers debugfs entries
> 
>  drivers/gpu/nova-core/gsp.rs       |  66 +++++++++++++++---
>  drivers/gpu/nova-core/gsp/boot.rs  |  15 ++--
>  drivers/gpu/nova-core/nova_core.rs |  29 +++++++-
>  rust/kernel/debugfs.rs             | 108 ++++++++++++++++++++++-------
>  rust/kernel/debugfs/entry.rs       |  49 ++++++++++++-
>  rust/kernel/pci.rs                 |  37 ++++++++++
>  6 files changed, 259 insertions(+), 45 deletions(-)

Adding Matthew as this touches debugfs.

Alice

  parent reply	other threads:[~2025-12-18  8:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-18  1:39 [PATCH v3 0/9] gpu: nova-core: expose the logging buffers via debugfs Timur Tabi
2025-12-18  1:39 ` [PATCH v3 1/9] rust: pci: add PCI device name method Timur Tabi
2025-12-18  8:05   ` Alice Ryhl
2025-12-18  8:55   ` Danilo Krummrich
2025-12-18 10:09   ` Miguel Ojeda
2025-12-18  1:39 ` [PATCH v3 2/9] rust: debugfs: add lookup contructor Timur Tabi
2025-12-18  9:40   ` Danilo Krummrich
2025-12-18 18:00   ` Matthew Maurer
2025-12-18  1:39 ` [PATCH v3 3/9] rust: debugfs: add Dir::empty() for no-op directory handle Timur Tabi
2025-12-18  1:39 ` [PATCH v3 4/9] rust: debugfs: fix Dir::scope() to not borrow self for returned lifetime Timur Tabi
2025-12-18 17:55   ` Matthew Maurer
2025-12-18  1:39 ` [PATCH v3 5/9] gpu: nova-core: Replace module_pci_driver! with explicit module init Timur Tabi
2025-12-18  9:01   ` Danilo Krummrich
2025-12-18  1:39 ` [PATCH v3 6/9] gpu: nova-core: create debugfs root when driver loads Timur Tabi
2025-12-18 10:10   ` Danilo Krummrich
2025-12-18  1:39 ` [PATCH v3 7/9] gpu: nova-core: implement BinaryWriter for LogBuffer Timur Tabi
2025-12-18 10:18   ` Danilo Krummrich
2025-12-18 11:14   ` Alexandre Courbot
2025-12-18  1:39 ` [PATCH v3 8/9] gpu: nova-core: use pin projection in method boot() Timur Tabi
2025-12-18  1:39 ` [PATCH v3 9/9] gpu: nova-core: create GSP-RM logging buffers debugfs entries Timur Tabi
2025-12-21 10:05   ` kernel test robot
2025-12-18  8:07 ` Alice Ryhl [this message]
2025-12-18  8:44 ` [PATCH v3 0/9] gpu: nova-core: expose the logging buffers via debugfs Danilo Krummrich

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=aUO2JZR6soTBLtLQ@google.com \
    --to=aliceryhl@google.com \
    --cc=acourbot@nvidia.com \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=joelagnelf@nvidia.com \
    --cc=mmaurer@google.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=ttabi@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;
as well as URLs for NNTP newsgroup(s).