On Tue, Jul 28, 2026 at 09:31:50PM +0200, Danilo Krummrich wrote:
> On Tue Jul 28, 2026 at 8:39 PM CEST, Deborah Brouwer wrote:
> > +/// Locked wrapper for carrying out virtual memory (VM) operations on the 
> > MMU.
> > +#[pin_data]
> > +pub(crate) struct Mmu<'drm> {
> 
> This shouldn't be 'drm, but 'mmu or just something generic like 'a.
> 
> The rationale is that Mmu might be shorter lived than 'drm once we have
> self-referencial pin-init. Currently it is straight forward, such as in
> 
>       struct Foo<'foo> {
>           dev: &'foo platform::Device<Bound>,
>       }
>       
>       struct Data<'bound> {
>           foo: Foo<'bound>,
>       }
> 
> where the lifetime of `dev` really ties back to 'bound. However, with
> self-referencial pin-init it could looks like this:
> 
>       struct Foo<'foo> {
>           dev: &'foo platform::Device<Bound>,
>           io: &'foo IoMem<'foo>,
>       }
>       
>       struct Data<'bound> {
>           foo: Foo<'io>,
>           io: IoMem<'bound>,
>       }
> 
> Now Foo is not constrained to 'bound anymore, as this would be longer lived 
> than
> `io`, so it has to capture 'io instead in order to still compile.

Danilo, would you be ok with renaming this lifetime as a follow up
patch? Currently, if I understand this correctly, the mmu lifetime is
still tied to the DRM registration data, so the name is not inaccurate
for Tyr at least as it stands right now.

Reply via email to