From: sashiko-bot@kernel.org
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>,
nova-gpu@lists.linux.dev, ojeda@kernel.org
Subject: Re: [PATCH 3/4] gpu: nova-core: gsp: cmdq: add the GMC send path
Date: Tue, 03 Nov 2026 00:08:44 +0000 [thread overview]
Message-ID: <sashiko-outbox-194361@kernel.org> (raw)
In-Reply-To: <20261103-r000_rebase_on_cmdq-rpc-v1-3-189f9ff3bfd2@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] gpu: nova-core: return type mismatch in CmdqInner::send_gmc_command()
--
commit 1e1d150084c3f6fc3d6e13ffe004caffa1b2a4a0
Author: John Hubbard <jhubbard@nvidia.com>
gpu: nova-core: gsp: cmdq: add the GMC send path
This commit adds the gmc submodule to the GSP command queue in nova-core to
support sending GPU Management Controller (GMC) API commands such as GSP_INIT.
> diff --git a/drivers/gpu/nova-core/gsp/cmdq/gmc.rs b/drivers/gpu/nova-core/gsp/cmdq/gmc.rs
> new file mode 100644
> index 0000000000000..b035f30479a84
> --- /dev/null
> +++ b/drivers/gpu/nova-core/gsp/cmdq/gmc.rs
> @@ -0,0 +1,194 @@
[ ... ]
> +impl CmdqInner<'_> {
> + /// Sends `command` to the GSP, and returns the sequence number of its element.
> + ///
> + /// Unlike RPC commands, GMC commands are never split: a command that does not fit in a single
> + /// element is an error.
> + ///
> + /// # Errors
> + ///
> + /// - `EMSGSIZE` if the command does not fit in a single command queue element.
> + /// - `ETIMEDOUT` if space does not become available within the timeout.
> + /// - `EIO` if the variable payload requested by the command has not been entirely
> + /// written to by its [`CommandToGsp::init_variable_payload`] method.
> + ///
> + /// Error codes returned by the command initializer are propagated as-is.
> + fn send_gmc_command<C>(&mut self, command: C) -> Result<u32>
> + where
> + C: CommandToGsp,
> + Error: From<C::InitError>,
> + {
> + self.send_command_element(GmcCommandElement(command))
> + }
> +}
[Severity: Low]
Does this compile when CONFIG_DRM_NOVA is enabled?
In drivers/gpu/nova-core/gsp/cmdq/gmc.rs, CmdqInner::send_gmc_command() is
declared with a return type of Result<u32> and directly returns the result of
self.send_command_element().
However, in drivers/gpu/nova-core/gsp/cmdq.rs, CmdqInner::send_command_element()
returns Result (i.e. Result<(), Error>):
fn send_command_element<E: CommandElement>(&mut self, command: E) -> Result {
...
Ok(())
}
Wouldn't this fail to build with a mismatched types error?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261103-r000_rebase_on_cmdq-rpc-v1-0-189f9ff3bfd2@nvidia.com?part=3
next prev parent reply other threads:[~2026-11-03 0:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 0:02 [PATCH 0/4] gpu: nova-core: gsp: add support for GMC messages Alexandre Courbot
2026-11-03 0:02 ` [PATCH 1/4] gpu: nova-core: gsp: fw: add the r000 bindings for the GMC API header Alexandre Courbot
2026-11-04 9:21 ` Eliot Courtney
2026-11-03 0:02 ` [PATCH 2/4] gpu: nova-core: gsp: add " Alexandre Courbot
2026-11-04 9:34 ` Eliot Courtney
2026-11-03 0:02 ` [PATCH 3/4] gpu: nova-core: gsp: cmdq: add the GMC send path Alexandre Courbot
2026-11-03 0:08 ` sashiko-bot [this message]
2026-11-03 0:02 ` [PATCH 4/4] gpu: nova-core: gsp: cmdq: add the GMC receive path Alexandre Courbot
2026-11-03 0:14 ` sashiko-bot
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=sashiko-outbox-194361@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=dakr@kernel.org \
--cc=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=lossin@kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox