Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH 0/2] rust: dma_buf: add dma-fence signalling sections
@ 2026-11-27 18:30 Daniel Almeida
  2026-11-27 18:30 ` [PATCH 1/2] rust: dma_buf: dma_fence: add SignallingSection Daniel Almeida
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Daniel Almeida @ 2026-11-27 18:30 UTC (permalink / raw)
  To: Sumit Semwal, Christian König, Philipp Stanner,
	Danilo Krummrich, Alice Ryhl, Miguel Ojeda, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Trevor Gross, Daniel Almeida, Tamir Duberstein, Alexandre Courbot,
	Onur Özkan
  Cc: linux-media, dri-devel, linaro-mm-sig, rust-for-linux,
	linux-kernel

dma_fence_begin_signalling() and dma_fence_end_signalling() mark the
code that the completion of a dma-fence depends on, so that lockdep can
check it against the dma-fence rules. However, up until now, it was not
possible to use the signalling tokens from Rust. Thus, add support for
it.

Patch 1 adds SignallingSection, a guard that begins a section when it
is created and ends it when it is dropped. Patch 2 makes
DriverFence::signal() take a &SignallingSection, so that its callers
have to be in one.

Patch 5 of the JobQueue series [1] changes the same signature to
signal(&self, res). I will rebase on top of it once it lands and add
the section to its callers then.

A follow-up series adds a workqueue whose work items run in a
signalling section. Tyr will use both.

This is based on drm-rust-next.

[1] https://lore.kernel.org/r/20261124122951.878199-2-phasta@kernel.org

---
Daniel Almeida (2):
      rust: dma_buf: dma_fence: add SignallingSection
      rust: dma_buf: dma_fence: require a SignallingSection in signal()

 rust/kernel/dma_buf/dma_fence.rs | 77 ++++++++++++++++++++++++++++++++++++++--
 rust/kernel/dma_buf/mod.rs       |  3 +-
 2 files changed, 76 insertions(+), 4 deletions(-)
---
base-commit: abfb640b2374e26de8ff81d488c39d8254db538e
change-id: 20261127-dma-fence-signalling-cae3def9aa97

Best regards,
--  
Daniel Almeida <daniel.almeida@collabora.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-27 21:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 18:30 [PATCH 0/2] rust: dma_buf: add dma-fence signalling sections Daniel Almeida
2026-11-27 18:30 ` [PATCH 1/2] rust: dma_buf: dma_fence: add SignallingSection Daniel Almeida
2026-11-27 21:06   ` Danilo Krummrich
2026-11-27 18:30 ` [PATCH 2/2] rust: dma_buf: dma_fence: require a SignallingSection in signal() Daniel Almeida
2026-11-27 18:59 ` [PATCH 0/2] rust: dma_buf: add dma-fence signalling sections Gary Guo
2026-11-27 20:11   ` Danilo Krummrich
2026-11-27 20:26     ` Danilo Krummrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox