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 <[email protected]> --- 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: <[email protected]> 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: <[email protected]> prerequisite-patch-id: fefd403caf8af386276351dd12397dda8ae8553f prerequisite-patch-id: 1fb4b67abba75a81bd5ee5e545a7caae8046a3ea prerequisite-patch-id: 10c23618b43dc8fea11f7b23d1d9389d04ede08d prerequisite-patch-id: cf0393b708109d4264745131a511eef7218aa173 Best regards, -- Eliot Courtney <[email protected]>
