Re: [PATCH 1/4] drm/tyr: name resource lifetimes after their types

From: Danilo Krummrich

Date: Thu Nov 19 2026 - 05:34:45 EST


On Thu Nov 19, 2026 at 3:08 AM CET, Gary Guo wrote:
> On Wed Nov 18, 2026 at 11:37 PM GMT, Danilo Krummrich wrote:
>> The firmware, buffer, VM and MMU types use 'drm for their resource
>> lifetimes, even though each parameter is local to its type.
>
> This doesn't make any sense, a lifetime on a type by definition cannot refer to
> a scope of itself.
>
> `'sec` is not the lifetime of `Section` and `'fw` is not the lifetime of
> `Firmware` and I think this is just confusing.

Yes, this was badly phrased. What is actually meant is that e.g. 'fw constrains
how long a Firmware instance can be used.

(In the following patch, in TyrDrmRegistrationData, Firmware borrows Mmu. That
borrow has its own lifetime, distinct from TyrDrmRegistrationData's 'drm
parameter.)