From patchwork Wed May 18 17:19:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 15976 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 73FF0C3256 for ; Wed, 18 May 2022 17:19:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CC8F765665; Wed, 18 May 2022 19:19:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1652894371; bh=JNaqr7MSYw0dzUfV1uFphmmHof9QCzSh+0d9Y9+SsPM=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=IyfekSDhxq8QZ+hNe2+Ewjc7kApCAZpuoZx79fs8wcyfUmNJFr0ISkx7a+/VGQiTp uvQxlSK9N7g1Cw3SdL9D3n5BVzp7PnZ9Kod24W7oWgUdrPizvrHIAGpgvU2ZdNN/sO 1FNmIsJ52wuMBHHnjm4Fs/guNLejHnDCRQkYG4iO3CZflKkIzTiPT4+NiWgdqvmYTQ 0Neq+cQ0qZG8xzJ6bAeazdONm+OF9rOeclQCIxPlzgkph9HOiPi9MHl1gX91tMDQs6 kII/0h2gxHEYYV9Dp/z1BExLvwP5/5FcrHj28TWdfPqtPYB6DMWIQiDyNDKU2pmKWJ XNcaZ3jTpmSmA== Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 30FE265656 for ; Wed, 18 May 2022 19:19:30 +0200 (CEST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id 85757240004; Wed, 18 May 2022 17:19:29 +0000 (UTC) To: libcamera-devel@lists.libcamera.org Date: Wed, 18 May 2022 19:19:18 +0200 Message-Id: <20220518171921.244168-3-jacopo@jmondi.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220518171921.244168-1-jacopo@jmondi.org> References: <20220518171921.244168-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/5] cam: Queue requests unconditionally 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: , X-Patchwork-Original-From: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The CaptureSession::queueRequest() function increments the queueCount_ counter, which tracks the number of requests queued to the camera. The number of queued requests is currently compared with the capture limit which should instead only be compared with the number of captured frames, something which already happens in the CameraSession::processRequest() function. Remove the check and only compare the capture limit with the actual number of captured frames. If more requests than the frame capture limits end up being queued to the Camera, they will be released on Camera::stop(). Signed-off-by: Jacopo Mondi --- src/cam/camera_session.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/cam/camera_session.cpp b/src/cam/camera_session.cpp index 71e6bd605139..186072817367 100644 --- a/src/cam/camera_session.cpp +++ b/src/cam/camera_session.cpp @@ -327,9 +327,6 @@ int CameraSession::startCapture() int CameraSession::queueRequest(Request *request) { - if (captureLimit_ && queueCount_ >= captureLimit_) - return 0; - queueCount_++; return camera_->queueRequest(request);