From patchwork Sat Jul 4 00:52:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 8611 X-Patchwork-Delegate: laurent.pinchart@ideasonboard.com 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 905CDC2E69 for ; Sat, 4 Jul 2020 00:52:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 38E2860DC0; Sat, 4 Jul 2020 02:52:43 +0200 (CEST) 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="ESxXZUR6"; 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 A9F6460CAE for ; Sat, 4 Jul 2020 02:52:39 +0200 (CEST) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 36D2B29E; Sat, 4 Jul 2020 02:52:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1593823959; bh=cTovLdMVwGYNRuXjbNnWeuW8EJtG+I2TzsX1lrbb+mY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ESxXZUR6cn9M6W5bWLrTk2gZqs5uwQ6jFHfWeJGY20STGVleus6IW7+K3JUY2FPVZ wm5URMbJOzzLDduC61sGH6ddxkbub9VGEwy33j+BWgTtXumIwUjbjlZiWRHUc9w8LO eUMQPsJcneWm1YyCIVlCbrYFkz/9NeEranDo69NE= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sat, 4 Jul 2020 03:52:22 +0300 Message-Id: <20200704005227.21782-8-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200704005227.21782-1-laurent.pinchart@ideasonboard.com> References: <20200704005227.21782-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 07/12] libcamera: pipeline: raspberrypi: Don't call handleState() in stop 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" The handleState() function is a no-op when the state is State::Stopped. Don't call it in that case, which simplifies the caller. Signed-off-by: Laurent Pinchart --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index a05fc68b98fa..74bee6895dcd 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -1188,7 +1188,7 @@ void RPiCameraData::queueFrameAction(unsigned int frame, const IPAOperationData ControlList controls = action.controls[0]; if (!staggeredCtrl_.set(controls)) LOG(RPI, Error) << "V4L2 staggered set failed"; - goto done; + return; } case RPI_IPA_ACTION_SET_SENSOR_CONFIG: { @@ -1206,18 +1206,18 @@ void RPiCameraData::queueFrameAction(unsigned int frame, const IPAOperationData /* Set the sensor orientation here as well. */ ControlList controls = action.controls[0]; unicam_[Unicam::Image].dev()->setControls(&controls); - goto done; + return; } case RPI_IPA_ACTION_V4L2_SET_ISP: { ControlList controls = action.controls[0]; isp_[Isp::Input].dev()->setControls(&controls); - goto done; + return; } } if (state_ == State::Stopped) - goto done; + return; /* * The following actions must not be handled when the pipeline handler @@ -1261,7 +1261,6 @@ void RPiCameraData::queueFrameAction(unsigned int frame, const IPAOperationData break; } -done: handleState(); }