Re: [PATCH v10 3/7] drm/tyr: add Memory Management Unit (MMU) support

From: Danilo Krummrich

Date: Tue Jul 28 2026 - 15:38:27 EST


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.