[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260210133617.0a4be958@fedora>
Date: Tue, 10 Feb 2026 13:36:17 +0100
From: Boris Brezillon <boris.brezillon@...labora.com>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: "Christian König" <christian.koenig@....com>, Philipp
Stanner <phasta@...lbox.org>, phasta@...nel.org, Danilo Krummrich
<dakr@...nel.org>, David Airlie <airlied@...il.com>, Simona Vetter
<simona@...ll.ch>, Gary Guo <gary@...yguo.net>, Benno Lossin
<lossin@...nel.org>, Daniel Almeida <daniel.almeida@...labora.com>, Joel
Fernandes <joelagnelf@...dia.com>, linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org, rust-for-linux@...r.kernel.org
Subject: Re: [RFC PATCH 2/4] rust: sync: Add dma_fence abstractions
On Tue, 10 Feb 2026 10:15:04 +0000
Alice Ryhl <aliceryhl@...gle.com> wrote:
> impl MustBeSignalled<'_> {
> /// Drivers generally should not use this one.
> fn i_promise_it_will_be_signalled(self) -> WillBeSignalled { ... }
>
> /// One way to ensure the fence has been signalled is to signal it.
> fn signal_fence(self) -> WillBeSignalled {
> self.fence.signal();
> self.i_promise_it_will_be_signalled()
> }
>
> /// Another way to ensure the fence will be signalled is to spawn a
> /// workqueue item that promises to signal it.
> fn transfer_to_wq(
> self,
> wq: &Workqueue,
> item: impl DmaFenceWorkItem,
> ) -> WillBeSignalled {
> // briefly obtain the lock class of the wq to indicate to
> // lockdep that the signalling path "blocks" on arbitrary jobs
> // from this wq completing
> bindings::lock_acquire(&wq->key);
> bindings::lock_release(&wq->key);
>
> // enqueue the job
> wq.enqueue(item, wq);
>
> // The signature of DmaFenceWorkItem::run() promises to arrange
> // for it to be signalled.
> self.i_promise_it_will_be_signalled()
> }
I guess what's still missing is some sort of `transfer_to_hw()`
function and way to flag the IRQ handler taking over the fence
signaling token.
> }
Powered by blists - more mailing lists