[Nouveau] [PATCH 1/2] nouveau: arm: Add MODULE_FIRMWARE for gk20a

Ben Skeggs skeggsb at gmail.com
Fri Sep 18 11:17:33 PDT 2015


On 19 September 2015 at 01:52, Alexandre Courbot <gnurou at gmail.com> wrote:
> On Wed, Sep 9, 2015 at 11:04 PM, Nicolas Chauvet <kwizart at gmail.com> wrote:
>> 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.
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.

>
>>
>> Signed-off-by: Nicolas Chauvet <kwizart at gmail.com>
>> ---
>>  drivers/gpu/drm/nouveau/nouveau_drm.c | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
>> index ccefb64..862c225 100644
>> --- a/drivers/gpu/drm/nouveau/nouveau_drm.c
>> +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
>> @@ -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
>> --
>> 2.4.3
>>
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau


More information about the Nouveau mailing list