Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/linux-firmware: Add Arm mali CSF firmwares
@ 2024-06-28 12:17 Andy Yan
  2024-07-12  7:20 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Yan @ 2024-06-28 12:17 UTC (permalink / raw)
  To: buildroot; +Cc: Andy Yan

Arm Mali GPUs that belong to the 10th generation of the
hardware architecture need a binary firmware to implement
the full specification.

For the panthor kernel driver to be able to execute jobs on the
GPU it needs this firmware.

Signed-off-by: Andy Yan <andyshrk@163.com>
---
 package/linux-firmware/Config.in         | 9 +++++++++
 package/linux-firmware/linux-firmware.mk | 5 +++++
 2 files changed, 14 insertions(+)

diff --git a/package/linux-firmware/Config.in b/package/linux-firmware/Config.in
index fa08b342f1..acea16fb16 100644
--- a/package/linux-firmware/Config.in
+++ b/package/linux-firmware/Config.in
@@ -681,4 +681,13 @@ config BR2_PACKAGE_LINUX_FIRMWARE_INTEL_ATOMISP
 
 endmenu
 
+menu "GPU Firmware"
+
+config BR2_PACKAGE_LINUX_FIRMWARE_ARM_MALI_CSF
+	bool "Arm Mali CSF firmware"
+	help
+	  Firmware files for Arm Mali 10th generation GPU
+          needed by the linux panthor kernel driver.
+endmenu
+
 endif
diff --git a/package/linux-firmware/linux-firmware.mk b/package/linux-firmware/linux-firmware.mk
index 13dbc6d98c..6a1b99f438 100644
--- a/package/linux-firmware/linux-firmware.mk
+++ b/package/linux-firmware/linux-firmware.mk
@@ -883,6 +883,11 @@ LINUX_FIRMWARE_FILES += intel/ipu/shisp_2401a0_v21.bin
 LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENSE.ivsc
 endif
 
+ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_ARM_MALI_CSF),y)
+LINUX_FIRMWARE_DIRS += arm
+LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.mali_csffw
+endif
+
 ifneq ($(LINUX_FIRMWARE_FILES)$(LINUX_FIRMWARE_DIRS),)
 
 define LINUX_FIRMWARE_BUILD_CMDS
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] package/linux-firmware: Add Arm mali CSF firmwares
  2024-06-28 12:17 [Buildroot] [PATCH] package/linux-firmware: Add Arm mali CSF firmwares Andy Yan
@ 2024-07-12  7:20 ` Thomas Petazzoni via buildroot
  2024-07-16  3:24   ` Andy Yan
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-12  7:20 UTC (permalink / raw)
  To: Andy Yan; +Cc: buildroot

Hello Andy,

Thanks for your patch, I applied it after adjusting some small things.
See below.

On Fri, 28 Jun 2024 20:17:40 +0800
Andy Yan <andyshrk@163.com> wrote:

> +menu "GPU Firmware"
> +
> +config BR2_PACKAGE_LINUX_FIRMWARE_ARM_MALI_CSF
> +	bool "Arm Mali CSF firmware"
> +	help
> +	  Firmware files for Arm Mali 10th generation GPU
> +          needed by the linux panthor kernel driver.

This last line was indented with spaces instead of a tab. This was
pointed out by "make check-package":

WARNING: package/linux-firmware/Config.in:700: help text: <tab><2 spaces><62 chars> (https://nightly.buildroot.org/#writing-rules-config-in)

> diff --git a/package/linux-firmware/linux-firmware.mk b/package/linux-firmware/linux-firmware.mk
> index 13dbc6d98c..6a1b99f438 100644
> --- a/package/linux-firmware/linux-firmware.mk
> +++ b/package/linux-firmware/linux-firmware.mk
> @@ -883,6 +883,11 @@ LINUX_FIRMWARE_FILES += intel/ipu/shisp_2401a0_v21.bin
>  LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENSE.ivsc
>  endif
>  
> +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_ARM_MALI_CSF),y)
> +LINUX_FIRMWARE_DIRS += arm

I wasn't a big fan of including the full arm/ directory, because while
it for now only contains this GPU firmware, it might contain other
things in the future. Since the panthor driver loads this:

        snprintf(fw_path, sizeof(fw_path), "arm/mali/arch%d.%d/%s",
                 (u32)GPU_ARCH_MAJOR(ptdev->gpu_info.gpu_id),
                 (u32)GPU_ARCH_MINOR(ptdev->gpu_info.gpu_id),
                 CSF_FW_NAME);

I changed linux-firmware.mk to this:

LINUX_FIRMWARE_FILES += arm/mali/arch*/mali_csffw.bin

so that it only installs the CSF firmware.

Applied with those changes. Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] package/linux-firmware: Add Arm mali CSF firmwares
  2024-07-12  7:20 ` Thomas Petazzoni via buildroot
@ 2024-07-16  3:24   ` Andy Yan
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Yan @ 2024-07-16  3:24 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot

Hello Thomas,
That's so kind, thanks.

At 2024-07-12 15:20:41, "Thomas Petazzoni via buildroot" <buildroot@buildroot.org> wrote:
>Hello Andy,
>
>Thanks for your patch, I applied it after adjusting some small things.
>See below.
>
>On Fri, 28 Jun 2024 20:17:40 +0800
>Andy Yan <andyshrk@163.com> wrote:
>
>> +menu "GPU Firmware"
>> +
>> +config BR2_PACKAGE_LINUX_FIRMWARE_ARM_MALI_CSF
>> +	bool "Arm Mali CSF firmware"
>> +	help
>> +	  Firmware files for Arm Mali 10th generation GPU
>> +          needed by the linux panthor kernel driver.
>
>This last line was indented with spaces instead of a tab. This was
>pointed out by "make check-package":
>
>WARNING: package/linux-firmware/Config.in:700: help text: <tab><2 spaces><62 chars> (https://nightly.buildroot.org/#writing-rules-config-in)
>
>> diff --git a/package/linux-firmware/linux-firmware.mk b/package/linux-firmware/linux-firmware.mk
>> index 13dbc6d98c..6a1b99f438 100644
>> --- a/package/linux-firmware/linux-firmware.mk
>> +++ b/package/linux-firmware/linux-firmware.mk
>> @@ -883,6 +883,11 @@ LINUX_FIRMWARE_FILES += intel/ipu/shisp_2401a0_v21.bin
>>  LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENSE.ivsc
>>  endif
>>  
>> +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_ARM_MALI_CSF),y)
>> +LINUX_FIRMWARE_DIRS += arm
>
>I wasn't a big fan of including the full arm/ directory, because while
>it for now only contains this GPU firmware, it might contain other
>things in the future. Since the panthor driver loads this:
>
>        snprintf(fw_path, sizeof(fw_path), "arm/mali/arch%d.%d/%s",
>                 (u32)GPU_ARCH_MAJOR(ptdev->gpu_info.gpu_id),
>                 (u32)GPU_ARCH_MINOR(ptdev->gpu_info.gpu_id),
>                 CSF_FW_NAME);
>
>I changed linux-firmware.mk to this:
>
>LINUX_FIRMWARE_FILES += arm/mali/arch*/mali_csffw.bin
>
>so that it only installs the CSF firmware.
>
>Applied with those changes. Thanks!
>
>Thomas
>-- 
>Thomas Petazzoni, co-owner and CEO, Bootlin
>Embedded Linux and Kernel engineering and training
>https://bootlin.com
>_______________________________________________
>buildroot mailing list
>buildroot@buildroot.org
>https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-16  3:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-28 12:17 [Buildroot] [PATCH] package/linux-firmware: Add Arm mali CSF firmwares Andy Yan
2024-07-12  7:20 ` Thomas Petazzoni via buildroot
2024-07-16  3:24   ` Andy Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox