rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 00/14] gpu: nova-core: Boot GSP to RISC-V active
@ 2025-10-29  8:16 Alexandre Courbot
  2025-10-29  8:16 ` [PATCH v7 01/14] gpu: nova-core: compute layout of more framebuffer regions required for GSP Alexandre Courbot
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Alexandre Courbot @ 2025-10-29  8:16 UTC (permalink / raw)
  To: Danilo Krummrich, Alice Ryhl, David Airlie, Simona Vetter,
	Benno Lossin, Miguel Ojeda, Alex Gaynor, 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

Taking over this series while Alistair is on holidays.

This revision is mostly a polishing of v6, notably by removing the use
of `as` thanks to the newly-introduced `num` module [1]. It also
addresses some leftover feedback from v5.

I still need to do an extensive review of the top patches, but I think
the command queue basics should be looking close to what we want.
Caveat, they will evolve once we support interrupts.

One patch that needs particular attention is "rust: enable slice_flatten
feature and abstract it through an extension trait", as it abstracts the
slice flatten feature that has been stabilized in 1.80. I hope I
captured Miguel's proposal correctly.

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

[1] https://lore.kernel.org/rust-for-linux/20251029-nova-as-v3-0-6a30c7333ad9@nvidia.com/T/#t
[2] https://github.com/Gnurou/linux/tree/b4/gsp_boot

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 abstract it through an extension trait

Alistair Popple (8):
      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 RM registry and sysinfo bindings and commands
      nova-core: gsp: Boot GSP

Joel Fernandes (3):
      gpu: nova-core: Add a slice-buffer (sbuffer) datastructure
      nova-core: falcon: Add support to check if RISC-V is active
      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                       |  68 ++-
 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                      | 142 ++++-
 drivers/gpu/nova-core/gsp/boot.rs                 |  80 ++-
 drivers/gpu/nova-core/gsp/cmdq.rs                 | 522 ++++++++++++++++
 drivers/gpu/nova-core/gsp/commands.rs             | 117 ++++
 drivers/gpu/nova-core/gsp/fw.rs                   | 599 +++++++++++++++++-
 drivers/gpu/nova-core/gsp/fw/commands.rs          | 100 +++
 drivers/gpu/nova-core/gsp/fw/r570_144.rs          |   2 +-
 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                      |  49 ++
 drivers/gpu/nova-core/regs.rs                     |  17 +-
 drivers/gpu/nova-core/sbuffer.rs                  | 222 +++++++
 init/Kconfig                                      |   3 +
 rust/kernel/lib.rs                                |   4 +
 rust/kernel/slice.rs                              |  63 ++
 scripts/Makefile.build                            |   3 +-
 22 files changed, 2715 insertions(+), 31 deletions(-)
---
base-commit: ed136b2f7e5c159324b27d1e761bad753d2a711e
change-id: 20251027-gsp_boot-c6bb048a304e

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


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

end of thread, other threads:[~2025-10-29  8:18 UTC | newest]

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