Linux Media Controller development
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: Antti Laakso <antti.laakso@linux.intel.com>,
	"Sapre, Sarang" <sarang.sapre@intel.com>,
	Manik Bajpai <manik.bajpai@intel.com>,
	Divyamani Tripathi <divyamani.tripathi@intel.com>
Subject: [PATCH 2/2] media: ipu6: Warn if the active list isn't empty when returning buffers
Date: Tue, 29 Sep 2026 13:54:15 +0300	[thread overview]
Message-ID: <20260929105415.2516142-3-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20260929105415.2516142-1-sakari.ailus@linux.intel.com>

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

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 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 2608e3b91acb..c9ecda158fd1 100644
--- a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
+++ b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c
@@ -423,6 +423,7 @@ static void return_buffers(struct ipu6_isys_queue *aq,
 	struct ipu6_isys_video *av = ipu6_isys_queue_to_video(aq);
 	struct ipu6_isys_buffer *ib;
 	bool need_reset = false;
+	bool first_buf = true;
 	unsigned long flags;
 
 	spin_lock_irqsave(&aq->lock, flags);
@@ -448,6 +449,12 @@ static void return_buffers(struct ipu6_isys_queue *aq,
 	while (!list_empty(&aq->active)) {
 		struct vb2_buffer *vb;
 
+		if (first_buf) {
+			dev_warn(&av->isys->adev->auxdev.dev,
+				 "buffer list not empty, needs isys reset\n");
+			first_buf = false;
+		}
+
 		ib = list_first_entry(&aq->active, struct ipu6_isys_buffer,
 				      head);
 		vb = ipu6_isys_buffer_to_vb2_buffer(ib);
-- 
2.47.3


  parent reply	other threads:[~2026-09-29 10:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 10:54 [PATCH 0/2] IPU6 fixes following multi-stream support Sakari Ailus
2026-09-29 10:54 ` [PATCH 1/2] media: ipu6: Reset need_reset in ISYS suspend Sakari Ailus
2026-09-29 10:54 ` Sakari Ailus [this message]
2026-09-30  9:23   ` [PATCH 2/2] media: ipu6: Warn if the active list isn't empty when returning buffers Antti Laakso
2026-09-30  9:33     ` Sakari Ailus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260929105415.2516142-3-sakari.ailus@linux.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=antti.laakso@linux.intel.com \
    --cc=divyamani.tripathi@intel.com \
    --cc=linux-media@vger.kernel.org \
    --cc=manik.bajpai@intel.com \
    --cc=sarang.sapre@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox