public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Danilo Krummrich <dakr@kernel.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: airlied@gmail.com, simona@ffwll.ch, corbet@lwn.net,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	tzimmermann@suse.de, ajanulgu@redhat.com, lyude@redhat.com,
	pstanner@redhat.com, zhiw@nvidia.com, cjia@nvidia.com,
	jhubbard@nvidia.com, bskeggs@nvidia.com, acurrid@nvidia.com,
	ojeda@kernel.org, alex.gaynor@gmail.com, boqun.feng@gmail.com,
	gary@garyguo.net, bjorn3_gh@protonmail.com,
	benno.lossin@proton.me, a.hindborg@kernel.org,
	aliceryhl@google.com, tmgross@umich.edu,
	dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org,
	rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v3 1/2] gpu: nova-core: add initial driver stub
Date: Mon, 10 Feb 2025 09:39:13 +0100	[thread overview]
Message-ID: <Z6m7MVErUPbkK9vV@pollux> (raw)
In-Reply-To: <2025021011-dangling-retrain-f61e@gregkh>

On Mon, Feb 10, 2025 at 07:24:59AM +0100, Greg KH wrote:
> On Sun, Feb 09, 2025 at 06:30:24PM +0100, Danilo Krummrich wrote:
> > +config NOVA_CORE
> > +	tristate "Nova Core GPU driver"
> > +	depends on PCI
> > +	depends on RUST
> > +	depends on RUST_FW_LOADER_ABSTRACTIONS
> > +	default n
> 
> Tiny nit, if you happen to respin this, "default n" is always the
> default, so there's never a need to specify it.

At some point we'll want to change that to 'default m', and I thought keeping it
explicit is probably a good reminder. But I'm also fine removing it.

> 
> > +impl Firmware {
> > +    fn new(dev: &device::Device, spec: &Spec, ver: &str) -> Result<Firmware> {
> > +        let mut chip_name = CString::try_from_fmt(fmt!("{}", spec.chipset))?;
> > +        chip_name.make_ascii_lowercase();
> > +
> > +        let request = |name_| {
> > +            CString::try_from_fmt(fmt!("nvidia/{}/gsp/{}-{}.bin", &*chip_name, name_, ver))
> 
> How does this match up with the MODULE_FIRMWARE() aliases that end up in
> a kernel module so that the tools know to add the firmware to the system
> in the proper place (i.e. initramfs or something like that)?
> 
> I always thought you needed to individually list the firmware files, or
> does the rust implementation now somehow handle that in a programatic
> way from strings like this?

That'd be nice, but the firmware we load is (or in general might be) only a
subset of the firmware that the module needs potentially.

So, you're right, all (potentially) required firmware files need to be listed in
the module!() macro's firmware field (or in this case within
module_pci_driver!()).

Back when I wrote this code we haven't had this field yet -- thanks for
reminding me of that.

  reply	other threads:[~2025-02-10  8:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-09 17:30 [PATCH v3 1/2] gpu: nova-core: add initial driver stub Danilo Krummrich
2025-02-09 17:30 ` [PATCH v3 2/2] gpu: nova-core: add initial documentation Danilo Krummrich
2025-02-12 23:27   ` Alistair Popple
2025-02-13  0:33     ` Benno Lossin
2025-02-13  3:54       ` Alistair Popple
2025-02-13 22:12   ` Matthew Brost
2025-02-10  6:24 ` [PATCH v3 1/2] gpu: nova-core: add initial driver stub Greg KH
2025-02-10  8:39   ` Danilo Krummrich [this message]
2025-02-12  4:59 ` 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=Z6m7MVErUPbkK9vV@pollux \
    --to=dakr@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=acurrid@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=ajanulgu@redhat.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=bskeggs@nvidia.com \
    --cc=cjia@nvidia.com \
    --cc=corbet@lwn.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jhubbard@nvidia.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=ojeda@kernel.org \
    --cc=pstanner@redhat.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tmgross@umich.edu \
    --cc=tzimmermann@suse.de \
    --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