[PATCH 00/10] gpu: nova-core: Boot GSP to RISC-V active

Alistair Popple posted 10 patches 1 month, 1 week ago
There is a newer version of this series
drivers/gpu/nova-core/driver.rs               |   8 +-
drivers/gpu/nova-core/falcon.rs               |  16 +
drivers/gpu/nova-core/fb.rs                   |   1 -
drivers/gpu/nova-core/firmware.rs             |   6 +-
drivers/gpu/nova-core/firmware/gsp.rs         |   1 -
drivers/gpu/nova-core/firmware/riscv.rs       |   9 +-
drivers/gpu/nova-core/gpu.rs                  |  60 +-
drivers/gpu/nova-core/gsp.rs                  | 237 +++++-
drivers/gpu/nova-core/gsp/cmdq.rs             | 701 ++++++++++++++++++
drivers/gpu/nova-core/gsp/commands.rs         | 201 +++++
drivers/gpu/nova-core/nova_core.rs            |   1 +
drivers/gpu/nova-core/nvfw.rs                 |  59 ++
.../gpu/nova-core/nvfw/r570_144_bindings.rs   | 501 +++++++++++++
drivers/gpu/nova-core/regs.rs                 |  15 +
drivers/gpu/nova-core/sbuffer.rs              | 188 +++++
15 files changed, 1991 insertions(+), 13 deletions(-)
create mode 100644 drivers/gpu/nova-core/gsp/cmdq.rs
create mode 100644 drivers/gpu/nova-core/gsp/commands.rs
create mode 100644 drivers/gpu/nova-core/sbuffer.rs
[PATCH 00/10] gpu: nova-core: Boot GSP to RISC-V active
Posted by Alistair Popple 1 month, 1 week ago
This series builds on top of Alex's series[1] to continue initialising the GSP
into a state where it becomes active and it starts communicating with the host.

It includes patches to initialise several important data structures required to
boot the GSP. The biggest change is the implementation of the command/message
circular queue used to establish communication between GSP and host.

This is required to configure and boot the GSP. However this series does not
get the GSP to a fully active state. Instead it gets it to a state where the GSP
sends a message to the host with a sequence of instructions which need running
to get to the active state. A subsequent series will implement processing of
this message and allow the GSP to get to the fully active state.

A full tree including the prerequisites for this patch series is available at
https://github.com/apopple-nvidia/linux/tree/nova-core-for-upstream.

[1] - https://lore.kernel.org/rust-for-linux/dc18894e-09d3-4088-9be0-22c2070b61f4@nvidia.com/T/

To: dri-devel@lists.freedesktop.org
To: Danilo Krummrich <dakr@kernel.org>
To: Alexandre Courbot <acourbot@nvidia.com>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Alex Gaynor <alex.gaynor@gmail.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Gary Guo <gary@garyguo.net>
Cc: Björn Roy Baron <bjorn3_gh@protonmail.com>
Cc: Benno Lossin <lossin@kernel.org>
Cc: Andreas Hindborg <a.hindborg@kernel.org>
Cc: Alice Ryhl <aliceryhl@google.com>
Cc: Trevor Gross <tmgross@umich.edu>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Joel Fernandes <joelagnelf@nvidia.com>
Cc: Timur Tabi <ttabi@nvidia.com>
Cc: linux-kernel@vger.kernel.org
Cc: nouveau@lists.freedesktop.org

Alistair Popple (7):
  gpu: nova-core: Set correct DMA mask
  gpu: nova-core: Create initial GspSharedMemObjects
  gpu: nova-core: gsp: Create wpr metadata
  gpu: nova-core: gsp: Add GSP command queue handling
  gpu: nova-core: gsp: Create rmargs
  gpu: nova-core: gsp: Create RM registry and sysinfo commands
  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               |   8 +-
 drivers/gpu/nova-core/falcon.rs               |  16 +
 drivers/gpu/nova-core/fb.rs                   |   1 -
 drivers/gpu/nova-core/firmware.rs             |   6 +-
 drivers/gpu/nova-core/firmware/gsp.rs         |   1 -
 drivers/gpu/nova-core/firmware/riscv.rs       |   9 +-
 drivers/gpu/nova-core/gpu.rs                  |  60 +-
 drivers/gpu/nova-core/gsp.rs                  | 237 +++++-
 drivers/gpu/nova-core/gsp/cmdq.rs             | 701 ++++++++++++++++++
 drivers/gpu/nova-core/gsp/commands.rs         | 201 +++++
 drivers/gpu/nova-core/nova_core.rs            |   1 +
 drivers/gpu/nova-core/nvfw.rs                 |  59 ++
 .../gpu/nova-core/nvfw/r570_144_bindings.rs   | 501 +++++++++++++
 drivers/gpu/nova-core/regs.rs                 |  15 +
 drivers/gpu/nova-core/sbuffer.rs              | 188 +++++
 15 files changed, 1991 insertions(+), 13 deletions(-)
 create mode 100644 drivers/gpu/nova-core/gsp/cmdq.rs
 create mode 100644 drivers/gpu/nova-core/gsp/commands.rs
 create mode 100644 drivers/gpu/nova-core/sbuffer.rs

-- 
2.47.2

Re: [PATCH 00/10] gpu: nova-core: Boot GSP to RISC-V active
Posted by Miguel Ojeda 1 month ago
On Wed, 27 Aug 2025 18:19:57 +1000 Alistair Popple <apopple@nvidia.com> wrote:
>
> This series builds on top of Alex's series[1] to continue initialising the GSP
> into a state where it becomes active and it starts communicating with the host.

No big deal, but in case it helps since probably it was not intentional given
the rest of the people is there: the rust-for-linux Cc is missing.

Cheers,
Miguel
Re: [PATCH 00/10] gpu: nova-core: Boot GSP to RISC-V active
Posted by Alexandre Courbot 1 month ago
On Thu Aug 28, 2025 at 5:37 PM JST, Miguel Ojeda wrote:
> On Wed, 27 Aug 2025 18:19:57 +1000 Alistair Popple <apopple@nvidia.com> wrote:
>>
>> This series builds on top of Alex's series[1] to continue initialising the GSP
>> into a state where it becomes active and it starts communicating with the host.
>
> No big deal, but in case it helps since probably it was not intentional given
> the rest of the people is there: the rust-for-linux Cc is missing.

This did happen to me once as well - should we add the rust-for-linux
list to the Nova MAINTAINERS entry to protect against this?
Re: [PATCH 00/10] gpu: nova-core: Boot GSP to RISC-V active
Posted by Danilo Krummrich 1 month ago
On 8/29/25 5:03 AM, Alexandre Courbot wrote:
> On Thu Aug 28, 2025 at 5:37 PM JST, Miguel Ojeda wrote:
>> On Wed, 27 Aug 2025 18:19:57 +1000 Alistair Popple <apopple@nvidia.com> wrote:
>>>
>>> This series builds on top of Alex's series[1] to continue initialising the GSP
>>> into a state where it becomes active and it starts communicating with the host.
>>
>> No big deal, but in case it helps since probably it was not intentional given
>> the rest of the people is there: the rust-for-linux Cc is missing.
> 
> This did happen to me once as well - should we add the rust-for-linux
> list to the Nova MAINTAINERS entry to protect against this?

I'm happy about every potential additional reviewer for Nova, but I'm not sure
it scales very well for the rust-for-linux if we get more drivers. :)
Re: [PATCH 00/10] gpu: nova-core: Boot GSP to RISC-V active
Posted by Miguel Ojeda 1 month ago
On Fri, Aug 29, 2025 at 9:40 AM Danilo Krummrich <dakr@kernel.org> wrote:
>
> I'm happy about every potential additional reviewer for Nova, but I'm not sure
> it scales very well for the rust-for-linux if we get more drivers. :)

Yeah, it is an informal rule I/we added back then so that people
interested in Rust in the early days can follow everything in that
list.

The expectation was that eventually it would go away organically as
time passed if Rust grew -- I mentioned it here since I saw people
mentioned explicitly otherwise.

@Alexandre As for your `MAINTAINERS` suggestion, up to all of you --
other entries do that currently, but it is not a requirement, and you
are big enough already (have several people looking at patches etc.).

Thanks!

Cheers,
Miguel
Re: [PATCH 00/10] gpu: nova-core: Boot GSP to RISC-V active
Posted by Alexandre Courbot 1 month ago
On Fri Aug 29, 2025 at 7:01 PM JST, Miguel Ojeda wrote:
> On Fri, Aug 29, 2025 at 9:40 AM Danilo Krummrich <dakr@kernel.org> wrote:
>>
>> I'm happy about every potential additional reviewer for Nova, but I'm not sure
>> it scales very well for the rust-for-linux if we get more drivers. :)
>
> Yeah, it is an informal rule I/we added back then so that people
> interested in Rust in the early days can follow everything in that
> list.
>
> The expectation was that eventually it would go away organically as
> time passed if Rust grew -- I mentioned it here since I saw people
> mentioned explicitly otherwise.
>
> @Alexandre As for your `MAINTAINERS` suggestion, up to all of you --
> other entries do that currently, but it is not a requirement, and you
> are big enough already (have several people looking at patches etc.).

No, Danilo is right, it might somehow make sense now that the driver is
still basic, but this probably won't scale too well after the basic
bring up and not everyone on R4L is necessarily interested in GPU
drivers.

We'll add "don't forget rust-for-linux" to our individual pre-send
checklists for the time being. ;)