media: staging: ipu7: declare firmware files with MODULE_FIRMWARE
Subsystems (3)
PATCH 1/1 media: staging: ipu7: declare firmware files with MODULE_FIRMWARE
drivers/staging/media/ipu7/ipu7.h already defines the three firmware blob names the driver can request at runtime depending on the SoC generation:
IPU7_FIRMWARE_NAME "intel/ipu/ipu7_fw.bin"
IPU7P5_FIRMWARE_NAME "intel/ipu/ipu7ptl_fw.bin"
IPU8_FIRMWARE_NAME "intel/ipu/ipu8_fw.bin"but ipu7.c never declares them via MODULE_FIRMWARE(), so tools that rely on modinfo to discover firmware dependencies (most initramfs/ initrd generators, e.g. mkinitcpio, dracut) can't automatically include the right blob for this driver.
$ modinfo -k $(uname -r) intel_ipu7 | grep -iE "firmware|filename" filename: /lib/modules/7.2.2-arch1-1/kernel/drivers/staging/media/ipu7/intel-ipu7.ko.zst
No "firmware:" line is printed at all, even though the driver does load one of the three blobs above at probe time (confirmed separately via dmesg on real Lunar Lake/IPU7 hardware - "firmware cpd file:
intel/ipu/ipu7_fw.bin" - so the dependency is real, just not declared to modinfo).
This is low priority/cosmetic on distros that ship the full linux-firmware package unconditionally (as Arch does), but matters for anyone building a minimal initramfs, or packaging this driver for a distro that only pulls in firmware modinfo declares.
--- drivers/staging/media/ipu7/ipu7.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/staging/media/ipu7/ipu7.c +4 -0
@@ -2774,3 +2774,7 @@ MODULE_AUTHOR("Qingwu Zhang <[email protected]>");MODULE_AUTHOR ("Intel" );MODULE_LICENSE ("GPL" );MODULE_DESCRIPTION ("Intel ipu7 pci driver" ); + +MODULE_FIRMWARE (IPU7_FIRMWARE_NAME ); +MODULE_FIRMWARE (IPU7P5_FIRMWARE_NAME ); +MODULE_FIRMWARE (IPU8_FIRMWARE_NAME );
Signature · 1 line
2.51.0
Sakari Ailus
maintainerHi German,
Quoted 4 lines · German
drivers/staging/media/ipu7/ipu7.halready defines the three firmware blob names the driver can request at runtime depending on the SoC generation:
Quoted 8 lines
IPU7_FIRMWARE_NAME "intel/ipu/ipu7_fw.bin" IPU7P5_FIRMWARE_NAME "intel/ipu/ipu7ptl_fw.bin" IPU8_FIRMWARE_NAME "intel/ipu/ipu8_fw.bin"but
ipu7.cnever declares them viaMODULE_FIRMWARE(), so tools that rely on modinfo to discover firmware dependencies (most initramfs/ initrd generators, e.g. mkinitcpio, dracut) can't automatically include the right blob for this driver.
The patch seems fine but we're about to remove this driver in favour of the ipu6 driver. Therefore I don't think we'll need this anymore. The ipu6 driver though also appears to be also missing these.
Signature · 1 line
Sakari Ailus