From patchwork Mon Oct 28 10:15:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 21761 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 66B45BD78E for ; Mon, 28 Oct 2024 10:15:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E01E56539F; Mon, 28 Oct 2024 11:15:39 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="sVZbV/U4"; 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 3294B60360 for ; Mon, 28 Oct 2024 11:15:38 +0100 (CET) Received: from ideasonboard.com (mob-5-90-59-111.net.vodafone.it [5.90.59.111]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 527B4346; Mon, 28 Oct 2024 11:15:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1730110536; bh=YG0OkSf2AsCZqPIB5h06FRTgt6xsXCqdpkwLfDcEWQs=; h=From:To:Cc:Subject:Date:From; b=sVZbV/U4eUKUQrpnTDv68rcaqXc5UokhRKB7f6kfNg+EC52POUM1hHPlX8o2/2g6f ruvO1d8wb8RwgN2T+CVy3bxWIVhvXQM8VB5wbVdfXNUIBmFRnSjYb8fkUINsRIGcN6 OHWBPBp6l2/2JqaGIoTcSeDBBUr6y7AMa9Q6q+eg= From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi Subject: [PATCH] libcamera: rkisp1: Create main buffer pool out of if(!isRaw) Date: Mon, 28 Oct 2024 11:15:23 +0100 Message-ID: <20241028101525.21369-1-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 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 "useDewarper_" class variable is set to true during configure only if the configuration is !isRaw. The main path buffer pool creation can thus be moved out of the if (!isRaw) block at allocateBuffers() time. Cosmetic change that will make it easier to create a buffer pool for the main and self paths unconditionally in future. Signed-off-by: Jacopo Mondi Reviewed-by: Umang Jain --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 83b74b27652f..20fb9765727f 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -927,16 +927,16 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera) ret = stat_->allocateBuffers(maxCount, &statBuffers_); if (ret < 0) goto error; + } - /* If the dewarper is being used, allocate internal buffers for ISP. */ - if (useDewarper_) { - ret = mainPath_.exportBuffers(maxCount, &mainPathBuffers_); - if (ret < 0) - goto error; + /* If the dewarper is being used, allocate internal buffers for ISP. */ + if (useDewarper_) { + ret = mainPath_.exportBuffers(maxCount, &mainPathBuffers_); + if (ret < 0) + goto error; - for (std::unique_ptr &buffer : mainPathBuffers_) - availableMainPathBuffers_.push(buffer.get()); - } + for (std::unique_ptr &buffer : mainPathBuffers_) + availableMainPathBuffers_.push(buffer.get()); } for (std::unique_ptr &buffer : paramBuffers_) {