Skip to content

gpu: nova-core: use GSP RPC sequence numbers properly

John Hubbard lkml nouveau rust-for-linux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2gpu: nova-core: fix GSP RPC send sequence numbers to match Open RMdrivers/gpu/nova-core/gsp/boot.rs drivers/gpu/nova-core/gsp/cmdq.rs drivers/gpu/nova-core/gsp/commands.rs +1 more+53 -82 replies
2/2gpu: nova-core: improve GSP RPC debug logging with message classificationdrivers/gpu/nova-core/gsp/cmdq.rs drivers/gpu/nova-core/gsp/fw.rs+52 -161 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] gpu: nova-core: use GSP RPC sequence numbers properly

There are two sequence number fields per GSP RPC message: an outer transport-level seqNum in the GSP_MSG_QUEUE_ELEMENT header, and an inner rpc.sequence in the rpc_message_header_v. Nova was leaving the inner field at zero for all sends and had no way to tell async events apart from command responses on the receive side.

This led to really confusing log messages and code as well.

Patch 1 fixes the wire-level sequence numbers to match Open RM. Patch 2 updates the debug logging to show the message classification.

This is "GSP future friendly", in that it is written with GSP seq number handling plans in mind. I'm including Maneet Singh to help poke holes in that claim.

Example output:

GSP RPC: async send: seq# 0, function=GSP_SET_SYSTEM_INFO, length=0x3f0 GSP RPC: async send: seq# 1, function=SET_REGISTRY, length=0xc5 GSP RPC: async received: seq# 0, function=LOCKDOWN_NOTICE, length=0x51 GSP RPC: async received: seq# 17, function=INIT_DONE, length=0x50 GSP RPC: send: seq# 2, function=GET_GSP_STATIC_INFO, length=0x6c8 GSP RPC: response received: seq# 2, function=GET_GSP_STATIC_INFO, length=0x6c8

With the inner rpc.sequence now set correctly, GSP echoes back the CPU's sequence number in command responses, so the response seq# matches the send seq#.

This is based on the Feb 5, 2026 linux-next: commit 9845cf73f7db ("Add linux-next specific files for 20260205").

Also, this should be applied on top of Eliot Courtney's command queue ring buffer fix series [1]. Without it, I was seeing slice bounds panics in driver_read_area().

And finally, because I expect this to go in likely after Blackwell (or not?), I've based it on that. So putting all that together, there is a branch with [1] and Blackwell and this series, here for convenience:

https://github.com/johnhubbard/linux/tree/nova-core-gsp-rpc-seq-numbers-v0

[1] https://lore.kernel.org/r/[email protected]

Cc Maneet Singh <[email protected]>

John Hubbard (2):
gpu: nova-core: fix GSP RPC send sequence numbers to match Open RM
gpu: nova-core: improve GSP RPC debug logging with message
classification

 drivers/gpu/nova-core/gsp/boot.rs     |  6 +-
 drivers/gpu/nova-core/gsp/cmdq.rs     | 84 +++++++++++++++++++++------
 drivers/gpu/nova-core/gsp/commands.rs |  2 +
 drivers/gpu/nova-core/gsp/fw.rs       | 35 +++++++++--
 4 files changed, 104 insertions(+), 23 deletions(-)

base-commit: 6738f143db92177013a500fbea5edd771c173bf9

Signature · 1 line
2.53.0