All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eliot Courtney <ecourtney@nvidia.com>
To: Danilo Krummrich <dakr@kernel.org>,
	Alice Ryhl <aliceryhl@google.com>,
	Alexandre Courbot <acourbot@nvidia.com>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: rust-for-linux@vger.kernel.org, nouveau@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Eliot Courtney <ecourtney@nvidia.com>
Subject: [PATCH 0/9] gpu: nova-core: gsp: add RM control command infrastructure
Date: Fri, 27 Feb 2026 21:32:05 +0900	[thread overview]
Message-ID: <20260227-rmcontrol-v1-0-86648e4869f9@nvidia.com> (raw)

Add the infrastructure for sending RM control RPCs. This is needed e.g.
for channel allocation.

This series adds:
- `NV_STATUS` bindings and wrapping `NvStatus` enum (used by RM control
  RPCs)
- The necessary bindings for the RM control RPCs.
- `RmControlMsgFunction` to identify individual control commands, like
  `MsgFunction` for GSP commands.
- `SBufferIter::flush_into_kvvec` for reading large RPC payloads
- A `send_rm_control` helper that sends a control and checks its
  NvStatus
- One usage of `send_rm_control`: the `CeGetFaultMethodBufferSize`
  RPC. This is useful for channel allocation later.

Each new RM control command can be added by extending
`RmControlMsgFunction`, adding the bindings and wrappers for their
parameters, and writing a type-safe wrapper to send and receive the
reply for the RM control rpc, using `send_rm_control`.

This series applies on latest drm-rust-next with the listed
pre-requisites. Alternatively, there is a branch with all dependency
commits included [1].

[1] https://github.com/Edgeworth/linux/tree/b4/rmcontrol

Signed-off-by: Eliot Courtney <ecourtney@nvidia.com>
---
Eliot Courtney (9):
      gpu: nova-core: gsp: add NV_STATUS error code bindings
      gpu: nova-core: gsp: add NvStatus enum for RM control errors
      gpu: nova-core: gsp: expose GSP-RM internal client and subdevice handles
      gpu: nova-core: gsp: add RM control RPC structure binding
      gpu: nova-core: gsp: add types for RM control RPCs
      gpu: nova-core: generalize `flush_into_kvec` to `flush_into_vec`
      gpu: nova-core: gsp: add RM control command infrastructure
      gpu: nova-core: gsp: add CE fault method buffer size bindings
      gpu: nova-core: gsp: add CeGetFaultMethodBufferSize RM control command

 drivers/gpu/nova-core/gsp.rs                      |   1 +
 drivers/gpu/nova-core/gsp/commands.rs             |  16 +
 drivers/gpu/nova-core/gsp/fw.rs                   | 402 ++++++++++++++++++++++
 drivers/gpu/nova-core/gsp/fw/commands.rs          |  10 +
 drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs | 161 +++++++++
 drivers/gpu/nova-core/gsp/fw/rm.rs                |  99 ++++++
 drivers/gpu/nova-core/gsp/rm.rs                   |   3 +
 drivers/gpu/nova-core/gsp/rm/commands.rs          | 141 ++++++++
 drivers/gpu/nova-core/sbuffer.rs                  |  31 +-
 9 files changed, 860 insertions(+), 4 deletions(-)
---
base-commit: 4a49fe23e357b48845e31fe9c28a802c05458198
change-id: 20260225-rmcontrol-bd8a06fc3a0d
prerequisite-message-id: <20260226-cmdq-continuation-v3-0-572ab9916766@nvidia.com>
prerequisite-patch-id: fd45bc5b8eda5e2b54a052dddb1a1c363107f0a7
prerequisite-patch-id: d0f59ef489346e978a222755f9fb42dfe7af19e5
prerequisite-patch-id: 8844970d0e387488c70979a73732579ba174b46c
prerequisite-patch-id: e138a94ed48fa8d50d5ed1eb36524f98923ed478
prerequisite-patch-id: 4599a5e90d6665fa3acb7d4045de5d378ac28b4d
prerequisite-patch-id: 30ed64c398e541d6efbcb2e46ed9a9e6cf953f4f
prerequisite-patch-id: 9a965e9f29c8680c0b554e656ff8e9a1bfc67280
prerequisite-patch-id: d8cccc3dfb070f304805fc7e0f24121809b4b300
prerequisite-patch-id: c0a73dfd1fb630ab02486f0180b90f8fe850b4dc
prerequisite-message-id: <20260226-cmdq-locking-v2-0-c7e16a6d5885@nvidia.com>
prerequisite-patch-id: fefd403caf8af386276351dd12397dda8ae8553f
prerequisite-patch-id: 1fb4b67abba75a81bd5ee5e545a7caae8046a3ea
prerequisite-patch-id: 10c23618b43dc8fea11f7b23d1d9389d04ede08d
prerequisite-patch-id: cf0393b708109d4264745131a511eef7218aa173

Best regards,
-- 
Eliot Courtney <ecourtney@nvidia.com>


             reply	other threads:[~2026-02-27 12:34 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-27 12:32 Eliot Courtney [this message]
2026-02-27 12:32 ` [PATCH 1/9] gpu: nova-core: gsp: add NV_STATUS error code bindings Eliot Courtney
2026-02-27 12:32 ` [PATCH 2/9] gpu: nova-core: gsp: add NvStatus enum for RM control errors Eliot Courtney
2026-02-27 12:32 ` [PATCH 3/9] gpu: nova-core: gsp: expose GSP-RM internal client and subdevice handles Eliot Courtney
2026-03-09 21:22   ` Joel Fernandes
2026-03-09 21:22     ` Joel Fernandes
2026-03-09 23:41     ` Joel Fernandes
2026-03-09 23:41       ` Joel Fernandes
2026-03-10  0:06       ` John Hubbard
2026-03-10  2:17         ` Joel Fernandes
2026-03-10  2:29           ` John Hubbard
2026-03-10 18:48             ` Joel Fernandes
2026-03-10  2:36           ` Alexandre Courbot
2026-03-10  2:36             ` Alexandre Courbot
2026-03-10  4:02             ` Eliot Courtney
2026-03-10  4:02               ` Eliot Courtney
2026-03-10 10:35               ` Danilo Krummrich
2026-03-10 10:35                 ` Danilo Krummrich
2026-02-27 12:32 ` [PATCH 4/9] gpu: nova-core: gsp: add RM control RPC structure binding Eliot Courtney
2026-02-27 12:32 ` [PATCH 5/9] gpu: nova-core: gsp: add types for RM control RPCs Eliot Courtney
2026-03-09 21:45   ` Joel Fernandes
2026-03-09 21:45     ` Joel Fernandes
2026-03-16 11:42     ` Eliot Courtney
2026-03-16 11:42       ` Eliot Courtney
2026-02-27 12:32 ` [PATCH 6/9] gpu: nova-core: generalize `flush_into_kvec` to `flush_into_vec` Eliot Courtney
2026-03-09 21:53   ` Joel Fernandes
2026-03-09 21:53     ` Joel Fernandes
2026-03-09 21:57   ` Danilo Krummrich
2026-03-09 21:57     ` Danilo Krummrich
2026-03-09 22:01     ` Danilo Krummrich
2026-03-09 22:01       ` Danilo Krummrich
2026-03-16 11:44       ` Eliot Courtney
2026-03-16 11:44         ` Eliot Courtney
2026-03-16 12:21         ` Danilo Krummrich
2026-03-16 12:21           ` Danilo Krummrich
2026-03-17  1:55           ` Alexandre Courbot
2026-03-17  1:55             ` Alexandre Courbot
2026-03-17 10:49             ` Danilo Krummrich
2026-03-17 10:49               ` Danilo Krummrich
2026-03-17 13:41               ` Alexandre Courbot
2026-03-17 13:41                 ` Alexandre Courbot
2026-03-17 14:12                 ` Danilo Krummrich
2026-03-17 14:12                   ` Danilo Krummrich
2026-03-18  1:52                   ` Alexandre Courbot
2026-03-18  1:52                     ` Alexandre Courbot
2026-02-27 12:32 ` [PATCH 7/9] gpu: nova-core: gsp: add RM control command infrastructure Eliot Courtney
2026-03-02  8:00   ` Zhi Wang
2026-03-02  8:00     ` Zhi Wang
2026-03-09 22:08   ` Joel Fernandes
2026-03-09 22:08     ` Joel Fernandes
2026-03-13 15:40   ` Danilo Krummrich
2026-03-13 15:40     ` Danilo Krummrich
2026-03-16 12:06     ` Eliot Courtney
2026-03-16 12:06       ` Eliot Courtney
2026-02-27 12:32 ` [PATCH 8/9] gpu: nova-core: gsp: add CE fault method buffer size bindings Eliot Courtney
2026-03-09 22:08   ` Joel Fernandes
2026-03-09 22:08     ` Joel Fernandes
2026-02-27 12:32 ` [PATCH 9/9] gpu: nova-core: gsp: add CeGetFaultMethodBufferSize RM control command Eliot Courtney
2026-03-09 22:23   ` Joel Fernandes
2026-03-09 22:23     ` Joel Fernandes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260227-rmcontrol-v1-0-86648e4869f9@nvidia.com \
    --to=ecourtney@nvidia.com \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.