Skip to contentSkip to conversation

staging: media: ipu3-imgu: Request specific firmware binary

PATCH In review Sakari Ailus 2 participants 3 messages Apr 13, 2022 – Apr 20, 2022

Subsystems (3)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

PATCH 1/1 staging: media: ipu3-imgu: Request specific firmware binary

Primarily request a specific revision of the IPU3 firmware that the driver is known to work with, irci_irci_ecr-master_20161208_0213_20170112_1500.bin. Some distros only ship this while others provide a symlink called ipu3-fw.bin, which the driver only requested previously.

---
 drivers/staging/media/ipu3/ipu3-css-fw.c | 4 +++-
 drivers/staging/media/ipu3/ipu3-css-fw.h | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
drivers/staging/media/ipu3/ipu3-css-fw.c +3 -1
index 981693eed8155..2b659b0ccca14 100644
@@ -117,7 +117,9 @@ int imgu_css_fw_init(struct imgu_css *css)
 	unsigned int i, j, binary_nr;
 	int r;
 
-	r = request_firmware(&css->fw, IMGU_FW_NAME, css->dev);
+	r = request_firmware(&css->fw, IMGU_FW_NAME_20161208, css->dev);
+	if (r == -ENOENT)
+		r = request_firmware(&css->fw, IMGU_FW_NAME, css->dev);
 	if (r)
 		return r;
 
drivers/staging/media/ipu3/ipu3-css-fw.h +3 -1
index c0bc57fd678a7..f9403da757851 100644
@@ -6,7 +6,9 @@
 
 /******************* Firmware file definitions *******************/
 
-#define IMGU_FW_NAME			"intel/ipu3-fw.bin"
+#define IMGU_FW_NAME		"intel/ipu3-fw.bin"
+#define IMGU_FW_NAME_20161208	\
+	"intel/irci_irci_ecr-master_20161208_0213_20170112_1500.bin"
 
 typedef u32 imgu_fw_ptr;
 
Signature · 1 line
2.30.2
#1 lore raw

Hi Sakari,

Thank you for the patch.

Quoted 5 lines · Sakari Ailus

Primarily request a specific revision of the IPU3 firmware that the driver is known to work with, irci_irci_ecr-master_20161208_0213_20170112_1500.bin. Some distros only ship this while others provide a symlink called ipu3-fw.bin, which the driver only requested previously.

Are there distros that ship ipu3-fw.bin but not irci_irci_ecr-master_20161208_0213_20170112_1500.bin ? If not, w could avoid the fallback to IMGU_FW_NAME.

Quoted 39 lines
---
 drivers/staging/media/ipu3/ipu3-css-fw.c | 4 +++-
 drivers/staging/media/ipu3/ipu3-css-fw.h | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
drivers/staging/media/ipu3/ipu3-css-fw.c +3 -1
index 981693eed8155..2b659b0ccca14 100644
@@ -117,7 +117,9 @@ int imgu_css_fw_init(struct imgu_css *css)
 	unsigned int i, j, binary_nr;
 	int r;
 
-	r = request_firmware(&css->fw, IMGU_FW_NAME, css->dev);
+	r = request_firmware(&css->fw, IMGU_FW_NAME_20161208, css->dev);
+	if (r == -ENOENT)
+		r = request_firmware(&css->fw, IMGU_FW_NAME, css->dev);
 	if (r)
 		return r;
 
drivers/staging/media/ipu3/ipu3-css-fw.h +3 -1
index c0bc57fd678a7..f9403da757851 100644
@@ -6,7 +6,9 @@
 
 /******************* Firmware file definitions *******************/
 
-#define IMGU_FW_NAME			"intel/ipu3-fw.bin"
+#define IMGU_FW_NAME		"intel/ipu3-fw.bin"
+#define IMGU_FW_NAME_20161208	\
+	"intel/irci_irci_ecr-master_20161208_0213_20170112_1500.bin"
 
 typedef u32 imgu_fw_ptr;
 
Signature · 1 line
2.30.2
Signature · 3 lines
Regards,

Laurent Pinchart
author maintainer
#2 lore raw
Quoted 11 lines · Laurent Pinchart

Hi Sakari,

Thank you for the patch.

Quoted 5 lines · Sakari Ailus

Primarily request a specific revision of the IPU3 firmware that the driver is known to work with, irci_irci_ecr-master_20161208_0213_20170112_1500.bin. Some distros only ship this while others provide a symlink called ipu3-fw.bin, which the driver only requested previously.

Quoted 3 lines

Are there distros that ship ipu3-fw.bin but not irci_irci_ecr-master_20161208_0213_20170112_1500.bin ? If not, w could avoid the fallback to IMGU_FW_NAME.

At least some systems will break if I remove the old name altogether. Some instructions (for MS Surface AFAIR) only include the shorter symlink name.

Signature · 1 line
Sakari Ailus