]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpu: nova-core: add Chipset::name() method
authorAlexandre Courbot <acourbot@nvidia.com>
Sat, 13 Sep 2025 14:12:16 +0000 (23:12 +0900)
committerAlexandre Courbot <acourbot@nvidia.com>
Sat, 13 Sep 2025 14:17:24 +0000 (23:17 +0900)
commitb345c917d7c1e3841d286560afca476ab7caff74
treeb5fe296918f003772f6b5d10ed2bbb1557b69bc3
parente7c96980ea4d93e79b43b07c5489d700207b0055
gpu: nova-core: add Chipset::name() method

There are a few cases where we need the lowercase name of a given
chipset, notably to resolve firmware files paths for dynamic loading or
to build the module information.

So far, we relied on a static `NAMES` array for the latter, and some
CString hackery for the former.

Replace both with a new `name` const method that returns the lowercase
name of a chipset instance. We can generate it using the `paste!` macro.

Using this method removes the need to create a `CString` when loading
firmware, and lets us remove a couple of utility functions that now have
no user.

Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250913-nova_firmware-v6-3-9007079548b0@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
drivers/gpu/nova-core/firmware.rs
drivers/gpu/nova-core/gpu.rs
drivers/gpu/nova-core/util.rs