From patchwork Fri Jan 21 14:24:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 15290 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 7AD43BF415 for ; Fri, 21 Jan 2022 14:24:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D025B609A0; Fri, 21 Jan 2022 15:24:25 +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="WEaaP8Lo"; 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 A000E6017A for ; Fri, 21 Jan 2022 15:24:24 +0100 (CET) Received: from Monstersaurus.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1A85925B; Fri, 21 Jan 2022 15:24:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1642775064; bh=STkn45CSRCGm1RUGKqp72hNilvqTn7/Y15MkFaiPgWk=; h=From:To:Cc:Subject:Date:From; b=WEaaP8Lo7x/pixSicYGKhlIcEkBG34mKpE0N13z+W60jMwtOLOnVpgR6t2XM83T/f v0iwCke4AWsAkr5JmB5TG3pOoDJLbppD8PAY7Y5PO84jVQLNR27AwmO6RC+kZcvzVr 13nkw1RefOZdt68MhFnGomzGGXe5bj8n+hF+3kgw= From: Kieran Bingham To: libcamera devel Date: Fri, 21 Jan 2022 14:24:18 +0000 Message-Id: <20220121142420.3531497-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 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 | 6 ++++++ src/libcamera/camera.cpp | 13 ++++++++++--- src/libcamera/pipeline_handler.cpp | 19 ++++++++++++++++--- test/signal.cpp | 8 ++------ 5 files changed, 35 insertions(+), 12 deletions(-)