rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] gpu: nova-core: expose the logging buffers via debugfs
@ 2025-12-12 20:49 Timur Tabi
  2025-12-12 20:49 ` [PATCH 1/7] rust: pci: add PCI device name method Timur Tabi
                   ` (7 more replies)
  0 siblings, 8 replies; 25+ messages in thread
From: Timur Tabi @ 2025-12-12 20:49 UTC (permalink / raw)
  To: Danilo Krummrich, Alexandre Courbot, John Hubbard, joelagnelf,
	lyude, nouveau, rust-for-linux

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.

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.

Alexandre Courbot (2):
  gpu: nova-core: implement BinaryWriter for LogBuffer
  gpu: nova-core: create loginit debugfs entry

Timur Tabi (5):
  rust: pci: add PCI device name method
  gpu: nova-core: Replace module_pci_driver! with explicit module init
  gpu: nova-core: create debugfs root in PCI init closure
  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       | 50 +++++++++++++++++++++++++-----
 drivers/gpu/nova-core/gsp/boot.rs  | 15 ++++-----
 drivers/gpu/nova-core/nova_core.rs | 41 ++++++++++++++++++++++--
 rust/helpers/pci.c                 |  5 +++
 rust/kernel/pci.rs                 | 37 ++++++++++++++++++++++
 5 files changed, 131 insertions(+), 17 deletions(-)


base-commit: 187d0801404f415f22c0b31531982c7ea97fa341
-- 
2.52.0


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2025-12-16 23:29 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-12 20:49 [PATCH 0/7] gpu: nova-core: expose the logging buffers via debugfs Timur Tabi
2025-12-12 20:49 ` [PATCH 1/7] rust: pci: add PCI device name method Timur Tabi
2025-12-15 11:35   ` Gary Guo
2025-12-15 16:49   ` lyude
2025-12-12 20:49 ` [PATCH 2/7] gpu: nova-core: Replace module_pci_driver! with explicit module init Timur Tabi
2025-12-13 23:46   ` Joel Fernandes
2025-12-15 11:36   ` Gary Guo
2025-12-12 20:49 ` [PATCH 3/7] gpu: nova-core: create debugfs root in PCI init closure Timur Tabi
2025-12-15 11:40   ` Gary Guo
2025-12-15 16:45     ` Timur Tabi
2025-12-16 10:04       ` John Hubbard
2025-12-16 20:28         ` Timur Tabi
2025-12-16 22:01           ` Joel Fernandes
2025-12-16 22:29             ` Timur Tabi
2025-12-16 23:17               ` Joel Fernandes
2025-12-16 23:29                 ` Timur Tabi
2025-12-12 20:49 ` [PATCH 4/7] gpu: nova-core: implement BinaryWriter for LogBuffer Timur Tabi
2025-12-12 20:49 ` [PATCH 5/7] gpu: nova-core: use pin projection in method boot() Timur Tabi
2025-12-12 20:49 ` [PATCH 6/7] gpu: nova-core: create loginit debugfs entry Timur Tabi
2025-12-15 16:45   ` Timur Tabi
2025-12-12 20:49 ` [PATCH 7/7] gpu: nova-core: create GSP-RM logging buffers debugfs entries Timur Tabi
2025-12-13 23:44   ` Joel Fernandes
2025-12-13 19:19 ` [PATCH 0/7] gpu: nova-core: expose the logging buffers via debugfs Joel Fernandes
2025-12-13 20:47   ` Timur Tabi
2025-12-13 21:49     ` Joel Fernandes

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).