Skip to contentSkip to conversation

IPU6 fixes following multi-stream support

PATCH In review Sakari Ailus 2 participants 4 messages Sep 30

Subsystems (2)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

v2 cover IPU6 fixes following multi-stream support

Hi all,

There's a small but important fix for the ipu6 driver's ipu7 support -- on ipu7 streaming works only once, and apparently this is because the ISYS needs a power reset between streaming instances. The patch addresses detecting this, which got broken in the multi-stream support set.

The second patch adds a warning on needing a reset.

Addressing why the reset is needed is out of scope of this set.

since v1:

- Just print the message when setting need_reset to true.

Sakari Ailus (2):
media: ipu6: Reset need_reset in ISYS suspend
media: ipu6: Warn if the active list isn't empty when returning
buffers

 drivers/media/pci/intel/ipu6/ipu6-isys-queue.c | 2 ++
 drivers/media/pci/intel/ipu6/ipu6-isys.c       | 4 ++++
 2 files changed, 6 insertions(+)

base-commit: 58348f64125e9a3e44d3abb275ca7f4e6c9641e5

Signature · 1 line
2.47.3
author maintainer
#1 lore raw

PATCH v2 1/2 media: ipu6: Reset need_reset in ISYS suspend

The need_reset field in struct ipu6_isys tells whether the device needs a power-on reset. Resetting the field was removed unintentionally in commit 70e3fac3ec78 ("media: ipu6: Move firmware init/cleanup to RPM callbacks").

Add it back.

Fixes 70e3fac3ec78 ("media: ipu6: Move firmware init/cleanup to RPM callbacks")
---
 drivers/media/pci/intel/ipu6/ipu6-isys.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/media/pci/intel/ipu6/ipu6-isys.c +4 -0
index 60f5f9ea2910..74bb48c1f814 100644
@@ -826,6 +826,10 @@ static int isys_runtime_pm_suspend(struct device *dev)
 		ret = -EIO;
 	}
 
+	mutex_lock(&isys->mutex);
+	isys->need_reset = false;
+	mutex_unlock(&isys->mutex);
+
 	isys->phy_termcal_val = 0;
 	cpu_latency_qos_update_request(&isys->pm_qos, PM_QOS_DEFAULT_VALUE);
 
Signature · 1 line
2.47.3
author maintainer
#2 lore raw

PATCH v2 2/2 media: ipu6: Warn if the active list isn't empty when returning buffers

In reply to Sakari Ailus

The ISYS needs a reset when the active buffer list isn't empty. Warn about this.

---
 drivers/media/pci/intel/ipu6/ipu6-isys-queue.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/pci/intel/ipu6/ipu6-isys-queue.c +2 -0
index 2608e3b91acb..23d00e1f89e8 100644
@@ -467,6 +467,8 @@ static void return_buffers(struct ipu6_isys_queue *aq,
 		mutex_lock(&av->isys->mutex);
 		av->isys->need_reset = true;
 		mutex_unlock(&av->isys->mutex);
+		dev_warn(&av->isys->adev->auxdev.dev,
+			 "buffer list not empty, needs isys reset\n");
 	}
 }
 
Signature · 1 line
2.47.3
Reviewed-by on the v2 series
#3 lore raw
In reply to Sakari Ailus
Quoted 20 lines · Sakari Ailus

Hi all,

There's a small but important fix for the ipu6 driver's ipu7 support -- on ipu7 streaming works only once, and apparently this is because the ISYS needs a power reset between streaming instances. The patch addresses detecting this, which got broken in the multi-stream support set.

The second patch adds a warning on needing a reset.

Addressing why the reset is needed is out of scope of this set.

since v1:

- Just print the message when setting need_reset to true.

Sakari Ailus (2):
media: ipu6: Reset need_reset in ISYS suspend
media: ipu6: Warn if the active list isn't empty when returning
buffers

Quoted 9 lines
 drivers/media/pci/intel/ipu6/ipu6-isys-queue.c | 2 ++
 drivers/media/pci/intel/ipu6/ipu6-isys.c       | 4 ++++
 2 files changed, 6 insertions(+)

base-commit: 58348f64125e9a3e44d3abb275ca7f4e6c9641e5

Signature · 1 line
2.47.3