Nicolas Chauvet
2018-Jun-10 11:01 UTC
[Nouveau] [PATCH] drm: nouveau: Enable gp20b/gp10b firmware tag when relevant
This allows to have the related MODULE_FIRMWARE tag only on relevant arch (arm64). This will saves about 400k on initramfs when not relevant Signed-off-by: Nicolas Chauvet <kwizart at gmail.com> --- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c index 30491d132d59..df8b919dcf09 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c @@ -129,6 +129,7 @@ gm20b_secboot_new(struct nvkm_device *device, int index, return 0; } +#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC) MODULE_FIRMWARE("nvidia/gm20b/acr/bl.bin"); MODULE_FIRMWARE("nvidia/gm20b/acr/ucode_load.bin"); MODULE_FIRMWARE("nvidia/gm20b/gr/fecs_bl.bin"); @@ -144,3 +145,4 @@ MODULE_FIRMWARE("nvidia/gm20b/gr/sw_method_init.bin"); MODULE_FIRMWARE("nvidia/gm20b/pmu/desc.bin"); MODULE_FIRMWARE("nvidia/gm20b/pmu/image.bin"); MODULE_FIRMWARE("nvidia/gm20b/pmu/sig.bin"); +#endif diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.c index 632e9545e292..28ca29d0eeee 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.c @@ -74,6 +74,7 @@ gp10b_secboot_new(struct nvkm_device *device, int index, return 0; } +#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) MODULE_FIRMWARE("nvidia/gp10b/acr/bl.bin"); MODULE_FIRMWARE("nvidia/gp10b/acr/ucode_load.bin"); MODULE_FIRMWARE("nvidia/gp10b/gr/fecs_bl.bin"); @@ -91,3 +92,4 @@ MODULE_FIRMWARE("nvidia/gp10b/gr/sw_method_init.bin"); MODULE_FIRMWARE("nvidia/gp10b/pmu/desc.bin"); MODULE_FIRMWARE("nvidia/gp10b/pmu/image.bin"); MODULE_FIRMWARE("nvidia/gp10b/pmu/sig.bin"); +#endif -- 2.13.6
Thierry Reding
2018-Jun-11 08:33 UTC
[Nouveau] [PATCH] drm: nouveau: Enable gp20b/gp10b firmware tag when relevant
On Sun, Jun 10, 2018 at 01:01:31PM +0200, Nicolas Chauvet wrote:> This allows to have the related MODULE_FIRMWARE tag only > on relevant arch (arm64). > This will saves about 400k on initramfs when not relevant > > Signed-off-by: Nicolas Chauvet <kwizart at gmail.com> > --- > drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c | 2 ++ > drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.c | 2 ++ > 2 files changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c > index 30491d132d59..df8b919dcf09 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c > @@ -129,6 +129,7 @@ gm20b_secboot_new(struct nvkm_device *device, int index, > return 0; > } > > +#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC) > MODULE_FIRMWARE("nvidia/gm20b/acr/bl.bin"); > MODULE_FIRMWARE("nvidia/gm20b/acr/ucode_load.bin"); > MODULE_FIRMWARE("nvidia/gm20b/gr/fecs_bl.bin"); > @@ -144,3 +145,4 @@ MODULE_FIRMWARE("nvidia/gm20b/gr/sw_method_init.bin"); > MODULE_FIRMWARE("nvidia/gm20b/pmu/desc.bin"); > MODULE_FIRMWARE("nvidia/gm20b/pmu/image.bin"); > MODULE_FIRMWARE("nvidia/gm20b/pmu/sig.bin"); > +#endif > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.c > index 632e9545e292..28ca29d0eeee 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.c > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.c > @@ -74,6 +74,7 @@ gp10b_secboot_new(struct nvkm_device *device, int index, > return 0; > } > > +#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) > MODULE_FIRMWARE("nvidia/gp10b/acr/bl.bin"); > MODULE_FIRMWARE("nvidia/gp10b/acr/ucode_load.bin"); > MODULE_FIRMWARE("nvidia/gp10b/gr/fecs_bl.bin"); > @@ -91,3 +92,4 @@ MODULE_FIRMWARE("nvidia/gp10b/gr/sw_method_init.bin"); > MODULE_FIRMWARE("nvidia/gp10b/pmu/desc.bin"); > MODULE_FIRMWARE("nvidia/gp10b/pmu/image.bin"); > MODULE_FIRMWARE("nvidia/gp10b/pmu/sig.bin"); > +#endifI suppose that makes sense, so: Acked-by: Thierry Reding <treding at nvidia.com> On a side-note, I was checking for what we do for gk20a, but it seems like we don't have MODULE_FIRMWARE() entries for Tegra124. How do we make sure that firmware is automatically pulled into initramfs on the Tegra124 devices? Thierry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20180611/f4f5670d/attachment.sig>
Nicolas Chauvet
2018-Jun-11 09:32 UTC
[Nouveau] [PATCH] drm: nouveau: Enable gp20b/gp10b firmware tag when relevant
2018-06-11 10:33 GMT+02:00 Thierry Reding <thierry.reding at gmail.com>:> On Sun, Jun 10, 2018 at 01:01:31PM +0200, Nicolas Chauvet wrote: >> This allows to have the related MODULE_FIRMWARE tag only >> on relevant arch (arm64). >> This will saves about 400k on initramfs when not relevant >> >> Signed-off-by: Nicolas Chauvet <kwizart at gmail.com> >> --- >> drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c | 2 ++ >> drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.c | 2 ++ >> 2 files changed, 4 insertions(+) >> >> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c >> index 30491d132d59..df8b919dcf09 100644 >> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c >> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c >> @@ -129,6 +129,7 @@ gm20b_secboot_new(struct nvkm_device *device, int index, >> return 0; >> } >> >> +#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC) >> MODULE_FIRMWARE("nvidia/gm20b/acr/bl.bin"); >> MODULE_FIRMWARE("nvidia/gm20b/acr/ucode_load.bin"); >> MODULE_FIRMWARE("nvidia/gm20b/gr/fecs_bl.bin"); >> @@ -144,3 +145,4 @@ MODULE_FIRMWARE("nvidia/gm20b/gr/sw_method_init.bin"); >> MODULE_FIRMWARE("nvidia/gm20b/pmu/desc.bin"); >> MODULE_FIRMWARE("nvidia/gm20b/pmu/image.bin"); >> MODULE_FIRMWARE("nvidia/gm20b/pmu/sig.bin"); >> +#endif >> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.c >> index 632e9545e292..28ca29d0eeee 100644 >> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.c >> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp10b.c >> @@ -74,6 +74,7 @@ gp10b_secboot_new(struct nvkm_device *device, int index, >> return 0; >> } >> >> +#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) >> MODULE_FIRMWARE("nvidia/gp10b/acr/bl.bin"); >> MODULE_FIRMWARE("nvidia/gp10b/acr/ucode_load.bin"); >> MODULE_FIRMWARE("nvidia/gp10b/gr/fecs_bl.bin"); >> @@ -91,3 +92,4 @@ MODULE_FIRMWARE("nvidia/gp10b/gr/sw_method_init.bin"); >> MODULE_FIRMWARE("nvidia/gp10b/pmu/desc.bin"); >> MODULE_FIRMWARE("nvidia/gp10b/pmu/image.bin"); >> MODULE_FIRMWARE("nvidia/gp10b/pmu/sig.bin"); >> +#endif > > I suppose that makes sense, so: > > Acked-by: Thierry Reding <treding at nvidia.com> > > On a side-note, I was checking for what we do for gk20a, but it seems > like we don't have MODULE_FIRMWARE() entries for Tegra124. How do we > make sure that firmware is automatically pulled into initramfs on the > Tegra124 devices?The MODULE_FIRMWARE entries related to gtk20a are located in drivers/gpu/drm/nouveau/nouveau_platform.c This file is only built when using ARCH_TEGRA. I'm not aware that nouveau can build a gk20a only driver, so moving theses entries to a gk20a specific file will have the same effect at this time. Thx for the review. -- - Nicolas (kwizart)
Apparently Analagous Threads
- [PATCH] drm: nouveau: Enable gp20b/gp10b firmware tag when relevant
- [PATCH] drm: nouveau: Enable gp20b/gp10b firmware tag when relevant
- [GIT,PULL] Signed firmware for NVIDIA Maxwell 2 GPUs
- [PATCH 1/2] nouveau: arm: Add MODULE_FIRMWARE for gk20a
- [PATCH v3 0/9] drm/nouveau: Various fixes for GP10B