From patchwork Sat Jul 13 17:23:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1689 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 659E86175D for ; Sat, 13 Jul 2019 19:24:38 +0200 (CEST) Received: from pendragon.ideasonboard.com (softbank126209254147.bbtec.net [126.209.254.147]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2277C443 for ; Sat, 13 Jul 2019 19:24:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1563038678; bh=okmAxtUruVB8pinmiOgzJjtkfvoBMrA2UCfcIicLLKc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SLgwLZj8A9DjQdLhFPqRrg2CnMh98LoD92SA8E84vrbDDhaU7px1y51z3XeEDJgYC ztMjBG/4WJACxoc8Z8fYOA2GTOha46lzpCcMvFsFRR0KhU1PWYIpzRTdnhMqRdeR76 7fU2lu72SUiNoqa48OzXIXW8kLWzPCegKJ9Mi+Lc= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sat, 13 Jul 2019 20:23:43 +0300 Message-Id: <20190713172351.25452-9-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190713172351.25452-1-laurent.pinchart@ideasonboard.com> References: <20190713172351.25452-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 08/16] libcamera: pipeline: ipu3: Use stream configuration to get buffers count X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2019 17:24:38 -0000 Access the number of allocated buffer for the streams through the stream configuration instead of the stream's buffers pool. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/pipeline/ipu3/ipu3.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index ffc066a15ae9..488e89f25c5e 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -635,7 +635,7 @@ int PipelineHandlerIPU3::allocateBuffers(Camera *camera, * of buffers as the active ones. */ if (!outStream->active_) { - bufferCount = vfStream->bufferPool().count(); + bufferCount = vfStream->configuration().bufferCount; outStream->device_->pool->createBuffers(bufferCount); ret = imgu->exportBuffers(outStream->device_, outStream->device_->pool); @@ -644,7 +644,7 @@ int PipelineHandlerIPU3::allocateBuffers(Camera *camera, } if (!vfStream->active_) { - bufferCount = outStream->bufferPool().count(); + bufferCount = outStream->configuration().bufferCount; vfStream->device_->pool->createBuffers(bufferCount); ret = imgu->exportBuffers(vfStream->device_, vfStream->device_->pool);