From patchwork Thu Jul 9 13:28:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 8729 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 0AAACBD792 for ; Thu, 9 Jul 2020 13:29:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CC1DD61214; Thu, 9 Jul 2020 15:29:25 +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="ReSsM0Yl"; 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 34B2F61184 for ; Thu, 9 Jul 2020 15:29:24 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7D59B56E; Thu, 9 Jul 2020 15:29:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1594301362; bh=EMXNuZEE6bh/6i3wipPc7HOgWZjVkxvGkxqN/EFzbMI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ReSsM0Ylm4uG9oLx3GqWuNCp59kRrgWPsXfAgqzJDOo25NLlmo+mKTjdL0J8Xca3D H9q//9MSm9B04t/LRbXR+CkF+sBNCSbhpLxxa2/oMEKqSExRp/ximfQSquqw5xArcs oOBbE0PXwj/agCEyOxX+j8pXpuq0HpN2mKjqbaBU= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Thu, 9 Jul 2020 22:28:26 +0900 Message-Id: <20200709132835.112593-15-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200709132835.112593-1-paul.elder@ideasonboard.com> References: <20200709132835.112593-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 14/23] libcamera: raspberrypi: Set default configuration size at validation 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" If a native format is not found, a default NV12 format is set. However, this does not set a default configuration size, sometimes resulting in a 0x0 size. Fix this by setting a default configuration size. Signed-off-by: Paul Elder --- New in v5, split from "libcamera: raspberrypi: Fill stride and frameSize at config validation" --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index a08ad6a..5f00500 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -500,6 +500,9 @@ CameraConfiguration::Status RPiCameraConfiguration::validate() if (fmts.find(V4L2PixelFormat::fromPixelFormat(cfgPixFmt, false)) == fmts.end()) { /* If we cannot find a native format, use a default one. */ cfgPixFmt = formats::NV12; + cfg.size.width = 1920; + cfg.size.height = 1080; + status = Adjusted; }