Re: [PATCH v2 3/7] rust: drm: Add RegistrationData to drm::Driver
From: Deborah Brouwer
Date: Thu Jun 04 2026 - 19:45:52 EST
On Thu, Jun 04, 2026 at 03:53:32PM +0200, Danilo Krummrich wrote:
> On Thu Jun 4, 2026 at 1:29 AM CEST, Deborah Brouwer wrote:
> > Hi Danilo, could we use separate data arguments in UnregisteredDevice
> > vs in the Registration? Basically we want to use the UnregisteredDevice
> > to initialize and boot the firmware which we then store as registration
> > data.
> >
> > Could you have a look at this patch, it applies on top of this series:
> > https://lore.kernel.org/rust-for-linux/20260603-use_tyr_reg_data-v1-1-97f64e951cf6@xxxxxxxxxxxxx/
>
> They already are separate -- UnregisteredDevice::new() takes T::Data and
> Registration::new() takes the registration data independently. Your patch
> demonstrates this correctly.
Ah, true the arguments are different, but the issue for Tyr is we need
iomem to initialize and boot the firmware before we have a registered
device.
Could you replace your Tyr with the changes i'm proposing here:
[PATCH v2] drm/tyr: move probe resources into registration data
https://lore.kernel.org/rust-for-linux/20260604-use_tyr_reg_data-v2-1-f77a1ffcf08d@xxxxxxxxxxxxx/
>
> I also replied to your patch with a few comments.
Thank you for your review, I think I have adopted all of your
suggestions in v2, except I would like to keep the reference count
for iomem at least for now because we have multiple long-lived
structs sharing it (fw, address space).
>
> Thanks,
> Danilo