From patchwork Thu Sep 10 16:03:09 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 28224 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 59063C3272 for ; Thu, 10 Sep 2026 16:03:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2E4D368665; Thu, 10 Sep 2026 18:03:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="nRDaThtS"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 372D768657 for ; Thu, 10 Sep 2026 18:03:16 +0200 (CEST) Received: from pb-laptop.local (185.221.140.18.nat.pool.zt.hu [185.221.140.18]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BD3295B3 for ; Thu, 10 Sep 2026 18:01:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1789056098; bh=w5a9qiqoDR6NsEdz9033xNItJUFqab0L/gS3A1P0WcA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nRDaThtSVrxtw1nDFtrEVXrHRzsw+abcxLZqjfRJvjoVs5VT6CdUQ5SXy3JcrFKsW VwjiYdWOHqBpDKE5uk6eTmnHkAZZNXGBQABtIWehkgKkzIJRFVlDC8RKdPU0Q2/SY6 LcDhuINlLhHY7H0o6GmIMW7wmwKmClKLSyvvsArg= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [PATCH v2 5/5] libcamera: v4l2_subdevice: Make log prefix similar to V4L2VideoDevice Date: Thu, 10 Sep 2026 18:03:09 +0200 Message-ID: <20260910160309.940584-5-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260910160309.940584-1-barnabas.pocze@ideasonboard.com> References: <20260910160309.940584-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 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" Make the log prefix of `V4L2Subdevice` more similar to that of `V4L2VideoDevice`. Specifically, add the path of the device and the file descriptor to the log prefix. Having the path in the log message helps debugging if the device needs to be inspected by e.g. {v4l2,media}-ctl. The file descriptor is added for consistency with `V4L2VideoDevice`. Example: DEBUG V4L2 v4l2_device.cpp:741 /dev/v4l-subdev5[19:'imx708']: Control: Exposure (0x00980911) Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham --- src/libcamera/v4l2_subdevice.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp index 511cc12e2f..fd5fb51bbf 100644 --- a/src/libcamera/v4l2_subdevice.cpp +++ b/src/libcamera/v4l2_subdevice.cpp @@ -1786,7 +1786,8 @@ V4L2Subdevice::fromEntityName(const MediaDevice *media, std::string V4L2Subdevice::logPrefix() const { - return "'" + entity_->name() + "'"; + return deviceNode() + '[' + std::to_string(fd()) + + ":'" + entity_->name() + "']"; } std::vector V4L2Subdevice::enumPadCodes(const Stream &stream)