[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <8D41E5E9-5784-4439-8ACC-13E9F3DA589F@collabora.com>
Date: Fri, 28 Nov 2025 09:21:05 -0300
From: Daniel Almeida <daniel.almeida@...labora.com>
To: 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 28 Nov 2025, at 08:08, Philipp Stanner <phasta@...lbox.org> wrote:
>
> 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.
>
It will just Deref to (). Not a problem.
— Daniel
Powered by blists - more mailing lists