Re: [PATCH v3 7/9] gpu: nova-core: gsp: cmdq: move the RPC code into a sub-module

From: Alexandre Courbot

Date: Thu Oct 08 2026 - 22:19:09 EST


On Thu Oct 1, 2026 at 2:12 PM JST, Eliot Courtney wrote:
> On Wed Sep 30, 2026 at 11:55 PM JST, Alexandre Courbot wrote:
>> Move the types and code related to sending and receiving RPC commands
>> and messages into the `rpc` sub-module. The methods are still declared
>> as members of `CmdqInner` and `Cmdq`; only they are now in their own
>> sub-module.
>>
>> This is a pure move commit, with no functional change intended.
>>
>> Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>
>> ---
>> drivers/gpu/nova-core/gsp/cmdq.rs | 343 +------------------
>> drivers/gpu/nova-core/gsp/cmdq/rpc.rs | 380 +++++++++++++++++++++
>> .../nova-core/gsp/cmdq/{ => rpc}/continuation.rs | 0
>> drivers/gpu/nova-core/gsp/commands.rs | 6 +-
>> drivers/gpu/nova-core/gsp/sequencer.rs | 4 +-
>> 5 files changed, 388 insertions(+), 345 deletions(-)
>>
>> diff --git a/drivers/gpu/nova-core/gsp/cmdq.rs b/drivers/gpu/nova-core/gsp/cmdq.rs
>> index 07036972dbec..06386d1ab192 100644
>> --- a/drivers/gpu/nova-core/gsp/cmdq.rs
>> +++ b/drivers/gpu/nova-core/gsp/cmdq.rs
>> @@ -1,6 +1,7 @@
>> // SPDX-License-Identifier: GPL-2.0
>> +// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
>>
>> -mod continuation;
>> +pub(crate) mod rpc;
>
> Should this be pub(super)?
>
> I tried to think of a way we can have a only generic (over RPC and GMC)
> receive/send path on cmdq. I think it's possible but I don't think we
> need to do it right now. It'll require some care and maybe information
> from the future w.r.t. how we handle async events etc, so maybe let's
> revisit later.

Yeah, that's also something I was considering as I wrote this, but I
also don't want to paint ourselves into a corner before r000 support is
merged. Since you seem to agree let's defer this to the point where we
have more visibility on how we receive messages.