> On 28 Nov 2025, at 08:08, Philipp Stanner <[email protected]> wrote:
> 
> On Mon, 2025-11-24 at 09:49 -0300, Daniel Almeida wrote:
>> Hi Phillipp,
>> 
>>> On 18 Nov 2025, at 10:25, Philipp Stanner <[email protected]> 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

Reply via email to