From patchwork Thu Dec 23 02:33:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 15212 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 BAC1CBE080 for ; Thu, 23 Dec 2021 02:33:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1DC4560907; Thu, 23 Dec 2021 03:33:40 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="rACjDBqc"; 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 5F7F4605A8 for ; Thu, 23 Dec 2021 03:33:38 +0100 (CET) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E58492C5 for ; Thu, 23 Dec 2021 03:33:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1640226818; bh=1jakb9H3X4I8mZT0S8fN2iDsDbu+9uY+GLk1OjiAtVM=; h=From:To:Subject:Date:From; b=rACjDBqcswa3/vhOpzkXNtCrVuvWJl3EkzyXzhLG3hShYhY8gqAbUekr20gGcmeDM pONsLnCCNr1awrMoWHrjIUNvobLV/dmcvwouDyBKzZByFf9mhoEr/9T+rcn2hBBPhK RHblfZysqdRWv67R9+Aror+3fdHqdPXR3rEWRKoI= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Thu, 23 Dec 2021 04:33:29 +0200 Message-Id: <20211223023331.13505-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/2] libcamera: Small cleanups for pipeline handler locking 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" Hello, Those two small patches clean up the MediaDevice and PipelineHandler locking. The goal is to prepare for concurrent usage of multiple cameras exposed by the same pipeline handler (on platforms that support this), and to fix a thread-safety issue. Please see individual patches for details. Laurent Pinchart (2): libcamera: media_device: Move recursive lock handling to pipeline handler libcamera: pipeline_handler: Make lock() and unlock() thread-safe include/libcamera/internal/media_device.h | 1 - include/libcamera/internal/pipeline_handler.h | 4 ++++ src/libcamera/media_device.cpp | 14 +------------- src/libcamera/pipeline_handler.cpp | 18 +++++++++++++++++- 4 files changed, 22 insertions(+), 15 deletions(-) base-commit: 8ff5a8d548eee7c2cb14b355867debdb29e75419