Skip to contentSkip to conversation

nouveau: add option to avoid 535 firmware in initramfs

PATCH In review Dave Airlie 3 participants 8 messages Oct 7, 2025 – Oct 8, 2025

Subsystems (3)
lore
Share & tools
lore

Dave Airlie

author maintainer
#0 lore raw

PATCH 1/1 nouveau: add option to avoid 535 firmware in initramfs

From: Dave Airlie <[email protected]>

Ben gave me this idea before he finished up, and I just didn't think to write it out. This adds a config option that if enabled will stop the 535 firmware being requested, so that it won't end up in the initramfs.

This option should only be enabled if you are on a distro with a new enough linux-firmware with the 570 firmware contained in it.

---
 drivers/gpu/drm/nouveau/Kconfig                 | 9 +++++++++
 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ad102.c | 2 ++
 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga100.c | 2 ++
 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga102.c | 2 ++
 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu102.c | 2 ++
 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu116.c | 2 ++
 6 files changed, 19 insertions(+)
drivers/gpu/drm/nouveau/Kconfig +9 -0
index c88776d1e784..fd56458189dd 100644
@@ -39,6 +39,15 @@ config NOUVEAU_PLATFORM_DRIVER
 	  Support for Nouveau platform driver, used for SoC GPUs as found
 	  on NVIDIA Tegra K1.
 
+config DRM_NOUVEAU_570_ONLY
+	bool "Only support 570 firmware, don't add 535 to the initrd."
+	depends on DRM_NOUVEAU
+	default n
+	help
+          Nouveau can support 535 and 570 firmwares, but that means both
+          will end up in initramfs, bloating it. If you can guarantee you
+          have the 570 in your distro or install, enable this option.
+
 config NOUVEAU_DEBUG
 	int "Maximum debug level"
 	depends on DRM_NOUVEAU
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ad102.c +2 -0
index 35d1fcef520b..452c1e4f4095 100644
@@ -53,11 +53,13 @@ ad102_gsp_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
 	return nvkm_gsp_new_(ad102_gsps, device, type, inst, pgsp);
 }
 
+#ifndef CONFIG_DRM_NOUVEAU_570_ONLY
 NVKM_GSP_FIRMWARE_BOOTER(ad102, 535.113.01);
 NVKM_GSP_FIRMWARE_BOOTER(ad103, 535.113.01);
 NVKM_GSP_FIRMWARE_BOOTER(ad104, 535.113.01);
 NVKM_GSP_FIRMWARE_BOOTER(ad106, 535.113.01);
 NVKM_GSP_FIRMWARE_BOOTER(ad107, 535.113.01);
+#endif
 
 NVKM_GSP_FIRMWARE_BOOTER(ad102, 570.144);
 NVKM_GSP_FIRMWARE_BOOTER(ad103, 570.144);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga100.c +2 -0
index d201e8697226..d8410f3c65da 100644
@@ -71,5 +71,7 @@ ga100_gsp_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
 	return nvkm_gsp_new_(ga100_gsps, device, type, inst, pgsp);
 }
 
+#ifndef CONFIG_DRM_NOUVEAU_570_ONLY
 NVKM_GSP_FIRMWARE_BOOTER(ga100, 535.113.01);
+#endif
 NVKM_GSP_FIRMWARE_BOOTER(ga100, 570.144);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga102.c +2 -0
index 917f7e2f6c46..55e58373ca6d 100644
@@ -187,11 +187,13 @@ ga102_gsp_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
 	return nvkm_gsp_new_(ga102_gsps, device, type, inst, pgsp);
 }
 
+#ifndef CONFIG_DRM_NOUVEAU_570_ONLY
 NVKM_GSP_FIRMWARE_BOOTER(ga102, 535.113.01);
 NVKM_GSP_FIRMWARE_BOOTER(ga103, 535.113.01);
 NVKM_GSP_FIRMWARE_BOOTER(ga104, 535.113.01);
 NVKM_GSP_FIRMWARE_BOOTER(ga106, 535.113.01);
 NVKM_GSP_FIRMWARE_BOOTER(ga107, 535.113.01);
+#endif
 
 NVKM_GSP_FIRMWARE_BOOTER(ga102, 570.144);
 NVKM_GSP_FIRMWARE_BOOTER(ga103, 570.144);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu102.c +2 -0
index 81e56da0474a..691453ddf191 100644
@@ -436,9 +436,11 @@ tu102_gsp_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
 	return nvkm_gsp_new_(tu102_gsps, device, type, inst, pgsp);
 }
 
+#ifndef CONFIG_DRM_NOUVEAU_570_ONLY
 NVKM_GSP_FIRMWARE_BOOTER(tu102, 535.113.01);
 NVKM_GSP_FIRMWARE_BOOTER(tu104, 535.113.01);
 NVKM_GSP_FIRMWARE_BOOTER(tu106, 535.113.01);
+#endif
 
 NVKM_GSP_FIRMWARE_BOOTER(tu102, 570.144);
 NVKM_GSP_FIRMWARE_BOOTER(tu104, 570.144);
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu116.c +2 -0
index 97eb046c25d0..fd142c17a9d0 100644
@@ -54,8 +54,10 @@ tu116_gsp_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
 	return nvkm_gsp_new_(tu116_gsps, device, type, inst, pgsp);
 }
 
+#ifndef CONFIG_DRM_NOUVEAU_570_ONLY
 NVKM_GSP_FIRMWARE_BOOTER(tu116, 535.113.01);
 NVKM_GSP_FIRMWARE_BOOTER(tu117, 535.113.01);
+#endif
 
 NVKM_GSP_FIRMWARE_BOOTER(tu116, 570.144);
 NVKM_GSP_FIRMWARE_BOOTER(tu117, 570.144);
Signature · 1 line
2.51.0
#1 lore raw

drivers/gpu/drm/nouveau/Kconfig config NOUVEAU_PLATFORM_DRIVER · line 50

Quoted 9 lines · Dave Airlie
drivers/gpu/drm/nouveau/Kconfig +9 -0
+config DRM_NOUVEAU_570_ONLY
+	bool "Only support 570 firmware, don't add 535 to the initrd."
+	depends on DRM_NOUVEAU
+	default n
+	help
+          Nouveau can support 535 and 570 firmwares, but that means both
+          will end up in initramfs, bloating it. If you can guarantee you
+          have the 570 in your distro or install, enable this option.
+

I don't like the idea of using the specific version number in the Kconfig.

Can we rename this to "DRM_NOUVEAU_LATEST_FW_ONLY" or something like that, and Nouveau automatically only supports whatever the latest version is? I know we probably won't add support for anything after 570, but we might.

author maintainer
#2 lore raw
Quoted 14 lines · Timur Tabi

drivers/gpu/drm/nouveau/Kconfig config NOUVEAU_PLATFORM_DRIVER · line 50

Quoted 9 lines · Dave Airlie
drivers/gpu/drm/nouveau/Kconfig +9 -0
+config DRM_NOUVEAU_570_ONLY
+     bool "Only support 570 firmware, don't add 535 to the initrd."
+     depends on DRM_NOUVEAU
+     default n
+     help
+          Nouveau can support 535 and 570 firmwares, but that means both
+          will end up in initramfs, bloating it. If you can guarantee you
+          have the 570 in your distro or install, enable this option.
+

I don't like the idea of using the specific version number in the Kconfig.

Quoted 3 lines

Can we rename this to "DRM_NOUVEAU_LATEST_FW_ONLY" or something like that, and Nouveau automatically only supports whatever the latest version is? I know we probably won't add support for anything after 570, but we might.

We can't do that, because if we moved to 580, and distros have this option on for 570, they would fail unless they had the 580 firmware, so it needs to be versioned.

Dave.

#3 lore raw
Quoted 3 lines · Dave Airlie

We can't do that, because if we moved to 580, and distros have this option on for 570, they would fail unless they had the 580 firmware, so it needs to be versioned.

Hmmm then how about making it a choice of which version to support:

choice
prompt "Firmware version supported"
default DRM_NOUVEAU_ANY

config DRM_NOUVEAU_535_ONLY
...

config DRM_NOUVEAU_535_ONLY
...

endchoice

Or something like that. I can't figure out how choices work, but the idea is that the defconfig defaults to allowing all versions, but you can pick a specific one.

#4 lore raw

Hi all,

Quoted 10 lines · Dave Airlie
Quoted 3 lines

We can't do that, because if we moved to 580, and distros have this option on for 570, they would fail unless they had the 580 firmware, so it needs to be versioned.

Hmmm then how about making it a choice of which version to support:

choice
prompt "Firmware version supported"
default DRM_NOUVEAU_ANY

You probably know it, in case you don't: DRM_NOUVEAU_ANY needs to be also as config:

config DRM_NOUVEAU_ANY

	bool "Support all firmware versions"
	...
Quoted 7 lines

config DRM_NOUVEAU_535_ONLY
...

config DRM_NOUVEAU_535_ONLY
...

endchoice

+1

Quoted 1 line

Or something like that. I can't figure out how choices work, but the idea is that the defconfig

Kind regards,
Petr

Quoted 1 line

defaults to allowing all versions, but you can pick a specific one.

author maintainer
#5 lore raw
Quoted 27 lines · Petr Vorel

Hi all,

Quoted 10 lines · Dave Airlie
Quoted 3 lines

We can't do that, because if we moved to 580, and distros have this option on for 570, they would fail unless they had the 580 firmware, so it needs to be versioned.

Hmmm then how about making it a choice of which version to support:

choice
prompt "Firmware version supported"
default DRM_NOUVEAU_ANY

You probably know it, in case you don't: DRM_NOUVEAU_ANY needs to be also as config:

config DRM_NOUVEAU_ANY
bool "Support all firmware versions"
...

Quoted 5 lines

config DRM_NOUVEAU_535_ONLY
...

config DRM_NOUVEAU_535_ONLY
...

Quoted 10 lines
Quoted 1 line

endchoice

+1

Quoted 1 line

Or something like that. I can't figure out how choices work, but the idea is that the defconfig

Kind regards,
Petr

Quoted 1 line

defaults to allowing all versions, but you can pick a specific one.

I think that is getting a bit complicated for distros though. There is no reason to ever want 535 only. We don't want to give people options we don't actually support.

The options we have in the current driver, is you get 535 + 570, and we give you the option to say I only need 570. If we add 580, we add another option and fix it then, but I don't see the point in overdesigning this for now.

Dave.

Quoted 1 line
#6 lore raw
Quoted 3 lines · Dave Airlie

I think that is getting a bit complicated for distros though. There is no reason to ever want 535 only. We don't want to give people options we don't actually support.

My Ubuntu 25.04 system ships with kernel 6.14 but only the r535 firmware. So there systems out there with recent kernels that would select 535-only.

Quoted 4 lines

The options we have in the current driver, is you get 535 + 570, and we give you the option to say I only need 570. If we add 580, we add another option and fix it then, but I don't see the point in overdesigning this for now.

Well, like you said, if we move to 580, then now we need to decide between 570 and 580. So let's set up a Kconfig system that handles multiple versions in a future-proof way.

author maintainer
#7 lore raw
Quoted 8 lines · Timur Tabi
Quoted 3 lines · Dave Airlie

I think that is getting a bit complicated for distros though. There is no reason to ever want 535 only. We don't want to give people options we don't actually support.

My Ubuntu 25.04 system ships with kernel 6.14 but only the r535 firmware. So there systems out there with recent kernels that would select 535-only.

But there is no need to select 535 only, if you only have 535 firmware you can't get the initramfs having 535 + 570 firmware.

The problem is when the distro has 535 + 570, you want to let them say that and drop 535. Nobody needs 535 only as an option, so it confuses people to provide it.

Quoted 8 lines
Quoted 5 lines

The options we have in the current driver, is you get 535 + 570, and we give you the option to say I only need 570. If we add 580, we add another option and fix it then, but I don't see the point in overdesigning this for now.

Well, like you said, if we move to 580, then now we need to decide between 570 and 580. So let's set up a Kconfig system that handles multiple versions in a future-proof way.

We just add the exact same option when we merge 580 support, I'm not sure what future proofing we would need, the option isn't that much work.

Dave.