Skip to content

dma::Coherent & dma::CoherentBox API

Danilo Krummrich dri-devel driver-core lkml nouveau rust-for-linux 2 versions – Applied

Status from this message: Applied to drm-rust-next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 22 repliesApplied
  2. v18 patches 21 repliesSuperseded

Changes in v2 from the cover letter

- Rebase onto the DMA and nova-core fixes that went into -rc4.
- Rename CoherentInit to CoherentBox.
- Add a bunch of #[inline] attributes.
- Remove a few unnecessary trait bounds in "rust: dma: add generalized container for types other than slices".
- Fix a typo and convert core::ptr::from_mut(&mut self[i]) into &raw mut self[i].

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/8rust: dma: use "kernel vertical" style for importsrust/kernel/dma.rs+12 -41 reply
2/8rust: dma: add generalized container for types other than slicesrust/kernel/device.rs rust/kernel/dma.rs+226 -1396 replies
3/8rust: dma: add zeroed constructor to `Coherent`rust/kernel/dma.rs samples/rust/rust_dma.rs+77 -122 replies
4/8rust: dma: introduce dma::CoherentBox for memory initializationrust/kernel/dma.rs+153 -12 replies
5/8rust: dma: add Coherent:init() and Coherent::init_with_attrs()rust/kernel/dma.rs+38 -04 replies
6/8gpu: nova-core: use Coherent::init to initialize GspFwWprMetadrivers/gpu/nova-core/gsp/boot.rs drivers/gpu/nova-core/gsp/fw.rs+17 -101 reply
7/8gpu: nova-core: convert Gsp::new() to use CoherentBoxdrivers/gpu/nova-core/gsp.rs drivers/gpu/nova-core/gsp/fw.rs+65 -441 reply
8/8gpu: nova-core: convert to new dma::Coherent APIdrivers/gpu/nova-core/dma.rs drivers/gpu/nova-core/falcon.rs drivers/gpu/nova-core/gsp.rs +2 more+47 -653 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGary GuoAlice RyhlAlexandre CourbotAndreas Hindborg
SeriesR-b
1/8R-b R-b
2/8R-b
3/8R-b
4/8R-b R-b R-b
5/8R-b R-b
6/8R-b
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/8] dma::Coherent & dma::CoherentBox API

This patch series introduces the dma::Coherent API Gary worked out in the context of his I/O projection work.

Additionally, introduce dma::CoherentBox, a type that encapsulates a dma::Coherent object before its DMA address is exposed to the device. dma::CoherentBox can guarantee exclusive access to the inner dma::Coherent object and implement Deref and DerefMut.

Also add Coherent::init() and Coherent::init_with_attrs() so we can directly initialize a new dma::Coherent object through an impl Init<T, E>.

Changes in v2:
- Rebase onto the DMA and nova-core fixes that went into -rc4.
- Rename CoherentInit to CoherentBox.
- Add a bunch of #[inline] attributes.
- Remove a few unnecessary trait bounds in "rust: dma: add generalized container for types other than slices".
- Fix a typo and convert core::ptr::from_mut(&mut self[i]) into &raw mut self[i].

Danilo Krummrich (5):
rust: dma: use "kernel vertical" style for imports
rust: dma: introduce dma::CoherentBox for memory initialization
rust: dma: add Coherent:init() and Coherent::init_with_attrs()
gpu: nova-core: use Coherent::init to initialize GspFwWprMeta
gpu: nova-core: convert Gsp::new() to use CoherentBox

Gary Guo (3):
rust: dma: add generalized container for types other than slices
rust: dma: add zeroed constructor to Coherent
gpu: nova-core: convert to new dma::Coherent API

 drivers/gpu/nova-core/dma.rs      |  19 +-
 drivers/gpu/nova-core/falcon.rs   |   5 +-
 drivers/gpu/nova-core/gsp.rs      |  68 ++--
 drivers/gpu/nova-core/gsp/boot.rs |   7 +-
 drivers/gpu/nova-core/gsp/cmdq.rs |  21 +-
 drivers/gpu/nova-core/gsp/fw.rs   | 128 +++---
 rust/kernel/device.rs             |   4 +-
 rust/kernel/dma.rs                | 632 +++++++++++++++++++++++-------
 samples/rust/rust_dma.rs          |   8 +-
 9 files changed, 626 insertions(+), 266 deletions(-)

base-commit: a19457958c3018783881c4416f272cd594f13049

Signature · 1 line
2.53.0