Skip to contentSkip to conversation

media: staging: ipu3-imgu: Update firmware path

PATCH In review Sakari Ailus 2 participants 3 messages Apr 11, 2024

Subsystems (3)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

PATCH 1/1 media: staging: ipu3-imgu: Update firmware path

Use the current firmware path in linux-firmware repository. Check the older paths still in order to avoid causing issues to the users.

---
 drivers/staging/media/ipu3/ipu3-css-fw.c | 4 +++-
 drivers/staging/media/ipu3/ipu3-css-fw.h | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/staging/media/ipu3/ipu3-css-fw.c +3 -1
index 2b659b0ccca1..37482b626c3c 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_20161208, css->dev);
+	r = request_firmware(&css->fw, IMGU_FW_NAME_IPU_20161208, css->dev);
+	if (r == -ENOENT)
+		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)
drivers/staging/media/ipu3/ipu3-css-fw.h +2 -0
index f9403da75785..c956aa21df25 100644
@@ -9,6 +9,8 @@
 #define IMGU_FW_NAME		"intel/ipu3-fw.bin"
 #define IMGU_FW_NAME_20161208	\
 	"intel/irci_irci_ecr-master_20161208_0213_20170112_1500.bin"
+#define IMGU_FW_NAME_IPU_20161208	\
+	"intel/ipu/irci_irci_ecr-master_20161208_0213_20170112_1500.bin"
 
 typedef u32 imgu_fw_ptr;
 
Signature · 1 line
2.39.2
#1 lore raw

Sakari,

Quoted 2 lines · Sakari Ailus

Use the current firmware path in linux-firmware repository. Check the older paths still in order to avoid causing issues to the users.

We also meet similiar issues for IPU6(github driver), I am wondering as the WHENCE file create link and do we still need such patch for IPU6?

Quoted 36 lines
---
 drivers/staging/media/ipu3/ipu3-css-fw.c | 4 +++-
 drivers/staging/media/ipu3/ipu3-css-fw.h | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/staging/media/ipu3/ipu3-css-fw.c +3 -1
index 2b659b0ccca1..37482b626c3c 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_20161208, css->dev);
+	r = request_firmware(&css->fw, IMGU_FW_NAME_IPU_20161208, css->dev);
+	if (r == -ENOENT)
+		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)
drivers/staging/media/ipu3/ipu3-css-fw.h +2 -0
index f9403da75785..c956aa21df25 100644
@@ -9,6 +9,8 @@
 #define IMGU_FW_NAME		"intel/ipu3-fw.bin"
 #define IMGU_FW_NAME_20161208	\
 	"intel/irci_irci_ecr-master_20161208_0213_20170112_1500.bin"
+#define IMGU_FW_NAME_IPU_20161208	\
+	"intel/ipu/irci_irci_ecr-master_20161208_0213_20170112_1500.bin"
 
 typedef u32 imgu_fw_ptr;
 
Signature · 2 lines
Best regards,
Bingbu Cao
author maintainer
#2 lore raw

Hi Bingbu,

Quoted 8 lines · Bingbu Cao

Sakari,

Quoted 2 lines · Sakari Ailus

Use the current firmware path in linux-firmware repository. Check the older paths still in order to avoid causing issues to the users.

We also meet similiar issues for IPU6(github driver), I am wondering as the WHENCE file create link and do we still need such patch for IPU6?

Good question. This was still never found in the upstream Linux kernel.

I don't have a strong opinion about it though. Something like that was done to the ipu3-cio2 driver, too. So perhaps we could just take Hao Yao's patch and get it to linux-firmware (with a bit more elaborate commit message)?

Quoted 38 lines
Quoted 37 lines
---
 drivers/staging/media/ipu3/ipu3-css-fw.c | 4 +++-
 drivers/staging/media/ipu3/ipu3-css-fw.h | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/staging/media/ipu3/ipu3-css-fw.c +3 -1
index 2b659b0ccca1..37482b626c3c 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_20161208, css->dev);
+	r = request_firmware(&css->fw, IMGU_FW_NAME_IPU_20161208, css->dev);
+	if (r == -ENOENT)
+		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)
drivers/staging/media/ipu3/ipu3-css-fw.h +2 -0
index f9403da75785..c956aa21df25 100644
@@ -9,6 +9,8 @@
 #define IMGU_FW_NAME		"intel/ipu3-fw.bin"
 #define IMGU_FW_NAME_20161208	\
 	"intel/irci_irci_ecr-master_20161208_0213_20170112_1500.bin"
+#define IMGU_FW_NAME_IPU_20161208	\
+	"intel/ipu/irci_irci_ecr-master_20161208_0213_20170112_1500.bin"
 
 typedef u32 imgu_fw_ptr;
 
Signature · 3 lines
Regards,

Sakari Ailus