Skip to contentSkip to conversation

nouveau: arm: Add MODULE_FIRMWARE for gk20a

PATCH In review Nicolas Chauvet 3 participants 5 messages Sep 9, 2015 – Sep 18, 2015 3 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 nouveau: arm: Add MODULE_FIRMWARE for gk20a

This patch is needed by initramfs tools to detect the required firmware files for the module.

This patch tests for NOUVEAU_PLATFORM_DRIVER and either TEGRA_124_SOC or TEGRA_132_SOC for the firmwares related to the Tegra K1 generation.

---
 drivers/gpu/drm/nouveau/nouveau_drm.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/gpu/drm/nouveau/nouveau_drm.c +11 -0
index ccefb64..862c225 100644
@@ -1111,3 +1111,14 @@ MODULE_DEVICE_TABLE(pci, nouveau_drm_pci_table);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL and additional rights");
+#if defined(CONFIG_NOUVEAU_PLATFORM_DRIVER) && \
+  (IS_ENABLED(CONFIG_ARCH_TEGRA_124_SOC) || IS_ENABLED(CONFIG_ARCH_TEGRA_132_SOC))
+MODULE_FIRMWARE("nvidia/gk20a/fecs_data.bin");
+MODULE_FIRMWARE("nvidia/gk20a/fecs_inst.bin");
+MODULE_FIRMWARE("nvidia/gk20a/gpccs_data.bin");
+MODULE_FIRMWARE("nvidia/gk20a/gpccs_inst.bin");
+MODULE_FIRMWARE("nvidia/gk20a/sw_bundle_init.bin");
+MODULE_FIRMWARE("nvidia/gk20a/sw_ctx.bin");
+MODULE_FIRMWARE("nvidia/gk20a/sw_method_init.bin");
+MODULE_FIRMWARE("nvidia/gk20a/sw_nonctx.bin");
+#endif
Signature · 6 lines
2.4.3

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): 1441807492-12125-1-git-send-email-kwizart-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw

RFC PATCH 2/2 nouveau: arm: Add MODULE_FIRMWARE for gm20b

This patch is needed by initramfs tools to detect the required firmware files for the module.

This patch tests for NOUVEAU_PLATFORM_DRIVER and TEGRA_210_SOC for the firmwares related to the Tegra X1 generation.

RFC tag is because the firmwares are still not merged into linux-firmware repository

---
 drivers/gpu/drm/nouveau/nouveau_drm.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
drivers/gpu/drm/nouveau/nouveau_drm.c +14 -0
index 862c225..36a3bc3 100644
@@ -1122,3 +1122,17 @@ MODULE_FIRMWARE("nvidia/gk20a/sw_ctx.bin");
 MODULE_FIRMWARE("nvidia/gk20a/sw_method_init.bin");
 MODULE_FIRMWARE("nvidia/gk20a/sw_nonctx.bin");
 #endif
+#if defined(CONFIG_NOUVEAU_PLATFORM_DRIVER) && IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
+MODULE_FIRMWARE("nvidia/gm20b/fecs_data.bin");
+MODULE_FIRMWARE("nvidia/gm20b/fecs_inst.bin");
+MODULE_FIRMWARE("nvidia/gm20b/gpccs_data.bin");
+MODULE_FIRMWARE("nvidia/gm20b/gpccs_inst.bin");
+MODULE_FIRMWARE("nvidia/gm20b/sw_bundle_init.bin");
+MODULE_FIRMWARE("nvidia/gm20b/sw_ctx.bin");
+MODULE_FIRMWARE("nvidia/gm20b/sw_method_init.bin");
+MODULE_FIRMWARE("nvidia/gm20b/sw_nonctx.bin");
+MODULE_FIRMWARE("nouveau/nv12b_acr_ucode");
+MODULE_FIRMWARE("nouveau/nv12b_fecs_bl");
+MODULE_FIRMWARE("nouveau/nv12b_fecs_sig");
+MODULE_FIRMWARE("nouveau/nv12b_pmu_bl");
+#endif
Signature · 6 lines
2.4.3

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
#3 lore raw
In reply to a message not in the archive
Quoted 6 lines · Nicolas Chauvet

This patch is needed by initramfs tools to detect the required firmware files for the module.

This patch tests for NOUVEAU_PLATFORM_DRIVER and either TEGRA_124_SOC or TEGRA_132_SOC for the firmwares related to the Tegra K1 generation.

I think you should send this to the Nouveau tree, especially since the kernel tree probably predates the big refactoring that Nouveau has undergone.

I also wonder whether these MODULE_FIRMWARE() statements could not be placed in a more appropriate place, like nouveau_platform.c? This would allow you to get rid of the test for CONFIG_NOUVEAU_PLATFORM_DRIVER.

Quoted 26 lines
---
 drivers/gpu/drm/nouveau/nouveau_drm.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/gpu/drm/nouveau/nouveau_drm.c +11 -1
index ccefb64..862c225 100644
@@ -1111,3 +1111,14 @@ MODULE_DEVICE_TABLE(pci, nouveau_drm_pci_table);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL and additional rights");
+#if defined(CONFIG_NOUVEAU_PLATFORM_DRIVER) && \
+  (IS_ENABLED(CONFIG_ARCH_TEGRA_124_SOC) || IS_ENABLED(CONFIG_ARCH_TEGRA_132_SOC))
+MODULE_FIRMWARE("nvidia/gk20a/fecs_data.bin");
+MODULE_FIRMWARE("nvidia/gk20a/fecs_inst.bin");
+MODULE_FIRMWARE("nvidia/gk20a/gpccs_data.bin");
+MODULE_FIRMWARE("nvidia/gk20a/gpccs_inst.bin");
+MODULE_FIRMWARE("nvidia/gk20a/sw_bundle_init.bin");
+MODULE_FIRMWARE("nvidia/gk20a/sw_ctx.bin");
+MODULE_FIRMWARE("nvidia/gk20a/sw_method_init.bin");
+MODULE_FIRMWARE("nvidia/gk20a/sw_nonctx.bin");
+#endif
--
Quoted 2 lines

2.4.3

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): CAAVeFu+L3nsQreXs5cTQF+X5AyqYxgXNDCANfunkvCk2DHsfOw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#5 lore raw
Quoted 8 lines · Alexandre Courbot
Quoted 6 lines · Nicolas Chauvet

This patch is needed by initramfs tools to detect the required firmware files for the module.

This patch tests for NOUVEAU_PLATFORM_DRIVER and either TEGRA_124_SOC or TEGRA_132_SOC for the firmwares related to the Tegra K1 generation.

Quoted 8 lines

I think you should send this to the Nouveau tree, especially since the kernel tree probably predates the big refactoring that Nouveau has undergone.

I also wonder whether these MODULE_FIRMWARE() statements could not be placed in a more appropriate place, like nouveau_platform.c? This would allow you to get rid of the test for CONFIG_NOUVEAU_PLATFORM_DRIVER.

Is there any need to be conditional at all? For dGPUs we're going to have to have them all unconditional anyway, as we have know way of knowing which GPU it's going to be used with.

Ben.

Quoted 25 lines
Quoted 25 lines
---
 drivers/gpu/drm/nouveau/nouveau_drm.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/gpu/drm/nouveau/nouveau_drm.c +10 -0
index ccefb64..862c225 100644
@@ -1111,3 +1111,14 @@ MODULE_DEVICE_TABLE(pci, nouveau_drm_pci_table);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL and additional rights");
+#if defined(CONFIG_NOUVEAU_PLATFORM_DRIVER) && \
+  (IS_ENABLED(CONFIG_ARCH_TEGRA_124_SOC) || IS_ENABLED(CONFIG_ARCH_TEGRA_132_SOC))
+MODULE_FIRMWARE("nvidia/gk20a/fecs_data.bin");
+MODULE_FIRMWARE("nvidia/gk20a/fecs_inst.bin");
+MODULE_FIRMWARE("nvidia/gk20a/gpccs_data.bin");
+MODULE_FIRMWARE("nvidia/gk20a/gpccs_inst.bin");
+MODULE_FIRMWARE("nvidia/gk20a/sw_bundle_init.bin");
+MODULE_FIRMWARE("nvidia/gk20a/sw_ctx.bin");
+MODULE_FIRMWARE("nvidia/gk20a/sw_method_init.bin");
+MODULE_FIRMWARE("nvidia/gk20a/sw_nonctx.bin");
Quoted 8 lines
Quoted 4 lines
drivers/gpu/drm/nouveau/nouveau_drm.c +1 -1
+#endif
--

2.4.3

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): CACAvsv67Z7RxOhishavM5z+hR90apN1V7s+MSjZxtNvXXoF5fw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#7 lore raw
Quoted 13 lines · Ben Skeggs
Quoted 12 lines · Alexandre Courbot
Quoted 6 lines · Nicolas Chauvet

This patch is needed by initramfs tools to detect the required firmware files for the module.

This patch tests for NOUVEAU_PLATFORM_DRIVER and either TEGRA_124_SOC or TEGRA_132_SOC for the firmwares related to the Tegra K1 generation.

I think you should send this to the Nouveau tree, especially since the kernel tree probably predates the big refactoring that Nouveau has undergone.

Quoted 7 lines
Quoted 4 lines

I also wonder whether these MODULE_FIRMWARE() statements could not be placed in a more appropriate place, like nouveau_platform.c? This would allow you to get rid of the test for CONFIG_NOUVEAU_PLATFORM_DRIVER.

Is there any need to be conditional at all? For dGPUs we're going to have to have them all unconditional anyway, as we have know way of knowing which GPU it's going to be used with.

For dGPU there is indeed probably no use to make it conditional. But do we really want to include the Tegra-specific firmwares on x86 initramsfs?
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau