From patchwork Wed Aug 4 13:25:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13204 X-Patchwork-Delegate: umang.jain@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 80319C3232 for ; Wed, 4 Aug 2021 13:25:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E2E94687B6; Wed, 4 Aug 2021 15:25:34 +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="VQ2tG5Gr"; 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 B5BD36026E for ; Wed, 4 Aug 2021 15:25:33 +0200 (CEST) Received: from perceval.ideasonboard.com (unknown [103.251.226.40]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8094324F; Wed, 4 Aug 2021 15:25:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1628083533; bh=2fgjKcbCG0DG+hVy80XxmSIlVDuYlmOwuDtxn7LcdGA=; h=From:To:Cc:Subject:Date:From; b=VQ2tG5GrZVHXy2oQfnkK46bLDDFeMAg7EH+Ag4rWBwo4F/TYtjL6v9IjKB4zkJFVw FCaC3/2WL/RWU5Roe39fphSqQJOm0WCbtw92Yp195xmFWJ64YDuUp2tgIhA4DiUk9M UXsMZz1uTLj4XeJIVzWauCz7MkOhGgpURGeZyCXQ= From: Umang Jain To: libcamera-devel@lists.libcamera.org Date: Wed, 4 Aug 2021 18:55:26 +0530 Message-Id: <20210804132526.162376-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2] ipu3: Disallow raw only camera configuration 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" Ideally to capture the raw frames, ImgU should not be required. However, we do need to configure the IPA since it shall setup the sensor controls (exposure, vblank and so on) for the capture. One cannot simply configure the IPA, without the ImgU as the parameters and statistics buffer passed to the IPA are actually managed by the ImgU. Until we prepare and setup the ImgU to run an internal queue for raw-only camera configuration, disallow this configuration and report it as invalid. Signed-off-by: Umang Jain Reviewed-by: Kieran Bingham Tested-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/ipu3/ipu3.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 76c3bb3d..9f6a6f21 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -248,6 +248,20 @@ CameraConfiguration::Status IPU3CameraConfiguration::validate() if (rawCount > 1 || yuvCount > 2) { LOG(IPU3, Debug) << "Camera configuration not supported"; return Invalid; + } else if (rawCount && !yuvCount) { + /* + * Disallow raw-only camera configuration. Currently, ImgU does + * not get configured for raw-only streams and has early return + * in configure(). To support raw-only stream, we do need the IPA + * to get configured since it will setup the sensor controls for + * the capture. + * + * \todo Configure the ImgU with internal buffers which will enable + * the IPA to get configured, for the raw-only camera configuration. + */ + LOG(IPU3, Debug) + << "Camera configuration cannot support raw-only streams"; + return Invalid; } /*