[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DE521OFQRH29.ZNUPX2POGN1V@nvidia.com>
Date: Mon, 10 Nov 2025 22:39:01 +0900
From: "Alexandre Courbot" <acourbot@...dia.com>
To: "Joel Fernandes" <joelagnelf@...dia.com>,
<linux-kernel@...r.kernel.org>, <rust-for-linux@...r.kernel.org>,
<dri-devel@...ts.freedesktop.org>, <dakr@...nel.org>, <acourbot@...dia.com>
Cc: "Alistair Popple" <apopple@...dia.com>, "Miguel Ojeda"
<ojeda@...nel.org>, "Alex Gaynor" <alex.gaynor@...il.com>, "Boqun Feng"
<boqun.feng@...il.com>, "Gary Guo" <gary@...yguo.net>,
<bjorn3_gh@...tonmail.com>, "Benno Lossin" <lossin@...nel.org>, "Andreas
Hindborg" <a.hindborg@...nel.org>, "Alice Ryhl" <aliceryhl@...gle.com>,
"Trevor Gross" <tmgross@...ch.edu>, "David Airlie" <airlied@...il.com>,
"Simona Vetter" <simona@...ll.ch>, "Maarten Lankhorst"
<maarten.lankhorst@...ux.intel.com>, "Maxime Ripard" <mripard@...nel.org>,
"Thomas Zimmermann" <tzimmermann@...e.de>, "John Hubbard"
<jhubbard@...dia.com>, "Timur Tabi" <ttabi@...dia.com>,
<joel@...lfernandes.org>, <nouveau@...ts.freedesktop.org>, "Nouveau"
<nouveau-bounces@...ts.freedesktop.org>
Subject: Re: [PATCH v2 06/12] nova-core: Add bindings required by GSP
sequencer
Hi Joel,
On Mon Nov 3, 2025 at 8:59 AM JST, Joel Fernandes wrote:
> Add several firmware bindings required by GSP sequencer code.
>
> Co-developed-by: Alistair Popple <apopple@...dia.com>
> Signed-off-by: Alistair Popple <apopple@...dia.com>
> Signed-off-by: Joel Fernandes <joelagnelf@...dia.com>
> ---
> drivers/gpu/nova-core/gsp/fw.rs | 45 ++++++++++
> .../gpu/nova-core/gsp/fw/r570_144/bindings.rs | 85 +++++++++++++++++++
> 2 files changed, 130 insertions(+)
>
> diff --git a/drivers/gpu/nova-core/gsp/fw.rs b/drivers/gpu/nova-core/gsp/fw.rs
> index 687749bdbb45..53e28458cd7d 100644
> --- a/drivers/gpu/nova-core/gsp/fw.rs
> +++ b/drivers/gpu/nova-core/gsp/fw.rs
> @@ -543,6 +543,51 @@ pub(crate) fn element_count(&self) -> u32 {
> }
> }
>
> +#[expect(unused)]
> +pub(crate) use r570_144::{
We are trying to avoid that (direct reexports from the generated
bindings) - some explanations for how to abstract these follow.
> + // GSP sequencer run structure with information on how to run the sequencer.
> + rpc_run_cpu_sequencer_v17_00,
This type should be wrapped in a transparent type similarly to e.g.
`GspArgumentsCached`: its internal structure hidden, and the needed
functionality made accessible through a constructor and (if needed)
other methods.
> +
> + // GSP sequencer structures.
> + GSP_SEQUENCER_BUFFER_CMD,
> + GSP_SEQ_BUF_OPCODE,
> +
> + // GSP sequencer core operation opcodes.
> + GSP_SEQ_BUF_OPCODE_GSP_SEQ_BUF_OPCODE_CORE_RESET,
> + GSP_SEQ_BUF_OPCODE_GSP_SEQ_BUF_OPCODE_CORE_RESUME,
> + GSP_SEQ_BUF_OPCODE_GSP_SEQ_BUF_OPCODE_CORE_START,
> + GSP_SEQ_BUF_OPCODE_GSP_SEQ_BUF_OPCODE_CORE_WAIT_FOR_HALT,
> +
> + // GSP sequencer delay opcode and payload.
> + GSP_SEQ_BUF_OPCODE_GSP_SEQ_BUF_OPCODE_DELAY_US,
> +
> + // GSP sequencer register opcodes.
> + GSP_SEQ_BUF_OPCODE_GSP_SEQ_BUF_OPCODE_REG_MODIFY,
> + GSP_SEQ_BUF_OPCODE_GSP_SEQ_BUF_OPCODE_REG_POLL,
> + GSP_SEQ_BUF_OPCODE_GSP_SEQ_BUF_OPCODE_REG_STORE,
> + GSP_SEQ_BUF_OPCODE_GSP_SEQ_BUF_OPCODE_REG_WRITE,
The opcodes can be exposed through a dedicated enum like `MsgFunction`.
> +
> + // GSP sequencer delay payload structure.
> + GSP_SEQ_BUF_PAYLOAD_DELAY_US,
> +
> + // GSP sequencer register payload structures.
> + GSP_SEQ_BUF_PAYLOAD_REG_MODIFY,
> + GSP_SEQ_BUF_PAYLOAD_REG_POLL,
> + GSP_SEQ_BUF_PAYLOAD_REG_STORE,
> + GSP_SEQ_BUF_PAYLOAD_REG_WRITE, //
These ones are a bit trickier to abstract. Since they ever only use
`bar` from the sequencer, I guess we can have their semantics in the
`fw` module, exposed through a method that receives the `bar`? That way
the sequencer won't have to access their members which are private to
it.
Powered by blists - more mailing lists