Skip to contentSkip to conversation

arm: drm: tegra: Set MODULE_FIRMWARE for the VIC

PATCH Applied Nicolas Chauvet 2 participants 2 messages Jul 11, 2017 – Aug 17, 2017 1 message not in the archive

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

PATCH 1/1 arm: drm: tegra: Set MODULE_FIRMWARE for the VIC

The defines are set anyway to prevent an empty string. The test for the soc is same as nouveau for the tegra gpu firmware (see drivers/gpu/drm/nouveau/nouveau_platform.c)

Fixes 0ae797a8ba05 ("drm/tegra: Add VIC support")

v2:
- Place the defines above each chip's vic_config struct
- MODULE_FIRMWARE() at the end of the file

---
 drivers/gpu/drm/tegra/vic.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
drivers/gpu/drm/tegra/vic.c +13 -2
index cd804e404a11..819e485fde72 100644
@@ -258,12 +258,16 @@ static const struct tegra_drm_client_ops vic_ops = {
 	.submit = tegra_drm_submit,
 };
 
+#define NVIDIA_TEGRA_124_VIC_FIRMWARE "nvidia/tegra124/vic03_ucode.bin"
+
 static const struct vic_config vic_t124_config = {
-	.firmware = "nvidia/tegra124/vic03_ucode.bin",
+	.firmware = NVIDIA_TEGRA_124_VIC_FIRMWARE,
 };
 
+#define NVIDIA_TEGRA_210_VIC_FIRMWARE "nvidia/tegra210/vic04_ucode.bin"
+
 static const struct vic_config vic_t210_config = {
-	.firmware = "nvidia/tegra210/vic04_ucode.bin",
+	.firmware = NVIDIA_TEGRA_210_VIC_FIRMWARE,
 };
 
 static const struct of_device_id vic_match[] = {
@@ -394,3 +398,10 @@ struct platform_driver tegra_vic_driver = {
 	.probe = vic_probe,
 	.remove = vic_remove,
 };
+
+#if IS_ENABLED(CONFIG_ARCH_TEGRA_124_SOC)
+MODULE_FIRMWARE(NVIDIA_TEGRA_124_VIC_FIRMWARE);
+#endif
+#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
+MODULE_FIRMWARE(NVIDIA_TEGRA_210_VIC_FIRMWARE);
+#endif
Signature · 1 line
2.13.0

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

#2 lore raw
Quoted 10 lines · Nicolas Chauvet

The defines are set anyway to prevent an empty string. The test for the soc is same as nouveau for the tegra gpu firmware (see drivers/gpu/drm/nouveau/nouveau_platform.c)

Fixes 0ae797a8ba05 ("drm/tegra: Add VIC support")

v2:
- Place the defines above each chip's vic_config struct
- MODULE_FIRMWARE() at the end of the file

Quoted 5 lines
---
 drivers/gpu/drm/tegra/vic.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

Applied, thanks!

Thierry