From patchwork Mon Jul 21 12:01:26 2025 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: 23892 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 2406DC3237 for ; Mon, 21 Jul 2025 12:01:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2E62568FE5; Mon, 21 Jul 2025 14:01:36 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="stSl7sGd"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 54B5F68FB1 for ; Mon, 21 Jul 2025 14:01:34 +0200 (CEST) Received: from pb-laptop.local (185.221.140.39.nat.pool.zt.hu [185.221.140.39]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CCB8311EB for ; Mon, 21 Jul 2025 14:00:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1753099255; bh=fd05x34Zs3cMSv0tnVtYt4WWAjUpAg4r2JFeWU6hGmo=; h=From:To:Subject:Date:From; b=stSl7sGd9cEKI4HIgeCzN8ZGGJREBXVpVUqHQvreKaxRvnWabcfoXo9l92OO0Oi0A Yv3AKUYpja9TqyBaG/W16ltujJiemEmzS7VLnsc3QMJScerCAAUr/MInOYnTWKSQpI FKYGKbwWVXoVFgGIc65tq8cNygRLSVj0tuuqVJ7I= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [PATCH v1] libcamera: camera: Do not call `generateConfiguration()` synchronously Date: Mon, 21 Jul 2025 14:01:26 +0200 Message-ID: <20250721120126.1563367-1-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.50.1 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" Most pipeline handler methods are dispatched in the internal `CameraManager` thread. `PipelineHandler::generateConfiguration()` was called directly, however, which likely goes against the expectations, so call it on the internal thread. This could not be done before 14618cdd0c80a4 ("libcamera: base: bound_method: Move return value") because the function returns `std::unique_ptr`, and that type cannot be copied. Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham --- src/libcamera/camera.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 5efeadd53..423c5f3aa 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -1206,7 +1206,8 @@ std::unique_ptr Camera::generateConfiguration(Span config = - d->pipe_->generateConfiguration(this, roles); + d->pipe_->invokeMethod(&PipelineHandler::generateConfiguration, + ConnectionTypeBlocking, this, roles); if (!config) { LOG(Camera, Debug) << "Pipeline handler failed to generate configuration";