rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v9 00/15] gpu: nova-core: Boot GSP to RISC-V active
@ 2025-11-10 13:34 Alexandre Courbot
  2025-11-10 13:34 ` [PATCH v9 01/15] gpu: nova-core: compute layout of more framebuffer regions required for GSP Alexandre Courbot
                   ` (15 more replies)
  0 siblings, 16 replies; 19+ messages in thread
From: Alexandre Courbot @ 2025-11-10 13:34 UTC (permalink / raw)
  To: Danilo Krummrich, Alice Ryhl, David Airlie, Simona Vetter,
	Benno Lossin, Miguel Ojeda, Boqun Feng, Gary Guo,
	Björn Roy Baron, Andreas Hindborg, Trevor Gross
  Cc: John Hubbard, Alistair Popple, Joel Fernandes, Timur Tabi,
	Edwin Peer, nouveau, dri-devel, linux-kernel, rust-for-linux,
	Alexandre Courbot, Lyude Paul

This revision features a more adequate method for receiving messages,
and some general cleanup. It looks solid to me, and although there are
further minor improvements I want to eventually see I think it makes an
adequate first milestone.

I am considering merging this before -rc6, so it can make it into 6.19.
If there are reasons not to, please scream. :)

A branch including this series and its dependencies is available at [1].

[1] https://github.com/Gnurou/linux/tree/b4/gsp_boot

Changes in v9:
- More doccomments.
- Use the `MessageFromGsp` trait instead of an arbitrary closure to extract
  incoming messages from the message queue.
- Split the message receiving method into a non-generic transport layer
  receive, and the generic part validating and constructing the message.
- Use well-defined types for sending and receiving messages instead of
  error-prone tuples.
- Link to v8: https://lore.kernel.org/r/20251108-gsp_boot-v8-0-70b762eedd50@nvidia.com

Changes in v8:
- Add lots of doccomments.
- Refactor and simplify GSP command sending - now uses a single trait
  and a single method.
- Leverage the new `from_bytes_prefix` family of methods to simplify GSP
  command queue code a bit.
- Simplify RM arguments.
- Split the `GspSetSystemInfo` and `SetRegistry` commands into their own
  patch.
- Add a `is_empty` method to `SBufferIter` and use it to detect when a
  command's variable length payload has not been entirely written.
- Harmonize imports according to new format rules.
- Link to v7: https://lore.kernel.org/r/20251029-gsp_boot-v7-0-34227afad347@nvidia.com

Changes in v7:
- Remove `as` conversions by using the features of the `num` module.
- Add build-time conversion of constant integer values to smaller types.
- Thanks to the two items above, make more functions infallible.
- Remove unneeded `nr_ptes` member of the `Cmdq`.
- Use `repr(u32)` for `MsgFunction` to simplify it.
- Use `from_ref` instead of casting references into pointers with `as`.
- Add message header version type to remove use of magic number.
- Switch some parameters to `usize` to limit type conversions.
- Add comments for undocumented functions.
- Remove `function_number` method of `GspMsgElement` and return invalid
  function numbers as the error value of `function` instead.
- Work around the renaming of `slice::flatten` to
  `slice::as_flattened` in Rust 1.80 (thanks Miguel!).
- Fix clippy warning with Rust 1.78.
- Link to v6: https://lore.kernel.org/r/20251017054736.2984332-1-apopple@nvidia.com/

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
Alexandre Courbot (3):
      gpu: nova-core: compute layout of more framebuffer regions required for GSP
      gpu: nova-core: num: add functions to safely convert a const value to a smaller type
      rust: enable slice_flatten feature and provide it through an extension trait

Alistair Popple (9):
      gpu: nova-core: Set correct DMA mask
      gpu: nova-core: Create initial Gsp
      gpu: nova-core: gsp: Create wpr metadata
      gpu: nova-core: Add zeroable trait to bindings
      gpu: nova-core: gsp: Add GSP command queue bindings and handling
      gpu: nova-core: gsp: Create rmargs
      gpu: nova-core: gsp: Add SetSystemInfo command
      gpu: nova-core: gsp: Add SetRegistry command
      gpu: nova-core: gsp: Boot GSP

Joel Fernandes (3):
      gpu: nova-core: Add a slice-buffer (sbuffer) datastructure
      gpu: nova-core: falcon: Add support to check if RISC-V is active
      gpu: nova-core: falcon: Add support to write firmware version

 drivers/gpu/nova-core/driver.rs                   |  16 +
 drivers/gpu/nova-core/falcon.rs                   |  15 +
 drivers/gpu/nova-core/fb.rs                       |  72 ++-
 drivers/gpu/nova-core/firmware/gsp.rs             |   7 +-
 drivers/gpu/nova-core/firmware/riscv.rs           |  11 +-
 drivers/gpu/nova-core/gpu.rs                      |   2 +-
 drivers/gpu/nova-core/gsp.rs                      | 156 ++++-
 drivers/gpu/nova-core/gsp/boot.rs                 |  85 ++-
 drivers/gpu/nova-core/gsp/cmdq.rs                 | 680 +++++++++++++++++++++
 drivers/gpu/nova-core/gsp/commands.rs             | 129 ++++
 drivers/gpu/nova-core/gsp/fw.rs                   | 608 ++++++++++++++++++-
 drivers/gpu/nova-core/gsp/fw/commands.rs          | 106 ++++
 drivers/gpu/nova-core/gsp/fw/r570_144.rs          |   6 +-
 drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs | 703 ++++++++++++++++++++++
 drivers/gpu/nova-core/nova_core.rs                |   1 +
 drivers/gpu/nova-core/num.rs                      |  51 ++
 drivers/gpu/nova-core/regs.rs                     |  17 +-
 drivers/gpu/nova-core/sbuffer.rs                  | 228 +++++++
 init/Kconfig                                      |   3 +
 rust/kernel/lib.rs                                |   4 +
 rust/kernel/prelude.rs                            |   3 +
 rust/kernel/slice.rs                              |  49 ++
 22 files changed, 2918 insertions(+), 34 deletions(-)
---
base-commit: 80b3dc0a5a2e51fb2b8f3406f5ee20ad4a652316
change-id: 20251027-gsp_boot-c6bb048a304e

Best regards,
-- 
Alexandre Courbot <acourbot@nvidia.com>


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

end of thread, other threads:[~2025-11-14 13:20 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-10 13:34 [PATCH v9 00/15] gpu: nova-core: Boot GSP to RISC-V active Alexandre Courbot
2025-11-10 13:34 ` [PATCH v9 01/15] gpu: nova-core: compute layout of more framebuffer regions required for GSP Alexandre Courbot
2025-11-10 13:34 ` [PATCH v9 02/15] gpu: nova-core: Set correct DMA mask Alexandre Courbot
2025-11-10 13:34 ` [PATCH v9 03/15] gpu: nova-core: num: add functions to safely convert a const value to a smaller type Alexandre Courbot
2025-11-14  6:49   ` Mikko Perttunen
2025-11-14  7:10     ` Alexandre Courbot
2025-11-10 13:34 ` [PATCH v9 04/15] gpu: nova-core: Create initial Gsp Alexandre Courbot
2025-11-10 13:34 ` [PATCH v9 05/15] gpu: nova-core: gsp: Create wpr metadata Alexandre Courbot
2025-11-10 13:34 ` [PATCH v9 06/15] gpu: nova-core: Add a slice-buffer (sbuffer) datastructure Alexandre Courbot
2025-11-10 13:34 ` [PATCH v9 07/15] gpu: nova-core: Add zeroable trait to bindings Alexandre Courbot
2025-11-10 13:34 ` [PATCH v9 08/15] rust: enable slice_flatten feature and provide it through an extension trait Alexandre Courbot
2025-11-10 13:34 ` [PATCH v9 09/15] gpu: nova-core: gsp: Add GSP command queue bindings and handling Alexandre Courbot
2025-11-10 13:34 ` [PATCH v9 10/15] gpu: nova-core: gsp: Create rmargs Alexandre Courbot
2025-11-10 13:34 ` [PATCH v9 11/15] gpu: nova-core: gsp: Add SetSystemInfo command Alexandre Courbot
2025-11-10 13:34 ` [PATCH v9 12/15] gpu: nova-core: gsp: Add SetRegistry command Alexandre Courbot
2025-11-10 13:34 ` [PATCH v9 13/15] gpu: nova-core: falcon: Add support to check if RISC-V is active Alexandre Courbot
2025-11-10 13:34 ` [PATCH v9 14/15] gpu: nova-core: falcon: Add support to write firmware version Alexandre Courbot
2025-11-10 13:34 ` [PATCH v9 15/15] gpu: nova-core: gsp: Boot GSP Alexandre Courbot
2025-11-14 13:20 ` [PATCH v9 00/15] gpu: nova-core: Boot GSP to RISC-V active Alexandre Courbot

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