Hello Lyude,

On Tue,  2 Dec 2025 17:03:31 -0500
Lyude Paul <[email protected]> wrote:

> +#[pin_data]
> +pub struct Object<T: DriverObject> {
> +    #[pin]
> +    obj: Opaque<bindings::drm_gem_shmem_object>,
> +    // Parent object that owns this object's DMA reservation object
> +    parent_resv_obj: Option<ARef<Object<T>>>,
> +    #[pin]
> +    inner: T,
> +}
> +
> +super::impl_aref_for_gem_obj!(impl<T> for Object<T> where T: DriverObject);

As part of our integration in Tyr, we noticed we'll need Object<T> to
be Sync+Send. Given T already has to be Sync+Send (part of
the DriverObject trait constraints), it shouldn't be a problem to have
Object<T> implement Sync+Send too, since, AFAICT, all the functions in
the Object<T> are thread-safe (resv lock held when acting on the
underlying BO, either explicitly, or implicitly through the C API).

Regards,

Boris

Reply via email to