Skip to content

nova-core: Convert bindings to use zerocopy

Alistair Popple dri-devel lkml rust-for-linux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1nova-core: Update firmware bindings to use zerocopy traitsdrivers/gpu/nova-core/Makefile drivers/gpu/nova-core/gsp/cmdq.rs drivers/gpu/nova-core/gsp/cmdq/continuation.rs +7 more+223 -1764 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/1] nova-core: Convert bindings to use zerocopy

This patch converts all the bindings to use the new zerocopy library. Bindings are currently generated using a fairly simple bindgen script[1]. This is a temporary solution until the bindings have been stablisied but for now upstream should be kept in sync with the resulting output.

Note that this does not completely remove all users of the transmute From/AsBytes traits from nova-core, leaving some ambiguity with when referring to FromBytes. However others have recently posted patches[2][3][4] to remove the majority of other uses which should allow us to remove transmute::FromBytes entirely from nova-core.

Given the inevitable conflicts that will arise from trying to merge several different series doing bits of the same thing I'm happy if someone wants to take this patch and the others and roll them into a single series. Alternatively I am happy to take that on - hopefully Alex can provide some guidance here for what would be preferred.

[1] - https://github.com/apopple-nvidia/nova-gsp-binding-generator/tree/zerocopy
[2] - https://lore.kernel.org/rust-for-linux/[email protected]/
[3] - https://lore.kernel.org/rust-for-linux/[email protected]/
[4] - https://lore.kernel.org/rust-for-linux/[email protected]/

Cc Danilo Krummrich <[email protected]>
Cc Alice Ryhl <[email protected]>
Cc Miguel Ojeda <[email protected]
Cc "Nicolás Antinori" <[email protected]>
Cc "Alexandre Courbot" <[email protected]>
Cc "David Airlie" <[email protected]>
Cc "Shuah Khan" <[email protected]>
Cc "Simona Vetter" <[email protected]>
Cc "Gary Guo" <[email protected]>
Cc "Onur Özkan" <[email protected]>
Cc "Tamir Duberstein" <[email protected]>
Cc "Trevor Gross" <[email protected]>
Cc Pedro Yudi Honda <[email protected]>
Cc SeungJong Ha <[email protected]>

Alistair Popple (1):
nova-core: Update firmware bindings to use zerocopy traits

 drivers/gpu/nova-core/Makefile                |   4 +
 drivers/gpu/nova-core/gsp/cmdq.rs             |  21 +-
 .../gpu/nova-core/gsp/cmdq/continuation.rs    |  16 +-
 drivers/gpu/nova-core/gsp/commands.rs         |  19 +-
 drivers/gpu/nova-core/gsp/fw.rs               |  54 +----
 drivers/gpu/nova-core/gsp/fw/commands.rs      |  50 ++---
 drivers/gpu/nova-core/gsp/fw/r570_144.rs      |  41 ++++
 .../gpu/nova-core/gsp/fw/r570_144/bindings.rs | 185 ++++++++++++------
 drivers/gpu/nova-core/gsp/sequencer.rs        |   5 +-
 scripts/Makefile.build                        |   4 +-
 10 files changed, 223 insertions(+), 176 deletions(-)
Signature · 1 line
2.54.0