From patchwork Tue Feb 1 12:38:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 15317 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 F0469BDCBF for ; Tue, 1 Feb 2022 12:38:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3BC22609E3; Tue, 1 Feb 2022 13:38:08 +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="XjQsdUkF"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E07B0609B9 for ; Tue, 1 Feb 2022 13:38:06 +0100 (CET) Received: from Monstersaurus.ksquared.org.uk.beta.tailscale.net (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6EED8332; Tue, 1 Feb 2022 13:38:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1643719086; bh=Sh9pg1ykN++i9faF8vsRjXENwuUdCsDqbHjNXylfVHk=; h=From:To:Cc:Subject:Date:From; b=XjQsdUkF00rsxHwl5m9mjvwgmyIynpxHWP3ldjeXpTnP7W0JbtKw1G5hV06sBVJxk X8LqEQseyEHDLAWqFi9O3rL2RY79UIfCxmoKfywKlaoGoah7r2ne9y4txfCwSG1BXA EFPAVypIy/R0weSkkwYkyPn8uPrT9ddZLYalWZxY= From: Kieran Bingham To: libcamera devel Date: Tue, 1 Feb 2022 12:38:01 +0000 Message-Id: <20220201123803.281397-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 0/2] libcamera: pipeline_handler: Register requests 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" Provide a new call on pipeline handlers allowing the Camera to register a request with the pipeline handler after it is constructed. This allows us to perform one-time operations such as connecting relevant signals on the request to the pipeline handler. Use this new call to move the prepared signal connection away from queueRequest where it was repeatedly connecting the signal, leading to bugs which exhibited excessively long shutdown times when any substantial number of frames had been processed. This is reported to have taken more than 10 minutes to close down the pipeline after a 2 hour capture run. Finally remove support for the same signal being connected to an object multiple times and add an assertion to the object class to ensure that we catch and prevent this from happening again. This underlying bug was identified from : https://github.com/raspberrypi/libcamera-apps/issues/217 And should resolve the issue there. Unlike v1 of this series which used a different assertion method, this passes CTS without any regressions. Kieran Bingham (2): libcamera: pipeline_handler: Register requests libcamera: base: object: Prevent the same signal being connected more than once include/libcamera/internal/pipeline_handler.h | 1 + src/libcamera/base/object.cpp | 12 +++++++++++ src/libcamera/base/signal.cpp | 7 ++++--- src/libcamera/camera.cpp | 13 +++++++++--- src/libcamera/pipeline_handler.cpp | 20 ++++++++++++++++--- test/signal.cpp | 17 ++++++++++------ 6 files changed, 55 insertions(+), 15 deletions(-)