Re: [PATCH 4/4] rust: drm: dispatch delayed work items to the private data

From: Danilo Krummrich

Date: Tue Jan 20 2026 - 06:14:38 EST


On Fri Jan 16, 2026 at 1:36 AM CET, Daniel Almeida wrote:
> +// SAFETY: Our `HasWork<T, ID>` implementation returns a `work_struct` that is
> +// stored in the `work` field of a `delayed_work` with the same access rules as
> +// the `work_struct` owing to the bound on `T::Data: HasDelayedWork<Device<T>,
> +// ID>`, which requires that `T::Data::raw_get_work` return a `work_struct` that
> +// is inside a `delayed_work`.
> +unsafe impl<T, const ID: u64> HasDelayedWork<Device<T>, ID> for Device<T>
> +where
> + T: drm::Driver,
> + T::Data: HasDelayedWork<Device<T>, ID>,
> +{
> +}

What do you intend to do within work that is queued for a DRM device? I assume
you have to access bus device resources?

Also, it would be nice to see how this is used in a driver. Can you please add a
patch for Tyr to the series?