[PATCH RFC] media: ipu6: Don't require an ISYS reset after stream stop on IPU7
From: Jake Steinman
Date: Mon Oct 12 2026 - 20:51:00 EST
On IPU7 every stream stop finds buffers on the active list in
return_buffers(), so need_reset is set and this is logged each time:
intel_ipu6_isys.isys intel_ipu6.isys.40: buffer list not empty, needs isys reset
It reproduces on Panther Lake (IPU 7.5) with a plain capture and no PSYS
involved:
v4l2-ctl -d /dev/video16 --stream-mmap --stream-count=10
The frames themselves are fine. With a single camera the flag is cleared
again right away, because the ISYS runtime suspends after the stream
stops. When something keeps the ISYS powered, such as a second sensor in
use or its PSYS child device, the flag stays set and every later open of
any capture node fails with -EIO:
intel_ipu6_isys.isys intel_ipu6.isys.40: isys power cycle required
The staging ipu7 driver has the same loop over the active list in
return_buffers() but no need_reset. The IPU7 firmware apparently does
not hand the queued buffers back on stop, so leftover buffers are the
normal case there. Skip need_reset for IPU7.
Tested on a Dell XPS 16 DA16260 with an OV08X40 and an HM1092: repeated
start and stop of both sensors, alternating, with the PSYS in use for
the OV08X40. No reset message and no failed open.
Fixes: 3c2f7033a924 ("media: ipu6: Warn if the active list isn't empty when returning buffers")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Jake Steinman <j@xxxxxxxxxxxxxxxx>
---
RFC because I am guessing at the firmware behaviour from what the staging
driver does. If the buffers are supposed to come back on stop on IPU7 as
well, then the bug is elsewhere and this only hides it. Based on
media-committers next d7e7bca71698.
This came out of retesting the HM1092 on the ipu6 driver, as you asked in
the other thread. The sensor itself works properly there: v6 plus my ACPI
patch binds on CSI-2 port 2 and streams Y10 648x368 at link frequency
180480000, and IR face authentication works on the frames. No ipu7 format
patch is needed. One thing for Ramshouriesh: v6 no longer builds on
media/next, set_fmt and get_selection need the new client_info argument.
I will send v2 of the ACPI patch with these results.
drivers/media/pci/intel/ipu6/ipu6-isys-queue.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
index 23d00e1..4a5f518 100644
--- a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
+++ b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
@@ -463,6 +463,13 @@ static void return_buffers(struct ipu6_isys_queue *aq,
spin_unlock_irqrestore(&aq->lock, flags);
+ /*
+ * On IPU7 the buffers still queued to the firmware are left on the
+ * active list by every stream stop. That is not an error there.
+ */
+ if (IS_IPU7(av->isys->adev->isp))
+ need_reset = false;
+
if (need_reset) {
mutex_lock(&av->isys->mutex);
av->isys->need_reset = true;
--
2.56.0