On Wed Nov 18, 2026 at 6:07 PM GMT, Danilo Krummrich wrote: > Driver::Data is owned by the reference-counted drm::Device and can > outlive device unregistration and driver unbind. Driver state belongs in > RegistrationData, whose lifetime ends with registration teardown. > > The intended model is that, after drm_dev_unplug(), surviving DRM > objects (e.g. through remaining userspace handles) no longer require > access to the driver state. Thus Driver::RegistrationData is available > (and sufficient) for all DRM callbacks into the driver. > > Remove Driver::Data, its storage and Deref implementation, and the > unused workqueue implementations that depend on it. Drop the data > initializer argument from UnregisteredDevice::new() and update its > callers. > > Signed-off-by: Danilo Krummrich <[email protected]>
With the const assert added: Reviewed-by: Gary Guo <[email protected]> > --- > drivers/gpu/drm/nova/driver.rs | 3 +- > drivers/gpu/drm/tyr/driver.rs | 3 +- > rust/kernel/drm/device.rs | 128 ++------------------------------- > rust/kernel/drm/driver.rs | 3 - > rust/kernel/drm/gem/shmem.rs | 6 +- > 5 files changed, 9 insertions(+), 134 deletions(-)
