public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] accel/ivpu: Add missing MODULE_FIRMWARE metadata
@ 2024-07-09  0:25 Alexander F. Lent
  2024-07-09 10:10 ` Jacek Lawrynowicz
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander F. Lent @ 2024-07-09  0:25 UTC (permalink / raw)
  To: Alexander F. Lent, Jacek Lawrynowicz, Stanislaw Gruszka,
	Oded Gabbay, Jeffrey Hugo, Daniel Vetter, Andrzej Kacprowski,
	Krystian Pradzynski
  Cc: dri-devel, linux-kernel

Modules that load firmware from various paths at runtime must declare
those paths at compile time, via the MODULE_FIRMWARE macro, so that the
firmware paths are included in the module's metadata.

The accel/ivpu driver loads firmware but lacks this metadata,
preventing dracut from correctly locating firmware files. Fix it.

Fixes: 9ab43e95f922 ("accel/ivpu: Switch to generation based FW names")
Fixes: 02d5b0aacd05 ("accel/ivpu: Implement firmware parsing and booting")
Signed-off-by: Alexander F. Lent <lx@xanderlent.com>
---
Hi Jacek,

Thank you for the review. I've updated the patch based on your recommendations.
Please let me know what you think.
---
Changes in v2:
- Only annotate the module with the production firmware paths, per review.
- Drop macros for de-duping firmware fileames, just use string literals, per review.
- Link to v1: https://lore.kernel.org/r/20240705-fix-ivpu-firmware-metadata-v1-1-704b73852d92@xanderlent.com
---
 drivers/accel/ivpu/ivpu_fw.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/accel/ivpu/ivpu_fw.c b/drivers/accel/ivpu/ivpu_fw.c
index 1457300828bf..38125cdc8510 100644
--- a/drivers/accel/ivpu/ivpu_fw.c
+++ b/drivers/accel/ivpu/ivpu_fw.c
@@ -58,6 +58,12 @@ static struct {
 	{ IVPU_HW_40XX, "intel/vpu/vpu_40xx_v0.0.bin" },
 };
 
+/* Add module metadata for the production firmware paths.
+ * This needs to be kept in sync with fw_names above.
+ */
+MODULE_FIRMWARE("intel/vpu/vpu_37xx_v0.0.bin");
+MODULE_FIRMWARE("intel/vpu/vpu_37xx_v0.0.bin");
+
 static int ivpu_fw_request(struct ivpu_device *vdev)
 {
 	int ret = -ENOENT;

---
base-commit: 22a40d14b572deb80c0648557f4bd502d7e83826
change-id: 20240704-fix-ivpu-firmware-metadata-3d02bd60768d

Best regards,
-- 
Alexander F. Lent <lx@xanderlent.com>


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

* Re: [PATCH v2] accel/ivpu: Add missing MODULE_FIRMWARE metadata
  2024-07-09  0:25 [PATCH v2] accel/ivpu: Add missing MODULE_FIRMWARE metadata Alexander F. Lent
@ 2024-07-09 10:10 ` Jacek Lawrynowicz
  0 siblings, 0 replies; 2+ messages in thread
From: Jacek Lawrynowicz @ 2024-07-09 10:10 UTC (permalink / raw)
  To: Alexander F. Lent, Stanislaw Gruszka, Oded Gabbay, Jeffrey Hugo,
	Daniel Vetter, Andrzej Kacprowski, Krystian Pradzynski
  Cc: dri-devel, linux-kernel

Hi,

Just two more comments and we are good to go.

On 09.07.2024 02:25, Alexander F. Lent wrote:
> +/* Add module metadata for the production firmware paths.
> + * This needs to be kept in sync with fw_names above.
> + */
I would prefer: 
/* Production fw_names from the table above */

> +MODULE_FIRMWARE("intel/vpu/vpu_37xx_v0.0.bin");
> +MODULE_FIRMWARE("intel/vpu/vpu_37xx_v0.0.bin");
You probably meant *40xx*.

Regards,
Jacek

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

end of thread, other threads:[~2024-07-09 10:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-09  0:25 [PATCH v2] accel/ivpu: Add missing MODULE_FIRMWARE metadata Alexander F. Lent
2024-07-09 10:10 ` Jacek Lawrynowicz

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