From patchwork Fri May 9 12:57:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Sven_P=C3=BCschel?= X-Patchwork-Id: 23350 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 6C468C3200 for ; Fri, 9 May 2025 12:58:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6041B68B45; Fri, 9 May 2025 14:58:10 +0200 (CEST) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0C1AF68B25 for ; Fri, 9 May 2025 14:58:08 +0200 (CEST) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=peter.fritz.box) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1uDNIm-0006Xi-Dj; Fri, 09 May 2025 14:58:08 +0200 From: =?utf-8?q?Sven_P=C3=BCschel?= To: libcamera-devel@lists.libcamera.org Cc: =?utf-8?q?Sven_P=C3=BCschel?= , =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH] libcamera: v4l2_videodevice: Log buffer count on error Date: Fri, 9 May 2025 14:57:46 +0200 Message-ID: <20250509125746.49898-1-s.pueschel@pengutronix.de> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: s.pueschel@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: libcamera-devel@lists.libcamera.org X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Log the actual and requested buffer count in the v4l2 error, when not the requested buffer count could was allocated by V4L2. Signed-off-by: Sven Püschel Reviewed-by: Barnabás Pőcze Reviewed-by: Laurent Pinchart --- Extracted from a [1], as it is independent of it. [1] https://lists.libcamera.org/pipermail/libcamera-devel/2025-April/050024.html --- src/libcamera/v4l2_videodevice.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index f5b3fa09..d6f8c3cd 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -1326,7 +1326,8 @@ int V4L2VideoDevice::requestBuffers(unsigned int count, if (rb.count < count) { LOG(V4L2, Error) - << "Not enough buffers provided by V4L2VideoDevice"; + << "Not enough buffers provided by V4L2VideoDevice. Wanted: " + << count << ", got: " << rb.count; requestBuffers(0, memoryType); return -ENOMEM; }