From patchwork Thu Feb 18 12:48:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 11331 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 37186BD1F6 for ; Thu, 18 Feb 2021 12:48:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DE4C0689B3; Thu, 18 Feb 2021 13:48:34 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="tvAsibqV"; dkim-atps=neutral Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5911F68110 for ; Thu, 18 Feb 2021 13:48:33 +0100 (CET) Received: by mail-wr1-x434.google.com with SMTP id f7so1686965wrt.12 for ; Thu, 18 Feb 2021 04:48:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BxgoKMN/TClcFlvFt8c9k+4ExYPEZI7X8fMcpxmrXJw=; b=tvAsibqVXRDQgZcO7iB2zHvE429SQP/db8y5X/g/i8+Hr7sY+XquiRS/4LXFi1i3HZ pibpYu2CsSZQSt4/jtib2t3UpvfKbbzYzSdtb3JrkZWM3FB9WiSCy8JXQD0HMp+ZgAAz Pi1y2b2HWXV/YO69XT8T2NbfpABuhTreMPSPf1M+Yf2Ysf8FVM4Qivcol0rYzapOtZ9O WbHO+7bZ7wr1ep+h+6tP1YmBD9eGfJNcGgEuF2d06kSVDvCg9pxU97uKie1zLYsdBose skqAjD6nwvISEnJU0gaEq8fo3bMAJEmG3oSwKkCzYqK+sLaiEr5pykRbNeOOnrSfjRtz eHKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BxgoKMN/TClcFlvFt8c9k+4ExYPEZI7X8fMcpxmrXJw=; b=ikGGJJvucFFsh7myGb4DUtroZESSEZXVb6zPNu1QONAykGHZo54a7Mtz9Xeaga7YD7 /kw3ixXpGUF/FsISXsEhWy/Z5nXF1b6jefLS2evXyr6JmwjuiyKC+dIZN5jn5/cXrB9b jdzto6Bp4uk7OxTErwdhVE+p3fftR06FvdhZBBhAb7lpkJnZDEAFY26w4dKwRyvtU/dS LFLA7Nj2kqe1jGf5T+ZE1l/vB9rQDVGgCpeO3FBzTJFxr+6QS9wGo02kNcRRzc4+MOSn 9gqWZpenEfX1nOtQfr9ZxBJbgzQOQ0TjzzAniFOT4dudMRGQt0d7FulYpNBiWeVwLGf1 w07w== X-Gm-Message-State: AOAM5326oIi+16bf6U76poTr04djAGfF8lcYj1XmVd0P5t4MZuniXufU FQm/gJyK8kMQkqD6TPgcxovUi9ippvidQRrE X-Google-Smtp-Source: ABdhPJzeHhvgr2ZI0iXyAJqklT9K78KXUZsApJh8SyU94Uf74L/yS3/9F6JEv1sA65BNilcOO4Db4g== X-Received: by 2002:adf:ebcb:: with SMTP id v11mr4112543wrn.231.1613652512820; Thu, 18 Feb 2021 04:48:32 -0800 (PST) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:15:c37b:2722:9ed2:1d58]) by smtp.gmail.com with ESMTPSA id z63sm7675876wme.8.2021.02.18.04.48.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 04:48:32 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Thu, 18 Feb 2021 12:48:21 +0000 Message-Id: <20210218124824.1825418-2-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210218124824.1825418-1-naush@raspberrypi.com> References: <20210218124824.1825418-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 1/4] pipeline: ipa: raspberrypi: Fix pipeline running on in a stopped state 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" With the recent IPAInterface changes, the signal handlers statsMetadataComplete(), runISP() and embeddedComplete() would run unconditionally when called. They should only run when state != Stopped. Signed-off-by: Naushir Patuck Fixes: e201cb4f5450 ("libcamera: IPAInterface: Replace C API with the new C++-only API") Tested-by: David Plowman Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index 15aa600ed581..75d57c2a2ffd 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -1281,7 +1281,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config) void RPiCameraData::statsMetadataComplete(uint32_t bufferId, const ControlList &controls) { if (state_ == State::Stopped) - handleState(); + return; FrameBuffer *buffer = isp_[Isp::Stats].getBuffers().at(bufferId); @@ -1314,7 +1314,7 @@ void RPiCameraData::statsMetadataComplete(uint32_t bufferId, const ControlList & void RPiCameraData::runIsp(uint32_t bufferId) { if (state_ == State::Stopped) - handleState(); + return; FrameBuffer *buffer = unicam_[Unicam::Image].getBuffers().at(bufferId); @@ -1329,7 +1329,7 @@ void RPiCameraData::runIsp(uint32_t bufferId) void RPiCameraData::embeddedComplete(uint32_t bufferId) { if (state_ == State::Stopped) - handleState(); + return; FrameBuffer *buffer = unicam_[Unicam::Embedded].getBuffers().at(bufferId); handleStreamBuffer(buffer, &unicam_[Unicam::Embedded]);