Skip to contentSkip to conversation

MEI CSI fixes

PATCH New Sakari Ailus 1 participant 3 messages May 28, 2024

Subsystems (2)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

cover MEI CSI fixes

Hi folks,

These patches address issues in MEI CSI and IPU bridge integration.

I intend to submit them as fixes soon.

Sakari Ailus (2):
media: mei: csi: Put the IPU device reference
media: mei: csi: Warn less verbosely of a missing device fwnode

 drivers/media/pci/intel/ivsc/mei_csi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
2.39.2
author maintainer
#1 lore raw

PATCH 1/2 media: mei: csi: Put the IPU device reference

The mei csi's probe function obtains a reference to the IPU device but never puts that reference. Do that now.

Fixes 33116eb12c6b ("media: ivsc: csi: Use IPU bridge")
---
 drivers/media/pci/intel/ivsc/mei_csi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/pci/intel/ivsc/mei_csi.c +1 -0
index 89b582a221ab..53151d016188 100644
@@ -677,6 +677,7 @@ static int mei_csi_probe(struct mei_cl_device *cldev,
 		return -ENODEV;
 
 	ret = ipu_bridge_init(&ipu->dev, ipu_bridge_parse_ssdb);
+	put_device(&ipu->dev);
 	if (ret < 0)
 		return ret;
 	if (WARN_ON(!dev_fwnode(dev)))
Signature · 1 line
2.39.2
author maintainer
#2 lore raw

PATCH 2/2 media: mei: csi: Warn less verbosely of a missing device fwnode

In reply to Sakari Ailus

The check for having device fwnode was meant to be a sanity check but this also happens if the ACPI DSDT has graph port nodes on sensor device(s) but not on the IVSC device. Use a more meaningful warning message to tell about this.

Fixes 33116eb12c6b ("media: ivsc: csi: Use IPU bridge")
---
 drivers/media/pci/intel/ivsc/mei_csi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/media/pci/intel/ivsc/mei_csi.c +3 -1
index 53151d016188..f04a89584334 100644
@@ -680,8 +680,10 @@ static int mei_csi_probe(struct mei_cl_device *cldev,
 	put_device(&ipu->dev);
 	if (ret < 0)
 		return ret;
-	if (WARN_ON(!dev_fwnode(dev)))
+	if (!dev_fwnode(dev)) {
+		dev_err(dev, "mei-csi probed without device fwnode!\n");
 		return -ENXIO;
+	}
 
 	csi = devm_kzalloc(dev, sizeof(struct mei_csi), GFP_KERNEL);
 	if (!csi)
Signature · 1 line
2.39.2