[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <19e9f6fb270b28b06bfeddf274ad3bcacdc22e0d.camel@mailbox.org>
Date: Fri, 28 Nov 2025 12:08:52 +0100
From: Philipp Stanner <phasta@...lbox.org>
To: Daniel Almeida <daniel.almeida@...labora.com>, Philipp Stanner
<phasta@...nel.org>
Cc: Alice Ryhl <aliceryhl@...gle.com>, Danilo Krummrich <dakr@...nel.org>,
Christian König <ckoenig.leichtzumerken@...il.com>,
Tvrtko Ursulin <tursulin@...ulin.net>, Alexandre Courbot
<acourbot@...dia.com>, Boris Brezillon <boris.brezillon@...labora.com>,
Dave Airlie <airlied@...hat.com>, Lyude Paul <lyude@...hat.com>, Peter
Colberg <pcolberg@...hat.com>, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [RFC WIP 2/3] rust: sync: Add dma_fence abstractions
On Mon, 2025-11-24 at 09:49 -0300, Daniel Almeida wrote:
> Hi Phillipp,
>
> > On 18 Nov 2025, at 10:25, Philipp Stanner <phasta@...nel.org> wrote:
> >
> > dma_fence is a synchronization mechanism which is needed by virtually
> > all GPU drivers.
> >
[…]
> > +#[pin_data]
> > +pub struct DmaFence<T> {
> > + /// The actual dma_fence passed to C.
> > + #[pin]
> > + inner: Opaque<bindings::dma_fence>,
> > + /// User data.
> > + #[pin]
> > + data: T,
>
> Same here: we should probably deref to this type.
Oh, wait.
There's another problem:
done_fences are created by JQ and returned to the driver. The JQ
doesn't need to stuff any data into those fences (it just wants to
signal them, and register events on done_fences coming from other JQs).
So I was about to investigate how we could have a DmaFence<()> to make
the data optional (see the following patch, there I still use an i32 as
dummy data).
Is that compatible with Deref?
Ideas?
P.
Powered by blists - more mailing lists