All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] gpu: nova-core: retain the GSP-RM log buffers
@ 2026-08-12 11:37 Vladislav Zaharov
  2026-08-12 11:37 ` [PATCH 1/2] gpu: nova-core: gsp: retain the GSP-RM log buffers after unbind Vladislav Zaharov
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Vladislav Zaharov @ 2026-08-12 11:37 UTC (permalink / raw)
  To: dakr, acourbot
  Cc: aliceryhl, ttabi, nova-gpu, dri-devel, linux-kernel, linux-doc,
	Vladislav Zaharov

The GSP-RM log buffers are exposed through debugfs, but the entries are
owned by the Gpu that probe() builds, and the buffers themselves are DMA
allocations that cannot outlive the device. They are therefore gone as
soon as the GPU is unbound, and in particular as soon as probe() fails -
which is the case todo.rst singled out ("even after failure to probe the
driver"), and the one where a GSP log is worth having.

Patch 1 adds CONFIG_NOVA_CORE_KEEP_GSP_LOGS: when the log buffers are
dropped, whatever the GSP wrote is copied into memory owned by the
module and exposed under a "retained" directory until the module is
unloaded. Patch 2 drops the now completed task from todo.rst.

nouveau has the same feature behind its keep_gsp_logging module
parameter. It recreates the entries under the name of the GPU that just
went away, which collides with that GPU coming back; the "retained"
directory here avoids that.

Tested on a GB203 (RTX 5080), which the driver probes successfully:

  - after an unbind, retained/<BDF>/{loginit,logintr,logrm} hold the
    contents the live entries had;
  - with a failure injected after the GSP has booted, probe() fails and
    the logs of that attempt are still readable;
  - binding the GPU again does not disturb the copies, and unbinding it
    a second time replaces them;
  - the copies are released on module unload, with nothing left behind;
  - with the option off, the entries disappear on unbind as before.

Built and checked with CLIPPY=1 and rustfmtcheck for both settings of
the new option.

The testing was done on top of e6c2c6265521 ("rust: firmware: add
request_into_buf()"), that is, before the TLV firmware series, because
the nvidia/*/gsp/*.tlv images are not in linux-firmware yet and the
driver therefore cannot load firmware at the current tip. The series
applies and builds unchanged on top of drm-rust-next.

Vladislav Zaharov (2):
  gpu: nova-core: gsp: retain the GSP-RM log buffers after unbind
  Documentation: nova: remove completed GSP log buffer task

 Documentation/gpu/nova/core/todo.rst |  12 ---
 drivers/gpu/nova-core/Kconfig        |  18 ++++
 drivers/gpu/nova-core/gsp.rs         | 146 +++++++++++++++++++++++++++
 drivers/gpu/nova-core/nova_core.rs   |  19 ++++
 4 files changed, 183 insertions(+), 12 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-08-12 22:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-12 11:37 [PATCH 0/2] gpu: nova-core: retain the GSP-RM log buffers Vladislav Zaharov
2026-08-12 11:37 ` [PATCH 1/2] gpu: nova-core: gsp: retain the GSP-RM log buffers after unbind Vladislav Zaharov
2026-08-12 11:53   ` sashiko-bot
2026-08-12 12:06   ` Vladislav Zaharov
2026-08-12 14:00     ` Gary Guo
2026-08-12 14:38       ` Vladislav Zaharov
2026-08-12 22:41   ` John Hubbard
2026-08-12 11:37 ` [PATCH 2/2] Documentation: nova: remove completed GSP log buffer task Vladislav Zaharov
2026-08-12 15:54 ` [PATCH 0/2] gpu: nova-core: retain the GSP-RM log buffers Danilo Krummrich
2026-08-12 16:08   ` Vladislav Zaharov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.