* [PATCH] nouveau: add option to avoid 535 firmware in initramfs
@ 2025-10-07 1:32 Dave Airlie
2025-10-07 3:29 ` Timur Tabi
0 siblings, 1 reply; 8+ messages in thread
From: Dave Airlie @ 2025-10-07 1:32 UTC (permalink / raw)
To: dri-devel; +Cc: nouveau, dakr
From: Dave Airlie <airlied@redhat.com>
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.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
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(+)
diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig
index c88776d1e784..fd56458189dd 100644
--- a/drivers/gpu/drm/nouveau/Kconfig
+++ b/drivers/gpu/drm/nouveau/Kconfig
@@ -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
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ad102.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ad102.c
index 35d1fcef520b..452c1e4f4095 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ad102.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ad102.c
@@ -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);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga100.c
index d201e8697226..d8410f3c65da 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga100.c
@@ -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);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga102.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga102.c
index 917f7e2f6c46..55e58373ca6d 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga102.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga102.c
@@ -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);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu102.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu102.c
index 81e56da0474a..691453ddf191 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu102.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu102.c
@@ -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);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu116.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu116.c
index 97eb046c25d0..fd142c17a9d0 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu116.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu116.c
@@ -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);
--
2.51.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] nouveau: add option to avoid 535 firmware in initramfs
2025-10-07 1:32 [PATCH] nouveau: add option to avoid 535 firmware in initramfs Dave Airlie
@ 2025-10-07 3:29 ` Timur Tabi
2025-10-07 3:31 ` Dave Airlie
0 siblings, 1 reply; 8+ messages in thread
From: Timur Tabi @ 2025-10-07 3:29 UTC (permalink / raw)
To: dri-devel@lists.freedesktop.org, airlied@gmail.com
Cc: nouveau@lists.freedesktop.org, dakr@kernel.org
On Tue, 2025-10-07 at 11:32 +1000, Dave Airlie wrote:
> +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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] nouveau: add option to avoid 535 firmware in initramfs
2025-10-07 3:29 ` Timur Tabi
@ 2025-10-07 3:31 ` Dave Airlie
2025-10-07 3:41 ` Timur Tabi
0 siblings, 1 reply; 8+ messages in thread
From: Dave Airlie @ 2025-10-07 3:31 UTC (permalink / raw)
To: Timur Tabi
Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
dakr@kernel.org
On Tue, 7 Oct 2025 at 13:29, Timur Tabi <ttabi@nvidia.com> wrote:
>
> On Tue, 2025-10-07 at 11:32 +1000, Dave Airlie wrote:
> > +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.
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] nouveau: add option to avoid 535 firmware in initramfs
2025-10-07 3:31 ` Dave Airlie
@ 2025-10-07 3:41 ` Timur Tabi
2025-10-07 15:20 ` Petr Vorel
0 siblings, 1 reply; 8+ messages in thread
From: Timur Tabi @ 2025-10-07 3:41 UTC (permalink / raw)
To: airlied@gmail.com
Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
dakr@kernel.org
On Tue, 2025-10-07 at 13:31 +1000, Dave Airlie wrote:
> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] nouveau: add option to avoid 535 firmware in initramfs
2025-10-07 3:41 ` Timur Tabi
@ 2025-10-07 15:20 ` Petr Vorel
2025-10-08 1:48 ` Dave Airlie
0 siblings, 1 reply; 8+ messages in thread
From: Petr Vorel @ 2025-10-07 15:20 UTC (permalink / raw)
To: Timur Tabi
Cc: airlied@gmail.com, dri-devel@lists.freedesktop.org,
nouveau@lists.freedesktop.org, dakr@kernel.org
Hi all,
> On Tue, 2025-10-07 at 13:31 +1000, Dave Airlie wrote:
> > 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"
...
> config DRM_NOUVEAU_535_ONLY
> ...
> config DRM_NOUVEAU_535_ONLY
> ...
> endchoice
+1
> Or something like that. I can't figure out how choices work, but the idea is that the defconfig
Kind regards,
Petr
> defaults to allowing all versions, but you can pick a specific one.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] nouveau: add option to avoid 535 firmware in initramfs
2025-10-07 15:20 ` Petr Vorel
@ 2025-10-08 1:48 ` Dave Airlie
2025-10-08 3:18 ` Timur Tabi
0 siblings, 1 reply; 8+ messages in thread
From: Dave Airlie @ 2025-10-08 1:48 UTC (permalink / raw)
To: Petr Vorel
Cc: Timur Tabi, dri-devel@lists.freedesktop.org,
nouveau@lists.freedesktop.org, dakr@kernel.org
On Wed, 8 Oct 2025 at 01:20, Petr Vorel <pvorel@suse.cz> wrote:
>
> Hi all,
>
> > On Tue, 2025-10-07 at 13:31 +1000, Dave Airlie wrote:
> > > 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"
> ...
>
> > config DRM_NOUVEAU_535_ONLY
> > ...
>
> > config DRM_NOUVEAU_535_ONLY
> > ...
>
> > endchoice
>
> +1
>
> > Or something like that. I can't figure out how choices work, but the idea is that the defconfig
>
> Kind regards,
> Petr
>
> > 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.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] nouveau: add option to avoid 535 firmware in initramfs
2025-10-08 1:48 ` Dave Airlie
@ 2025-10-08 3:18 ` Timur Tabi
2025-10-08 3:43 ` Dave Airlie
0 siblings, 1 reply; 8+ messages in thread
From: Timur Tabi @ 2025-10-08 3:18 UTC (permalink / raw)
To: airlied@gmail.com, pvorel@suse.cz
Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
dakr@kernel.org
On Wed, 2025-10-08 at 11:48 +1000, Dave Airlie wrote:
> 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.
> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] nouveau: add option to avoid 535 firmware in initramfs
2025-10-08 3:18 ` Timur Tabi
@ 2025-10-08 3:43 ` Dave Airlie
0 siblings, 0 replies; 8+ messages in thread
From: Dave Airlie @ 2025-10-08 3:43 UTC (permalink / raw)
To: Timur Tabi
Cc: pvorel@suse.cz, dri-devel@lists.freedesktop.org,
nouveau@lists.freedesktop.org, dakr@kernel.org
On Wed, 8 Oct 2025 at 13:18, Timur Tabi <ttabi@nvidia.com> wrote:
>
> On Wed, 2025-10-08 at 11:48 +1000, Dave Airlie wrote:
> > 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.
>
> > 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-12-13 12:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-07 1:32 [PATCH] nouveau: add option to avoid 535 firmware in initramfs Dave Airlie
2025-10-07 3:29 ` Timur Tabi
2025-10-07 3:31 ` Dave Airlie
2025-10-07 3:41 ` Timur Tabi
2025-10-07 15:20 ` Petr Vorel
2025-10-08 1:48 ` Dave Airlie
2025-10-08 3:18 ` Timur Tabi
2025-10-08 3:43 ` Dave Airlie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.