From: "Eliot Courtney" <ecourtney@nvidia.com>
To: "Alexandre Courbot" <acourbot@nvidia.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Benno Lossin" <lossin@kernel.org>, "Gary Guo" <gary@garyguo.net>
Cc: "John Hubbard" <jhubbard@nvidia.com>,
"Alistair Popple" <apopple@nvidia.com>,
"Timur Tabi" <ttabi@nvidia.com>,
"Eliot Courtney" <ecourtney@nvidia.com>,
"Zhi Wang" <zhiw@nvidia.com>, <linux-kernel@vger.kernel.org>,
<nova-gpu@lists.linux.dev>, <rust-for-linux@vger.kernel.org>
Subject: Re: [PATCH v2 6/6] gpu: nova-core: gsp: cmdq: add the GMC receive path
Date: Fri, 06 Nov 2026 18:38:16 +0900 [thread overview]
Message-ID: <DMO1007F9PCN.X7VPTFMFVQNL@nvidia.com> (raw)
In-Reply-To: <20261106-r000_rebase_on_cmdq-rpc-v2-6-e481ea2168ef@nvidia.com>
On Fri Nov 6, 2026 at 4:06 PM JST, Alexandre Courbot wrote:
> From: John Hubbard <jhubbard@nvidia.com>
>
> GSP-RM answers a GMC request with a GMC message whose command word
> carries the response flag and the id of the request, and whose sequence
> number is that of the request. It also raises GMC events, named by a
> command id. During boot, the load-and-execute events arrive while the
> driver is waiting for the GSP_INIT reply, and GSP-RM only answers once
> they have been handled.
>
> Add the receive side of the gmc sub-module, mirroring the
> already-existing rpc sub-module.
>
> The transport cannot produce GMC messages yet: the r570 queue element
> header does not carry the type of the message it transports, so the Gmc
> variant of GspParsedMessage is only constructed once the switch to r000
> makes the transport dispatch on the NVDM type. The RPC receive path and
> drain() account for it by logging unclaimed GMC messages.
>
> Signed-off-by: John Hubbard <jhubbard@nvidia.com>
> Co-developed-by: Alexandre Courbot <acourbot@nvidia.com>
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> ---
[...]
> + fn await_gmc_reply<C: CommandToGsp>(
> + &mut self,
> + seq: u32,
> + on_event: impl Fn(&GmcMessage<'_>) -> Result,
> + ) -> Result<Result<C::Reply, u32>>
> + where
> + C::Reply: MessageFromGsp,
> + // This allows all error types, including `Infallible`, to be used for `InitError`.
> + Error: From<<C::Reply as MessageFromGsp>::InitError>,
> + {
> + let dev = self.dev;
> +
> + self.await_msg_with(|message| -> Result<Option<Result<C::Reply, u32>>> {
optional nit: add a TODO to say we should make and use an NvStatus enum
instead of u32 here.
I had renamed my original nvstatus enum I sent ages ago, here's the
original [1].
The previous concern [2] for landing this is that when the bindings change
we may forget to update the enum. Now that nvstatus is being returned as
part of a stable API surface I think that concern is less strong,
because it'll have to be both append only and backwards compatible, so
we could get a nvstatus value we don't know about from newer firmwares,
which we'd have to handle somehow anyway (so forgetting to update the
enum necessarily can't cause an issue).
Anyway I say it's optional nit because I think it'll be a long while
before we want to differentiate behaviour based on anything other than
success/failure in nvstatus.
[1]: https://lore.kernel.org/all/20260227-rmcontrol-v1-2-86648e4869f9@nvidia.com/
[2]: https://lore.kernel.org/all/fd010f7a-6d0d-4faf-bdea-23bac608f03e@nvidia.com/
Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
next prev parent reply other threads:[~2026-11-06 9:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 7:06 [PATCH v2 0/6] gpu: nova-core: gsp: add support for GMC messages Alexandre Courbot
2026-11-06 7:06 ` [PATCH v2 1/6] gpu: nova-core: gsp: fw: add the r000 bindings for the GMC API header Alexandre Courbot
2026-11-06 7:06 ` [PATCH v2 2/6] gpu: nova-core: gsp: add " Alexandre Courbot
2026-11-06 7:06 ` [PATCH v2 3/6] gpu: nova-core: gsp: cmdq: add the GMC send path Alexandre Courbot
2026-11-06 7:06 ` [PATCH v2 4/6] gpu: nova-core: gsp: cmdq: move message trimming into its own function Alexandre Courbot
2026-11-06 9:08 ` Eliot Courtney
2026-11-08 14:49 ` Alexandre Courbot
2026-11-06 7:06 ` [PATCH v2 5/6] gpu: nova-core: gsp: cmdq: do not use ENOMSG to skip messages Alexandre Courbot
2026-11-06 9:09 ` Eliot Courtney
2026-11-06 7:06 ` [PATCH v2 6/6] gpu: nova-core: gsp: cmdq: add the GMC receive path Alexandre Courbot
2026-11-06 9:38 ` Eliot Courtney [this message]
2026-11-08 14:45 ` [PATCH v2 0/6] gpu: nova-core: gsp: add support for GMC messages Alexandre Courbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DMO1007F9PCN.X7VPTFMFVQNL@nvidia.com \
--to=ecourtney@nvidia.com \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=ttabi@nvidia.com \
--cc=zhiw@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.