Re: [PATCH v2 2/2] gpu: nova-core: use pin-init self-referential support

From: Danilo Krummrich

Date: Mon Nov 16 2026 - 07:47:32 EST


On Mon Nov 16, 2026 at 12:52 PM CET, Gary Guo wrote:
> On Mon Nov 16, 2026 at 7:56 AM GMT, Alexandre Courbot wrote:
>> On Thu Nov 12, 2026 at 1:19 AM JST, Danilo Krummrich wrote:
>> <...>
>>> drivers/gpu/nova-core/gsp/cmdq.rs | 16 ++++++--
>>> drivers/gpu/nova-core/gsp/cmdq/gmc.rs | 9 +++--
>>> drivers/gpu/nova-core/gsp/cmdq/rpc.rs | 11 +++---
>>
>> The changes to these files look like they are a change on their own;
>> they are not using the self-referential support but rather change how
>> the queue lock is acquired. It should probably be a separate patch
>> before the rest (which would be the last patch of the series).
>
> This is actually integral due to variances, as the existing code more or less
> relies on cmdq being covariant unsafely. Pin-init is going to enforce that so it
> needs to be updated to use existential lifetime to make cmdq actually covariant.

Yes, those changes are related to the use of self-referential pin-init. We could
technically introduce the with_inner_locked() helper separately, but that seems
excessive and creates unnecessary churn.