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:53 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)?

This cannot be unfortunately, as commands (which are in a sibling module
of `cmdq`) are protocol-dependent and need to view `CommandToGsp` and
`MessageFromGsp`.