NVIDIA GPU driver infrastructure
 help / color / mirror / Atom feed
From: Timur Tabi <ttabi@nvidia.com>
To: "dakr@kernel.org" <dakr@kernel.org>
Cc: "gary@garyguo.net" <gary@garyguo.net>,
	"nova-gpu@lists.linux.dev" <nova-gpu@lists.linux.dev>,
	Alexandre Courbot <acourbot@nvidia.com>,
	Zhi Wang <zhiw@nvidia.com>, Eliot Courtney <ecourtney@nvidia.com>,
	John Hubbard <jhubbard@nvidia.com>
Subject: Re: [PATCH 2/8] gpu: nova-core: add request_tlv to load TLV images
Date: Thu, 11 Jun 2026 16:45:07 +0000	[thread overview]
Message-ID: <769e0e91a8715e3665545a22decd3eb8cb111ddb.camel@nvidia.com> (raw)
In-Reply-To: <DJ5PH7GLXQMC.3MB95TLS6T86D@kernel.org>

On Thu, 2026-06-11 at 00:00 +0200, Danilo Krummrich wrote:

> 
> > diff --git a/drivers/gpu/nova-core/firmware.rs b/drivers/gpu/nova-core/firmware.rs
> > index 279fbacd0b8e..2749c196416d 100644
> > --- a/drivers/gpu/nova-core/firmware.rs
> > +++ b/drivers/gpu/nova-core/firmware.rs
> > @@ -33,9 +33,11 @@
> >  pub(crate) mod gsp;
> >  pub(crate) mod riscv;
> >  
> > +#[allow(unused)]
> 
> This shouldn't be needed, it can just be removed when once it becomes unused,
> no?

Technically, yes.  As a convenience, I removed it here so that I wouldn't have to worry about it
in a later patch.  I find that the patches themselves are cleaner that way.  I don't want to
have a patch where the only change to firmware.rs is adding or removing the `unused` statement.

> 
> >  pub(crate) const FIRMWARE_VERSION: &str = "570.144";
> >  
> >  /// Requests the GPU firmware `name` suitable for `chipset`, with version `ver`.
> > +#[allow(unused)]
> >  fn request_firmware(
> >      dev: &device::Device,
> >      chipset: gpu::Chipset,
> > @@ -48,6 +50,21 @@ fn request_firmware(
> >          .and_then(|path| firmware::Firmware::request(&path, dev))
> >  }
> >  
> > +/// Requests the GPU firmware TLV `name` suitable for `chipset`.
> > +#[allow(unused)]
> 
> Please use expect instead.

Ok, but why should I use `expect` here but `allowed` is for FIRMWARE_VERSION?  As soon as I use
request_tlv() in patch #4, won't get I get a compiler warning and be forced to change it to
`allow`?

> > +fn request_tlv(
> > +    dev: &device::Device,
> > +    chipset: gpu::Chipset,
> > +    name: &str,
> > +) -> Result<firmware::Firmware> {
> > +    let chip_name = chipset.name();
> > +
> > +    dev_info!(dev, "loading firmware image {}.tlv\n", name);
> 
> Please use dev_dbg!() instead, this should not be printed under normal
> operation.

Ok.

  reply	other threads:[~2026-06-11 16:45 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-10 17:49 [PATCH 0/8] Transition Nova Core to TLV firmware images Timur Tabi
2026-06-10 17:49 ` [PATCH 1/8] rust: firmware: add request_into_buf() Timur Tabi
2026-06-10 18:03   ` Gary Guo
2026-06-10 18:24     ` Timur Tabi
2026-06-10 20:26       ` Gary Guo
2026-06-10 20:28         ` Timur Tabi
2026-06-10 21:46         ` Danilo Krummrich
2026-06-11  4:58       ` Alexandre Courbot
2026-06-11 15:48         ` Timur Tabi
2026-06-11  6:49   ` Alexandre Courbot
2026-06-11 16:32     ` Timur Tabi
2026-06-11 19:18       ` Danilo Krummrich
2026-06-11 19:28         ` Timur Tabi
2026-06-11 19:31           ` John Hubbard
2026-06-11 20:01             ` Timur Tabi
2026-06-11 21:55               ` John Hubbard
2026-06-11 21:56               ` Danilo Krummrich
2026-06-11 21:49           ` Danilo Krummrich
2026-06-12  2:59           ` Alexandre Courbot
2026-06-12 14:51   ` Alexandre Courbot
2026-06-10 17:49 ` [PATCH 2/8] gpu: nova-core: add request_tlv to load TLV images Timur Tabi
2026-06-10 22:00   ` Danilo Krummrich
2026-06-11 16:45     ` Timur Tabi [this message]
2026-06-11 18:17       ` Gary Guo
2026-06-11 18:26         ` Timur Tabi
2026-06-11 18:42           ` Gary Guo
2026-06-11 18:53             ` Timur Tabi
2026-06-11 19:16               ` John Hubbard
2026-06-11 18:53       ` Danilo Krummrich
2026-06-11 18:57         ` Timur Tabi
2026-06-10 17:49 ` [PATCH 3/8] gpu: nova-core: add TLV parser for firmware files Timur Tabi
2026-06-10 22:37   ` Danilo Krummrich
2026-06-11  6:51     ` Alexandre Courbot
2026-06-11 18:40       ` John Hubbard
2026-06-11 23:29     ` Timur Tabi
2026-06-12 14:46   ` Alexandre Courbot
2026-06-12 18:04     ` Timur Tabi
2026-06-12 23:27       ` Alexandre Courbot
2026-06-12 23:39     ` John Hubbard
2026-06-10 17:49 ` [PATCH 4/8] gpu: nova-core: transition booter_load to TLV images Timur Tabi
2026-06-10 17:49 ` [PATCH 5/8] gpu: nova-core: transition gsp " Timur Tabi
2026-06-10 17:49 ` [PATCH 6/8] gpu: nova-core: transition gen_bootloader " Timur Tabi
2026-06-10 17:49 ` [PATCH 7/8] gpu: nova-core: transition fsp " Timur Tabi
2026-06-10 17:49 ` [PATCH 8/8] gpu: nova-core: update firmware module info for " Timur Tabi
2026-06-12 15:02   ` Alexandre Courbot
2026-06-12 15:44     ` Timur Tabi
2026-06-10 18:16 ` [PATCH 0/8] Transition Nova Core to TLV firmware images John Hubbard
2026-06-10 18:19   ` Timur Tabi
2026-06-10 18:59     ` Timur Tabi
2026-06-10 21:21       ` John Hubbard
2026-06-10 21:43         ` Timur Tabi

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=769e0e91a8715e3665545a22decd3eb8cb111ddb.camel@nvidia.com \
    --to=ttabi@nvidia.com \
    --cc=acourbot@nvidia.com \
    --cc=dakr@kernel.org \
    --cc=ecourtney@nvidia.com \
    --cc=gary@garyguo.net \
    --cc=jhubbard@nvidia.com \
    --cc=nova-gpu@lists.linux.dev \
    --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